Event Module¶
The Event Module triggers events to notify listener tasks of specific occurrences. Events are triggered at the domain level and can execute listeners in other processes.
Warning
Events are processed synchronously. Any exceptions encountered will result in a transaction rollback.
In addition to the common task properties, the following properties are configurable:
Event Name:
The name of the event(s) to trigger. This can be a plain text string (e.g., Customer.New
) or utilize data template expressions to incorporate data model values ( e.g., "PaymentComplete.{{Id}}"
). Multiple event names can be specified using semicolons (e.g., "Customer.New;Customer.Update.{{Id}}"
).
Event Data XPath:
The XPath expression defining the event data to be passed to listeners. If left empty, the root element content is used. The $Input
XML node variable provides access to relevant event data.
Handle Script:
A script to process event results and determine subsequent workflow actions. If no script is defined, the first available action is automatically selected. Event results are stored in the $Handlers
array, containing the IDs of the work items that handled the event. If no listeners exist, the array will be empty.
Remarks¶
If the module's script is left empty, the first available action will be automatically selected.
If the module script does not explicitly select an action, an exception will be thrown and execution is stopped.