Using event sub-processes
In the previous example, we saw how we can use a boundary event to implement the cancel instance use case. We could also use an interrupting event sub-process to implement this use case. After you have completed this example, you might want to go back and implement the cancel order example using an event sub-process.
Another common use case that is implemented using event sub-processes is querying a process instance to retrieve some data from it. This is the use case we will implement in this practical exercise.
First, we will update the CancelBoundaryEvent
process from the previous practical exercise so that it updates the orderStatus
attribute of the Order
process data object as it progresses through the process. Then, we will add an event sub-process that will allow us to query the status of an order.
Open the properties for the Allocate Stock activity. Remove the draft checkbox, then go to the Implementation tab.
Change Implementation Type to Script Task.
Open Data...