Book Image

WS-BPEL 2.0 Beginner's Guide

Book Image

WS-BPEL 2.0 Beginner's Guide

Overview of this book

Table of Contents (19 chapters)
WS-BPEL 2.0 Beginner's Guide
About the Authors
About the Reviewers

Time for action – adding an alarm event for callback

To add an alarm event to our <pick> activity, we will do the following:

  1. 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:

  2. By double-clicking on the OnAlarm icon, we will specify the deadline to 1 day:

  3. 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 callbacks...