The outcome

Build a stateful workflow that can resume safely after interruption without silently repeating consequential work.

Step by step

A workflow you can repeat.

  1. 01

    Define a JSON-serializable state schema, start and end conditions, node responsibilities, reducers, and invariant checks.

  2. 02

    Separate deterministic logic, model calls, and external side effects into small nodes or tasks with explicit error outcomes.

  3. 03

    Compile with a persistent checkpointer, assign stable thread IDs, and make side-effecting operations idempotent.

  4. 04

    Test success, branch conditions, node failure, process restart, replay, concurrent resume, and state migration scenarios.

  5. 05

    Inspect state history and traces, then document retry ownership, checkpoint retention, schema versions, and recovery procedures.

Working standard

What good use looks like.

  • Keep state serializable and minimal.
  • Make side effects idempotent.
  • Test resumption, not only first execution.

Official references

Check the current product documentation.