Temporal Workflow Patterns Cheat Sheet

Durable orchestrations and signal-driven tasks

Last Updated: November 21, 2025

Pattern Focus

Pattern Usage
Saga Use compensating activities to roll back distributed transactions.
Signal-driven Emit signals to unblock waiting workflows without restarting.
Child workflows Break complex flows into reusable sub-workflows.
Heartbeat + retries Leverage timeouts and heartbeat to detect stuck workers.

API Calls

const stub = client.newWorkflowStub(MyWorkflow)
Start workflows from any service.
await stub.doThing({id})
Call workflow methods with typed inputs.
await workflow.signal(MySignal, payload)
Send signals to live workflows.
return Activities.call('SendEmail', data)
Let activities handle external IO.

Summary

Compose sagas, signals, and child workflows so stateful automations stay resilient and observable.

💡 Pro Tip: Keep side effects inside activities so workflows stay deterministic and easy to replay.
← Back to Databases & APIs | Browse all categories | View all cheat sheets