Event handlers and -actions for process definitions are managed in the event handlers pane of the process definition dialog. The event handlers pane is structured to have an overview tree of the event handlers and -actions on the left side and a details pane for the chosen model element on the right side. Refer also to Events for basic informations.
Figure: Structure of the Event Handlers Pane
The overview tree groups handlers by type. In the event handling tree the bind actions and event actions are listed.
Figure: The Overview Tree
To create an event handler:
Figure: Creation of an Event Handler
Event handlers must have a name and an ID uniquely identifying them in the scope of the associated process definition. Additionally, event handlers may have some of the following general attributes:
The following event handler types are provided for processes:
For a timer event handler you can derive the moment of timer either as a constant offset or from workflow data. While a modeling-time timer constant can only be of type org.eclipse.stardust.common.Period (specifying an offset to the event binding time), a timeout derived from workflow data may either be of type java.util.Date , long or java.lang.Long (defining an absolute time) or org.eclipse.stardust.common.Period (again specifying an offset to the event binding time). Numeric timer values are considered to be milliseconds since January 1, 1970 0:0 GMT, according to the specification of method getTime() of class java.util.Date.
Figure: Structure of the Event Handlers Pane
For a process state change event handler you can specify the intended source state and target state you want to match against. See also Process Instance States for more details on modeling the different process instance states.
Figure: State Change Event Handler Properties
Event handlers can be modified by selecting them in the overview tree of the process properties dialog, then editing their properties in the details pane.
All engine event handlers are executed in the order specified in the corresponding properties dialog, e.g. the activity properties dialog or the process definition dialog. Event handlers may be reordered by selecting an event handler in the event handlers pane and then moving it by using the Move Up and Move Down buttons.
An event handler can be deleted by selecting it in the event handlers pane of the properties dialog and then pressing the Delete button.
The following event actions are available for process definition event handlers depending on the event handler type:
To create an event action for an event handler:
Figure: Add an Event Action.
Figure: Action Type Choice
Bind actions are created in a similar manner. Click Add Bind Action or Add Unbind Action to add a bind or unbind action. See also Event Binding.
Abort process actions implicitly target the process instance hosting the current activity instance, thus not needing to be configured.
For trigger process actions you have to select the process to be triggered.
Figure: Select Trigger Process
For send mail actions the following properties may be specified:
Figure: Send Mail Action Properties
In the Send Mail To section, choose a recipient:
In this case, the receiver mail address from the users, who have this role, is
Figure: Choose a Model Participant as Recipient.
Figure: Choose a Predefined Address as Recipient.
The sender mail address is used from the Mail.Sender property, set in the carnot.properties file.
In the Mail Subject entry field, you can enter a subject for the mail. The default value of the subject is "Infinity Process Platform Notification Mail".
In the Runtime Defined Message section, add the email body text in one of the following ways:
Figure: Enter Mail Content as Predefined Message
Figure: Choose a Runtime Defined Message
Set data actions will set values retrieved from the event handler on workflow data similar to data mappings. To do this, every event handler offers a certain set of access points (which may be empty). This way the following properties may be configured:
Figure: Set Data Action of the Process Dialog
An event action is modified by selecting it in the overview tree and then editing its properties in the details pane.
Bind actions are modified similarly.
All event actions are executed in the order specified in the model. Event actions may be reordered by selecting an event action in the event handlers pane of the properties dialog and clicking on the Move Up and Move Down button. The same applies to bind actions.
An event action or bind action is deleted by selecting it in the event handlers pane and pressing the Delete button.