Saga Or Process Manager Block
A saga or process manager coordinates a long-running workflow across commands, events, systems, and time.
When To Use It
Use a Saga or Process Manager block when a policy is no longer a simple one-event, one-command reaction. It is useful for multi-step workflows with waiting, retries, deadlines, compensating actions, or several aggregates.
Required Data
- Name: workflow name, such as Order Fulfilment Process.
- Starting event: event that begins the workflow.
- State tracked: information the process needs while it is running.
- Steps: commands issued and events awaited.
- Completion event: event or condition that ends the workflow.
- Failure path: timeout, retry, cancellation, manual intervention, or compensation.
Recommended Data
- Timeouts and deadlines: how long each step can wait.
- Compensation commands: actions that undo or mitigate previous steps.
- Human escalation: role and interface for manual resolution.
- Observability: milestone events and operational status.
- Idempotency strategy: duplicate event and command handling.
Examples
- Order Fulfilment waits for payment, inventory reservation, packing, carrier booking, and dispatch.
- Loan Origination waits for identity checks, credit assessment, document upload, and final approval.
- Subscription Dunning retries payments, sends notifications, pauses entitlements, and closes the case after recovery or cancellation.