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.

The behavior type does not define the order in which listeners are called, but whether the listener is called serially or in parallel, that is, whether the action that raised the event waits for a listener resolution, and what the "result" of the listener invocation looks like. So in this case, "serially" means:
  • 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:
A custom event's Properties pane with the Behavior field highlighted

A custom event will have one of the following behavior types:
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 { "stopPropagation": true }, the application will stop calling event listeners.

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.