Using the SME to start a new process
By going through these steps, you have learned that the IME and UCA can terminate a process, restart an activity, and update a process state. However, this is not enough. For example, a reviewer approves or rejects a request and this status needs to be visible to another other person, or it triggers other processes to start. In this tutorial, we will trigger a simple process to view the result only. This process is simple, but in reality the problem will be more complex and complicated.
- When the reviewer approves or rejects the request, it triggers
another process, Review Result Start Message, to execute. Figure
36 shows the new BPD.
Figure 36. Review Result Start Message BPD’s diagram
Note: We used Start Message Event, not Intermediate Event.
- In Figure 37, do not check "Is System Lane", so that the
user can interact with this new BPD. You need to create variables
for the "Review ResultStart Message" BPD, as shown in Figure
Figure 37. Participant swimlane’s configuration
Figure 38. Review Result Start Message BPD’s variables
- The variables for both the response and request have Has Default checked. Create a simple coach for the Review Result activity to display the information of the request and response values. We do not go into this step because this is not the purpose of this scenario. We assume that you can easily develop a simple coach to display such information.
- You need to configure the SME to respond to the event in the
Message Event BPD, as shown in Figure 39.
Figure 39. Configuration of SME
With this configuration, whenever the user approves or rejects the request in the Message Event BPD, the UCA will trigger and release an event not only for the IME listener, but also for the SME Listener to start a new BPD, "Review Result Start Message".
- Start the Message Event BPD. When you arrive at the Review Request
activity, you just have one process active (Figure 40).
Figure 40. Before releasing the event
- Run the Review Request activity. Click on the
Reject/Approve button to invoke the Monitor
Decision UCA. A new process instance is created (Figure
Figure 41. New process instance is created
Now you have two processes. The Message Event process is the current
running process. Since you clicked the Approve/Reject button before,
it triggered another process instance named
Review Result Start Message, but in Figure
41, you see
As a reference, you can use the Test - V6-Message_Event_Demo.twx file, which is provided as a zip file in the Download section of the tutorial.