Adding an event handler to the Book Warehousing BPEL process

We will now add an event handler to our Book Warehousing BPEL process. Event handlers allow a BPEL process to execute and still listen to the events and handle them whenever they occur. The event can be a message or an alarm event. If the corresponding events occur, an event handler is invoked concurrently with the BPEL process instance. We can specify event handlers for the whole BPEL process as well as for each scope.

Adding an alarm event handler

A typical usage of event handlers is to control the maximum execution time of a BPEL process. The other typical usage is to handle a cancellation message from the client.

Get WS-BPEL 2.0 Beginner's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.