Version 3.0 - September, 2006
BPEL Samples (Top)
Introduction
The Samples
Installing the Samples
Deploying the Samples
Running the Samples
soapUI

BPEL Samples

Introduction

This is a collection of BPEL samples, from simple samples that discuss how to use a particular activity like pick or scope, to more complex examples that show whole processes that invoke external Web services or show techniques like handling multiple start messages.

The Samples

Activities

Invoke With Catch
Demonstrates the use of a catch within an invoke activity
Asynchronous Invocation
Uses an asynchronous one-way invoke and correlation data
While
Uses an index variable to iterate over a list of order items and calculate total cost
Scope
Discusses scopes as a way to organize your process and provide context for variables, fault handling, compensation, event handling, and correlation sets
Serializable Scope
Demonstrates how to provide concurrency control when accessing shared variables
Pick Start
Using pick as a start activity
Pick Alarm
A pick with an alarm that goes off after five minutes
Arrays
Sending and receiving arrays and accessing their contents.
Multiple Starting Receives
A process that accepts more than one start message

Extended Activities

These activities are not part of the BPEL 1.1 spec although some are slated to appear in the WS-BPEL 2.0 spec.

For Each, Break, and Continue
Loop N times, in parallel or sequentially, with an index variable; also demonstrates use of the break and continue extended activities

Example Processes

Loan Approval
A complete process; the canonical BPEL example
Marketplace Example
An incomplete BPEL process, as one might obtain from a business partner

Installing the Samples

ActiveBPEL Designer

The documentation for these samples assume you have already installed ActiveBPEL Designer. We highly recommend executing the introductory tutorial located in the online help.

All of the samples reside within a single ActiveBPEL Designer project. To import the project,

ActiveBPEL Engine

There is nothing to install.

Deploying the Samples

These instructions apply to almost all of the samples. If a particular sample has special deployment instructions, they will appear in that sample's documentation.

ActiveBPEL Designer

  1. Start the ActiveBPEL Server and ActiveBPEL Designer.
  2. In Designer's Navigator view, right click on sample-name.pdd and select the "Export..." menu item.
  3. In the wizard, select "Business Process Archive File" and click the "Next" button.
  4. Set the "BPR file" to BPEL_Samples\BPEL\sample-name\sample-name.bpr.
  5. Accept the default Deployment Type (Web Service) and URL and click the "Finish" button.

ActiveBPEL Engine

  1. Create a wsdlCatalog.xml file
  2. Create the BPR
  3. Copy the BPR into the $CATALINA_HOME/bpr directory

Instructions for creating a wsdlCatalog.xml file and a BPR may be found in Deploying BPEL Processes.

Running the Samples

In order to run the sample processes, you must first install and start the ActiveBPEL Server. ActiveBPEL Designer includes an embedded copy of the ActiveBPEL engine. To use it, please refer to the file home\Server\Readme.txt, where home is the directory in which ActiveBPEL Designer is installed.

The soapUI web service client application can be used to invoke your BPEL process once it's deployed. It requires a service URL and sample data. Check Deployed Services in the ActiveBPEL Engine's Admin Console for your process' service URL. Each sample's documentation will tell you which sample data file to use. It will also describe which WSDL or other resources it needs, if any. Those resources are found in the following locations:

WSDL
Resources/WSDL
Schemas
Resources/WSDL/Schemas
Samples Data
Resources/Sample Data
Documentation
Resources/Docs
Libraries and Config Files
Resources/dist

Most of the samples may also be run under simulation in ActiveBPEL Designer.

soapUI

The excellent (and free) web service client application soapUI can be used to send messages to any BPEL process or web service.