Nexus-Workflow is an asynchronous Directed Acyclic Graph (DAG) pipeline and workflow orchestrator for modern Java. It provides topological task scheduling, non-blocking asynchronous execution with CompletableFuture, automatic cycle detection, configurable exponential retry policies, and granular step latency telemetry.
+-------------------+
| validate_order |
+---------+---------+
|
v
+-------------------+
| fraud_check |
+----+---------+----+
| |
+---------+ +---------+
| (Parallel) | (Parallel)
v v
+-------------------+ +--------------------+
| charge_payment | | reserve_inventory |
+---------+---------+ +---------+----------+
| |
+-----------+-----------+
| (Join barrier)
v
+-----------------------+
| dispatch_confirmation |
+-----------------------+
- Asynchronous Execution: Fully non-blocking concurrency built on Java
CompletableFutureand thread pool executors. - Topological Scheduling & Join Barriers: Automatically schedules independent tasks in parallel and synchronizes fan-out / fan-in dependency barriers.
- Cycle Detection: Validates DAG graphs upfront using Depth-First Search (DFS) recursion checks before starting any work.
- Exponential Retry Engine: Configurable retry policies with initial backoffs, multipliers, and failure boundaries.
- Context Telemetry: Thread-safe variable passing with per-node execution latency tracking.
# Compile
javac -d bin (Get-ChildItem -Recurse -Filter *.java src/main).FullName
# Run demo
java -cp bin com.nexus.workflow.Appjavac -d bin -cp bin (Get-ChildItem -Recurse -Filter *.java src).FullName
java -cp bin com.nexus.workflow.WorkflowEngineTest[Triggering DAG Execution: validate -> fraud -> (payment || inventory) -> confirmation]
[1] Executing: Validate Order Payload...
[2] Executing: Real-time Fraud Analysis...
[3A] Executing (Parallel): Authorizing Credit Card Charge...
[3B] Executing (Parallel): Reserving Warehouse SKU Allocation...
[4] Executing: Emitting Customer Receipt & Shipping Label...
-------------------------------------------------------
Workflow Execution Summary: WF-RUN-1001
Total Pipeline Wall Time: 12ms
Context Outputs:
• amount => 249.99
• tracking_code => TRK-FEDEX-91928
• fraud_cleared => true
• workflow_completed => true
• payment_tx => TX-CHARGED-8831
Node Latencies (ms): {validate_order=1, fraud_check=0, charge_payment=4, reserve_inventory=3, dispatch_confirmation=0}
-------------------------------------------------------
Noncommercial license © dimxxkun
Original material in this repository is available under the Noncommercial Use and Commercial Permission License. Noncommercial use is free. Commercial use requires prior written permission and a separate written agreement specifying the scope and agreed fee. Contact [email protected] with the repository name and intended use.
Portfolio review and recruitment evaluation are permitted without a fee. Third-party components retain their own licenses. Permissions already granted for earlier versions remain valid; the new terms do not revoke those grants. These are custom source-available terms, not an OSI-approved open-source license.