How to use event sub-processes
You can set up business processes containing task combinations that can be repeated several times during the process execution, when certain events occur. To arrange such task combinations in a separate process flow, use the [Event sub-process] element in your diagram.
For example, within a sale process, order information must be updated at every stage of negotiations (Fig. 1).
To set up a process containing an “Order modification” event sub-process:
1.Add a [Throw message] intermediate event to the process diagram after the corresponding process action. Populate the [Which message to generate?] field with the message name that will serve a trigger of your event sub-process, e.g. “UpdateOrder” (Fig. 2).
2.Add the [Event sub-process] element to the diagram and set up the elements on it (Fig. 3):
a.Add a [Message] start event in the [Event sub-process] area on the diagram, as the initial event of your event sub-process. Make sure that the value in its [Which message event should start the process?] field matches the value of the message generated by the corresponding [Throw message] event (Fig. 4).
b.Add sub-process actions, e.g., an [Open edit page] action that opens the order page for the user and a [Send email] action, during which the user should notify all involved parties that the order has been updated.
c.Connect the event sub-process elements with sequence flows.
3.Save the process.
Note
The event sub-process will be triggered each time the [Message] start event receives a corresponding message generated during the execution of the current process. Running event sub-process will not interrupt the execution of the current process: the event sub-process elements will be performed as regular process elements in the order defined by the user.
As a result, the event sub-process will launch each time the [Throw message] intermediate event of the current process generates a corresponding message during the process execution. For example, an order modification sub-process will run whenever an order modification message is received within the process.
See also