External Interaction Patterns
These patterns cover how a Workflow waits on or interacts with the world outside it — external APIs, human decisions, scheduled delays, and inbound or outbound callbacks — while staying durable across failures.
Patterns in this section
Polling External Services
Checks an external resource on a schedule until it reaches the state you need, with frequent, infrequent, and periodic variants.
Long Running Activity
Reports progress via heartbeats and resumes after failures, with cancellation support, for Activities that run for minutes to hours.
Approval
Blocks the Workflow until an external decision arrives, capturing the approval and its metadata through a Signal.
Delayed Start
Creates the Workflow immediately but defers execution until a delay expires.
Delayed Callback (Webhooks)
Integrates webhooks durably: receive inbound webhooks via Signals, fire delayed outbound callbacks with durable timers, and complete Activities asynchronously via task tokens.
Choosing a pattern
The external system offers no notification: use Polling External Services and tune the interval to the expected latency.
One Activity runs for a long time: use a Long Running Activity with heartbeats so failures resume instead of restarting.
A person or external system must decide: use Approval to block on a Signal.
Execution should begin later: use Delayed Start.
You send or receive HTTP callbacks: use Delayed Callback (Webhooks).
Related sections
- Error Handling & Retry Patterns — retry strategies for the external calls these patterns make
- Workflow Messaging Patterns — the Signals that deliver external decisions into a Workflow