Event Listener Module
The event listener module is used to wait for specific events or initiate new workflow instances when an event occurs. Events are triggered on domain scope and may receive events from other processes.
In addition to the common task properties you can also configure the following properties for an automation task;
Event Name
Name of the event. The event name can be set to a plain text value (Ex: Customer.New) or may contain a data template expressions to include data from a data model. (Ex: "PaymentComplete.{{Id}}" )
You may also specify multiple event names with semicolon delimited format. (Ex: "Customer.New;Customer.Update.{{Id}}" )
Handle Script
Script to handle an event and take action to continue the workflow instance. If not set, the workflow engine automatically selects the first action.
The attached event data can be accessed with the $Input variable as XmlNode instance.
If the task is configured as a starting point, a new workflow instance is initiated, and event data is copied to the current workflow data model for name matching nodes. If the handling script does not take any action, the workflow instance is reverted.
If the task is not set as a starting point, the workflow instance pauses and waits until the event occurs. If the handling script does not take any action, then the workflow instance continues to wait until the next event occurs.
System Events
Emakin automatically fires the following events for integrating with certain operations.
User Events
User.Register
Fired when a new user registered to the system. Registration occurs when a first time user has logged in to the system under usage terms and not with the user creation. If tenant usage terms change, registration is automatically re-initiated with new terms.
This event does not contain any input and expects a new workflow instance to be created and assigned to the user. If no workflow instance is created, registration is automatically completed.
This event is designed to comply with GDPR requirements with consent acceptance.
Case Events
Following events are fired when an operation is completed on a case instance. $Case scripting variable is automatically set to case instance event triggered on.
Input Data
Case events contain the following example XML data as input and can be accessed with the $Input variable.
Case.Open
Fired when Case status set to Open state.
Case.Assign
Fired when Case assigned to a user or cleared assignment.
Case.Update
Fired when case properties (Subject, Description, Deadline, Profile etc.) are updated.
Case.Close
Fired when case status set to Closed state.
Case.Delete
Fired when a case has been deleted from the system.
Case.Deadline
Fired when a case deadline occurs.
Case.Reply
Fired when the case receives a reply by mail or another system.
Remarks
Events are processed in synchronous behaviour, and if any exception occurs the transaction is rollbacked.
Copyright © 2010 - 2023 Emakin. All rights reserved.