Using the IME to re-start an activity
In the Review Request activity, if the reviewer detects something wrong and would like the requestor to re-submit this request again, he can press the Re-submit request button on the Review Request Coach to return this request to the requestor. However, in this tutorial, we do not focus on routing techniques. We will focus on data flow only. Therefore, the request will be returned to the Requestor group user, but not to the correct requestor.
- Create the Re-submit UCA to the Release event. Before creating the
Re-Submit UCA, you need to create a service for this UCA. We named
this new service
Re-Submit Service(Figure 23). This UCA will call the attached service to run when it receives the incoming message.
Figure 23. Diagram of Re-Submit Service
As you can see, it is a simple service. The purpose of this service is to pass the
correlationIDvariable only (Figure 24).
Figure 24. Variables configuration of Re-Submit Service
- After creating this service, you can create a new UCA,
Re-submit UCA(Figure 25).
Figure 25. Configuration of Re-submit UCA
- Re-design the Review Request Coach to enable the Re-submit Process
button. Drag the Re-submit UCA into the Coach's
diagram, as well as drag a new coach, Confirm End
Process, into the diagram (Figure 26).
Figure 26. Re-design of the Review Request Coach
In Figure 26, the Confirm re-submit Coach is just a simple coach displaying the information.
- You need to map the data for the Re-submit UCA, so that you can receive
the event and invoke the service. The correlationID is now
tw.local.request.requestID, as shown in Figure 27.
Figure 27. Configure data mapping for Re-Submit UCA
- Re-design the BPD to add an IME listener so that it can listen to
the new Re-submit Event. You need to add a new IME on the Review
Request activity to listen to the event coming from this activity
Figure 28. New BPD diagram design
In Figure 29, the Attached UCA is
Re-Submit UCA. The correlationID now shows
Figure 29. New IME named as Resubmit Event Handler
Now you can test this BPD. When the user is on the Review Request activity and clicks on the Re-submit Process button, the system brings the user to the Submit Request activity.