Choose How Custom Events Call Event Listeners
Each custom event has a behavior type that defines how the event listeners will be called in relation to each other, whether the result for the listener is available, and what form the result would take.
- For a single event listener (in a container), all the event listener chains are called sequentially, in a declared order. This means that a listener action chain is not called until the previous action chain has finished (and resolved, it returns a Promise)
- The event listeners for the next container's listeners are not called until the listener action chains for any previous container's event listeners have finished (and resolved, it returns a Promise)
You can choose the behavior type of a custom event in the Properties pane of the Events editor:
Behavior Type | Description |
---|---|
notify |
Parallel: The event is triggered but the application does not wait for the extension to process it. Chain results are not available to the action (or helper) that fired the event (because the listeners are called without waiting). This is the default behavior. |
notifyAndWait |
Serial: Each action chain listener must complete (and resolve any returned Promise, if any), before another event listener action chain is called. Chain results are not available to the action (or helper) that fired the event. |
checkForCancel |
Serial: Each action chain listener must complete (and resolve any returned Promise, if any), before another event listener action chain is called. If any of the listener's chains returns a "success" with a payload of Chain results are not available to the Action (or helper) that fired the event. |
transform (deprecated) |
Use transformPayload instead. If your existing event listener is set to transform, it is recommended that you switch to transformPayload. |
transformPayload |
Serial: Each action chain listener must complete (and resolve any returned Promise, if any), before another event listener action chain is called. Chain results are available to the action, and the action can modify the chain's results before passing it back to another action following it. |