Skip to main content

Wait For Event Node

Wait For Event Node Screenshot

Overview

The Wait For Event Node is used to pause the execution of a graph until a specific event is raised by a Raise Event Node or the host project. The event name can be configured in the node settings or provided dynamically via an input port.

This node is useful in scenarios where you want to wait for an external event to occur before proceeding with the graph execution. For example, you might want to wait for a user to click a button, or for an API call to complete.

Inputs

TitleData TypeDescriptionDefault ValueNotes
DataanyAny data to be passed through the node.N/AThis data will be outputted from the Data output port.

Example 1: Wait for an event raised by a Raise Event Node

  1. Create a Raise Event Node and set the Event Name to myEvent.
  2. Create a Wait For Event Node and set the Event Name to myEvent.
  3. Connect a text node to the Data input port of the Raise Event Node with the text as Raise Event.
  4. Connect a text node to the Data input port of the Wait For Event Node with the text as Waited.
  5. Connect the output ports of the Raise Event Node and Wait For Event Node to the input ports of text nodes.
  6. Run the graph. The Wait For Event Node will wait until the Raise Event Node raises the myEvent event.
  7. Notice how the Wait For Event Node outputs the data from the Raise Event Node from the Event Data output port.

Wait For Event Node Example 1

Error Handling

The Wait For Event Node cannot error under normal circumstances. If the event is not raised, the node will wait indefinitely.

FAQ

Q: Can I use the Wait For Event Node to wait for multiple events?

A: No, the Wait For Event Node can only wait for a single event. If you want to wait for multiple events, you can use multiple Wait For Event Nodes.

Q: Can I use the Wait For Event Node to wait for an event raised by an API call?

A: Yes, you can use the HTTP Call Node to make an API call, and then use the Wait For Event Node to wait for an event raised by the API call.

See Also