Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Event The event listener module are 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 to the common task properties you can also configure the following properties for an automation task;

Event Name
Name of the event. Event The event name can be set to a plain text value (Ex: Customer.New) or may contain contain a data template expressions to include data from a data model. (Ex: "PaymentComplete.{{Id}}" )

...

Handle Script
Script to handle an event and take action to continue the workflow instance. If not set worfklow , the workflow engine automatically selects the first action.

Attached The attached event data can be accessed with the $Input variable as XmlNode instance.

If the task is configured as start 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 start a starting point, the workflow instance paused pauses and waits until the event is occurs. If the handling script does not take any action, then the workflow instance continues to wait until the next event occuroccurs.

System Events

Emakin automatically fires the following events for integrating with certain operations.

...

Fired when a new user registered to the system. Registration is 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 changed change, registration is automatically re-initiated with new terms.

This event does not contain any input and expect expects a new workflow instance is to be created that 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.

...

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 contains contain the following example xml XML data as input and can be accessed with the $Input variable. 

Expand
titleShow $Input Data


Code Block
<Case xmlns="http://schemas.emakin.com/case">
    <Id>43b21104-5805-40c2-b174-59c3c612977f</Id>
    <ChannelId>a272d0cf-04aa-4dd9-ba84-4c6fbe3818b8</ChannelId>
    <Number>24133</Number>
    <Subject>My Case</Subject>
    <Description>My Description</Description>
    <IsClosed>False</IsClosed>
    <DeadlineAt>2025-02-03T00:13:00</DeadlineAt>
    <Priority>Normal</Priority>
    <ContentType>Job Order</ContentType>
    <ContentTypeId>89e9d051-e04f-46fa-81dd-47c736138831</ContentTypeId>
    <CreatedAt>2022-07-22T14:05:43.7285220+03:00</CreatedAt>
    <CreatedBy Caption="John Doe" Domain="41aedbcf-01a4-4517-8a2e-4c669d432652" Type="User">467a3ace-3e67-4c44-ae75-7a48bad80490</CreatedBy>
    <UpdatedAt>2022-07-22T14:05:43.7367360+03:00</UpdatedAt>
    <UpdatedBy Caption="John Doe" Domain="41aedbcf-01a4-4517-8a2e-4c669d432652" Type="User">467a3ace-3e67-4c44-ae75-7a48bad80490</UpdatedBy>
    <AssignedTo Caption="John Doe" Domain="41aedbcf-01a4-4517-8a2e-4c669d432652" Type="User">467a3ace-3e67-4c44-ae75-7a48bad80490</AssignedTo>
    <AssignedAt>2022-07-22T14:05:43.7367360+03:00</AssignedAt>
    <ClosedAt>2022-07-22T14:05:43.7367360+03:00</ClosedAt>
    <UserTags>
        <Tag>
            <Id>a0cb3ce3-788d-4567-9e62-f24dcb5c20bd</Id>
            <Name>User Tag</Name>
        </Tag>
    </UserTags>
    <SystemTags>
        <Tag>
            <Id>80bc3bc6-8a8a-43ce-b2b4-f140c89c888c</Id>
            <Name>System Tag</Name>
        </Tag>
    </SystemTags>
    <Profile>
        <JobOrder xmlns="" State="Current">
            ...
        </JobOrder>
    </Profile>
</Case>


Case.Open

Fired when Case status has set to Open state.

Case.Assign

...

Fired when case properties (Subject, Description, Deadline, Profile etc.) has been are updated.

Case.Close

Fired when case status has set to Closed state.

Case.Delete

Fired when a case has been deleted from the system.

Case.Deadline

Fired when a case deadline has occurs.

Case.Reply

Fired when the case received receives a reply from by mail or another system.

Remarks

Events are processed in synchronous behavior behaviour, and if any exception occurs the transaction is rollbacked.