Back to Workflows FAQs
HELP CENTER · FAQWorkflows1 min read

How should I handle a workflow step that waits for an external callback?

A callback-based step can remain open while an external system processes work, so it needs a durable correlation identifier, an expiry policy, and clear behavior for duplicate or late callbacks. Do not keep a worker occupied just to wait if the workflow engine supports durable waiting.

Workflows

Correlate and validate callbacks

Generate an unpredictable or otherwise protected token tied to the specific execution and expected callback type. Validate source, signature, and payload before advancing the workflow, and avoid putting sensitive data in a callback URL.

Make callback handling idempotent so duplicate deliveries return the prior outcome rather than repeating side effects. Confirm how the workflow treats concurrent callbacks for the same execution.

Define timeout and recovery behavior

Choose how long the step may wait and what happens on expiry: retry the external request, mark the execution for review, or end it with a clear failure. Keep the timeout aligned with the external service’s expected completion window.

Record callback receipt, validation result, and execution state without logging secrets. Test valid, duplicate, malformed, late, and missing callbacks, including recovery after the workflow service restarts.

Back to Workflows FAQs