Signals
A signal is an unassigned external event. The workflow waits; a product API delivers the payload with a deduplication key.
dart
final receipt = await flow.waitForSignal(
paymentReceived,
id: 'payment',
);Signals delivered before waitForSignal are buffered. Duplicate deliveries with the same idempotency key do not append a second history event.
JSON documents use a signal step and an inputBinding for the expected payload shape.
When to Use a Signal vs a User Task
| Use | Why |
|---|---|
| User task | Work is assigned and must appear in an inbox |
| Signal | An external system or webhook reports a fact |
Do not hide automated work inside a user-task completion handler. Start the external job in a service task, then wait for a signal.