Developer Guide to the BPEL Designer

Using an Event Handler

When to Use

The entire BPEL process as well as each individual Scope can be associated with a set of Event Handlers that are invoked concurrently if the corresponding event occurs. The actions taken within an Event Handler can be any type of activity, such as Sequence or Flow. The only immediate child of an Event Handler is Scope, so when you drag an element from the Palette into an Event Handler, it is automatically wrapped in Scope.

There are two types of events:

Usage

  1. Right-click the Process element or any Scope and invoke the Add Event Handlers action. This does not add any particular Event Handler, it adds a container element to which you can then add specific Event Handlers.

  2. Once you have added an Event Handlers container, you can right-click on the Event Handlers element to add an On Event or On Alarm branch. You may add as many specific On Event or On Alarm elements as you wish to the Event Handlers group.

On Event Element

The On Event element indicates that the specified event waits for a message to arrive. The interpretation of this tag and its attributes is very similar to a Receive activity.

Usage

  1. Right-click the Event Handlers container and choose Add > On Event.

  2. Double-clicking the On Event element opens a Property Editor where you can specify/change the following:

    • The partner link

    • The operation associated with the On Event element

    • The event variable

    OnEvent Property Editor
  3. Right-clicking the On Event element and choosing Properties opens a Properties window where you can review and modify the properties of the element. In addition to the properties present in the Property Editor dialog box, the Properties window contains the Port Type field, which are filled in when you specify the partner link and operation, and the Type field, which is filled with the type of the specified even variable.

OnEvent Properties Window

The Correlations tab in the On Event Property Editor dialog box enables you to examine or specify a correlation set.

The tab shows:

For more information see Understanding Correlation. Using the Correlation Wizard.

On Alarm Element

The On Alarm element specifies the deadline for or the duration of the nested Scope.

On Alarm Element Properties

The properties of the On Alarm element are defined in the Properties window, invoked by right-clicking the element on the diagram and choosing Properties. The available properties are: