Event Listener Module¶
The Event Listener Module waits for specific events and initiates new workflow instances or performs actions upon event occurrence. Events are triggered at the domain level and may originate from other processes.
In addition to the common task properties, the following properties are configurable:
Event Name:
The name of the event(s) to listen for. 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 semicolon delimiters (e.g., "Customer.New;Customer.Update.{{Id}}"
).
Handle Script:
The script executed when an event is received. This script determines the workflow's subsequent actions. If left unset, the workflow engine automatically selects the first available action. The attached event data is accessible via the $Input
variable as an XML instance.
If the task is configured as a starting point, a new workflow instance is initiated, and event data is mapped to matching nodes in the current workflow's data model. If the handle script does not specify an action, the workflow instance reverts. If the task is not a starting point, the workflow instance pauses until the event occurs. In this case, if the handle script doesn't define an action, the instance remains paused awaiting the next event.
System Events¶
Emakin automatically fires the following events for integration purposes.
User Events¶
User.Register
¶
Fired when a new user registers with the system. Registration occurs upon a first-time login under the current usage terms. If tenant usage terms change, re-registration with the updated terms is automatically triggered.
This event does not include input data. It expects a new workflow instance to be created and assigned to the user. If no workflow instance is created, registration completes automatically. This event is designed to comply with GDPR consent requirements.
Case Events¶
The following events are triggered upon completion of operations on a case instance. The $Case
scripting variable automatically holds the case instance data for the triggered event.
The following Case events are available:
Case.Open
: Fired when a case's status changes to "Open".Case.Assign
: Fired when a case is assigned to a user or assignment is cleared.Case.Update
: Fired when case properties (Subject, Description, Deadline, Profile, etc.) are updated.Case.Close
: Fired when a case's status changes to "Closed".Case.Delete
: Fired when a case is deleted from the system.Case.Deadline
: Fired when a case deadline is reached.Case.Reply
: Fired when a case receives a reply (e.g., via email or another system).
Warning
Case events are processed synchronously. Any exceptions will result in a silent rollback of the transaction.
Input Data for Case Events¶
Case events provide the following example XML data, accessible via the $Input
variable:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
|
Remarks¶
If the module's script is left empty, the first available action will be automatically selected.