Await

Blocks until a signal is received on all inputs configured, then outputs on a single output.

The Await Node can be used in situations where multiple execution paths are running and you need to wait for their completion before continuing the Workflow. You can configure your Await Node to have up to 10 signals. Consider the Workflow below:

Example

In this sample Workflow, we have an API Request Node configured for endpoint awaitTest. We have 3 Wait Nodes configured for 3 seconds, 6 seconds, and 3 seconds respectively. Our API Request Node is configured to fire all Wait Nodes at once. Our Await Node is configured so that when it receives signal on all 3 signal inputs, it will fire on the complete output, which in turn causes our API Response Node to return an empty 200 status response for our API. Upon testing the Workflow, you will see that it takes roughly 6 seconds to complete.

Example 2

For a closer real-case scenario application, consider the following Workflow:

In this example, we have an API Request Node firing 3 Invoke HTTP API Nodes simultaneously. When these 3 Nodes are completed with either a 200 or any status code, the Await Node outputs on complete, and the API Response Node will complete the Workflow.

You should be cautious of error handling when working with Await Nodes. Your error handling should complete the respective signal. If you handle your error outside without signaling, then your Workflow will stall, as the Runtime will wait for the Await Node to complete before finishing the Workflow. However, unhandled errors will not cause the Workflow to stall, because unhandled errors will cause the Runtime to completely stop Workflow execution.