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
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Time for action – adding an event handler to the BPEL process


Let's now add an event handler to the main Book Warehousing BPEL process. First, we will add an alarm event handler for the maximal execution time of a BPEL process. Then, we will add a message event handler, which will allow the cancelation of a running BPEL process instance.

We will proceed as follows:

  1. Open the BookWarehousingBPEL.bpel process.

  2. On the left-hand side, we will select the Add OnAlarm icon, as shown in the following screenshot:

  3. Scroll to the right-hand side of the BPEL process and you should see that an OnAlarm event handler has been added to the BPEL process flow:

  4. We need to specify the deadline or duration expression for the OnAlarm event handler. Let's double-click on the OnAlarm icon. A pop-up EditOnAlarm window will appear, where we can specify For durations or Until deadlines. We could also specify Repeat Every duration, in which case the event handler would repeat every specified duration.

  5. Select the For duration...