Wait for Event
Pause workflow execution until an external event arrives via API, matched by event type and correlation key.
The Wait node suspends execution until an external system sends a matching event through the Buildorado API. Events are matched by type and a correlation key, allowing multiple workflows to wait for different events simultaneously without interference.
Configuration
| Field | Type | Required | Description |
|---|---|---|---|
| eventType | string | Yes | The event name to listen for (e.g., payment.completed, document.signed). |
| correlationKey | string | Yes | Variable expression used to match incoming events to this specific execution (e.g., {{nodes.form1.orderId}}). |
| timeoutAmount | number | No | How long to wait before timing out. Defaults to 24. |
| timeoutUnit | enum | No | Time unit for the timeout: minutes, hours, or days. Defaults to hours. |
| timeoutPolicy | enum | No | What happens when the timeout expires. One of fail (default), skip, or default_value. |
| defaultValue | string (JSON) | When timeoutPolicy is default_value | JSON object used as the event data when the wait times out. |
Timeout Policies
- fail -- The workflow execution fails with a
WAIT_TIMEOUTerror. - skip -- The workflow continues with an empty event data object.
- default_value -- The workflow continues using the configured default value as the event data.
How Correlation Works
When the wait node executes, it resolves the correlationKey template expression against the current workflow context to produce a correlation value. The engine then stores a wait state with the event type and correlation value. When an external system sends an event to the Buildorado API, the engine looks up matching wait states by event type and correlation value, then resumes the corresponding execution.
Output
| Field | Type | Description |
|---|---|---|
| status | string | One of waiting, resumed, or timed_out. |
| eventType | string | The event type that was waited for. |
| correlationKey | string | The original correlation key expression. |
| correlationValue | string | The resolved correlation value. |
| startedAt | string | ISO timestamp of when the wait began. |
| timeoutAt | string | ISO timestamp of when the wait will expire. |
| eventData | object | Payload from the external event. Present when status is resumed or on timeout with skip/default_value policy. |
| timedOut | boolean | true when the wait expired before an event arrived. |
Example
After creating an invoice, wait up to 48 hours for a payment confirmation.
Event Type: payment.completed
Correlation Key: {{httpRequest_1.body.invoiceId}}
Timeout: 48 Hours
On Timeout: Use default value
Default Value: {"status": "unpaid"}The external payment system sends a payment.completed event with a matching invoiceId, which resumes the workflow with the payment details in eventData.