When to reach for it
- Runs take a long time or can fail.
- States and retries must be robustly managed.
- Production demands traceability.
/pattern/workflow-dag/
Workflows are operated as persistent execution graphs featuring resumability, retries, and state history.
In practiceA document-processing pipeline runs OCR, classification, and archival as nodes in a durable graph, replaying only the failed node after a transient storage error.
When to reach for it
When it backfires
The tradeoff
Production robustness is achieved at the expense of infrastructure and modeling effort.
Tasks execute as a durable directed graph.
A conditional edge creates an implicit cycle that the DAG validator misses. The workflow loops indefinitely at runtime.
Fix · Run a static cycle check at build time. Reject any graph that contains a back-edge unless it's explicitly declared as a loop.
Every new requirement gets squeezed into the existing DAG shape. The graph becomes a tangled mess of conditional hacks.
Fix · Re-evaluate the DAG topology quarterly. If conditional edges exceed 30% of total edges, consider decomposing into smaller graphs.
Next pattern
Search patterns, frameworks, and pages.