-
### Processes that wait for a person Examples: contract approval, supplier onboarding, and document signing in EDI.
-
The process sends a document, waits three days, escalates to a manager on timeout, and continues after signing.
-
With a queue, this process becomes a state machine spread across five tables. In an orchestrator, it takes a few dozen lines of sequential code. ### Sagas with compensation
-
The warehouse reserved the item, the payment failed, and the reservation must be released.
-
The orchestrator stores a list of completed steps and runs compensations in reverse order.
-
Without this, phantom reservations accumulate in the warehouse: the item is physically on the shelf, but cannot be sold. ###
-
Parallel batch processing Suppose you need to enrich 50,000 item cards in Pimcore or Akeneo using an LLM.
-
The orchestrator splits them into batches, runs them in parallel (fan-out), and combines the results (fan-in).
-
If the model fails or the quota runs out on item card 30,000, processing will continue from the point of failure.
-
Without an orchestrator, the tokens paid for the first 30,000 item cards would have to be spent a second time. ### AI agents
-
An agent works in a loop: the model selects a tool, receives the result, and decides what to do next.
-
Sometimes an agent stops and waits for human approval.
-
Each iteration costs tokens and may have a side effect.
-
Suppose the agent fails on the twelfth call out of fifteen.
-
Restarting from scratch would pay for eleven calls again.
-
In addition, the client may receive an email twice, and a duplicate document may appear in 1C. Durable execution saves the result of every model and tool call, so after recovery the agent continues from the last step.