Time for action – adding an alarm event for callback
To add an alarm event to our <pick>
activity, we will do the following:
- Add an
<onAlarm>
branch to the<pick>
activity. We will achieve this by clicking on the Add OnAlarm icon next to the<pick>
activity icon. We should see the following: - By double-clicking on the OnAlarm icon, we will specify the deadline to
1
day: - Next, we need to add the activity that will perform if the deadline is reached. In our example, we will simply throw a fault. We will name the fault Timeout. We should see the following:
What just happened?
We have added the <onAlarm>
branch of the <pick>
activity for the timeout, which we have set to 1
day. This way we have limited the time our process waits for the book warehousing success confirmation callback. The following BPEL code has been generated:
With this, we have concluded our discussion of the <pick>
activity. We now understand how to handle events with asynchronous...