O'Reilly logo

Essential Business Process Modeling by Michael Havey

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

BPEL in a Nutshell

The following sections examine the essential language constructs designers will need to understand to create a BPEL process: the basic process structure, variables and assignments, exception handling and compensation, split and join, loops, participant exchange, transactions, and extensions.

Basic Process Structure: Start, End, Activities, Sequence

A developer’s first BPEL process is not easy to write. Two puzzles face the beginner:

  • A BPEL process has exactly one activity (which, of course, can consist of any number of subactivities to any level of hierarchy). Which activity should that be? Which are allowed? Which are disallowed? Which are recommended?

  • How is the initial inbound event handler set up? Where do you place the receive or pick in the activity described in the first problem?

The simplest approach, and the one recommended to most developers, is to use a sequence whose first activity is a receive with createInstance="yes", as in the following code example :

    <sequence>
       <receive . . . createInstance="yes" . . .> . . . </receive>
       <!-- other activities -->
    </sequence>

This process starts when the receive triggers, then executes the remaining steps sequentially, and exits when the last activity has completed. Error handling complicates the processing, of course; see the section "Exception Handling and Compensation" for a discussion.

Another approach is to use a receive within a flow. The receive should not have any inbound links. For example:

 <flow> <receive . ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required