Skip to main content

Design Patterns

Reusable Flow shapes from the Dex examples. Each pattern page explains the problem, the approach, and links to multi-language code.

Full samples live under examples/go, examples/java, examples/python, examples/typescript, and examples/rust (HTTP prefix /patterns/name/... where applicable). Try them from the examples playground (examples/playground); see examples/README.md.

  • Durable Timer — Choose cron schedules, reminders, or an inactivity tracker.
  • Drain Channels
  • Interruptible execution — Stop or redirect long work gracefully based on durable control signals.
  • Failure Handling — Recover from execute or wait failures, escalate to an operator, or enforce a business deadline.
  • Parallel Steps — Choose static, dynamic, await-all, or first-win concurrent Step coordination.
  • Parallel SubFlows — Fan out work to SubFlows, bound parent concurrency, partition across parents, and add durable back pressure.
  • Polling and Iteration — Revisit external state or process paginated work over time.
  • Data Storage — Project durable per-entity Flow Attributes into an application-owned SQL table.
  • Responsive Update — Return at a Step boundary, wait for durable state, or stream incremental updates.