01 / DECISION
When this primitive earns a place
Use Workflows when a multi-step operation must survive time, transient failure, or a human-in-the-loop pause.
02 / ARCHITECTURE
Build the smallest defensible path
Split work into named idempotent steps, persist only serializable outputs, bound retries, define terminal states, and expose status without leaking payloads.
- 01Name the contract
Use Workflows when a multi-step operation must survive time, transient failure, or a human-in-the-loop pause.
- 02Add one primitive
Split work into named idempotent steps, persist only serializable outputs, bound retries, define terminal states, and expose status without leaking payloads.
- 03Capture failure evidence
Fail a middle step, resume after a delay, deliver an external event, and confirm one final effect plus an inspectable history.
03 / REPRODUCE
Evidence before confidence
Fail a middle step, resume after a delay, deliver an external event, and confirm one final effect plus an inspectable history.
npx wrangler workflows list 04 / BOUNDARY
The production boundary
Retries can repeat side effects unless every step has an idempotency strategy. A workflow is not a substitute for authorization.
05 / FIRST-PARTY SOURCES
Keep first-party sources authoritative
Product behavior, limits, pricing, and availability can change. Re-check these sources before acting.