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,
- Select the "File > Import..." menu item. In the "Import"
wizard:
- Select "Existing Project into Workspace" and click the "Next" button.
- Click the "Browse..." button and navigate to the directory where you extracted BPEL_Samples.zip (or BPEL_Samples.tar.gz) .
- Click the "OK" button and then the "Finish" button. You should see a new project in the "Navigator" view named "BPEL_Samples".
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
- Start the ActiveBPEL Server and ActiveBPEL Designer.
- In Designer's Navigator view, right click on sample-name.pdd and select the "Export..." menu item.
- In the wizard, select "Business Process Archive File" and click the "Next" button.
- Set the "BPR file" to BPEL_Samples\BPEL\sample-name\sample-name.bpr.
- Accept the default Deployment Type (Web Service) and URL and click the "Finish" button.
ActiveBPEL Engine
- Create a wsdlCatalog.xml file
- Create the BPR
- Copy the BPR into the
$CATALINA_HOME/bprdirectory
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.
Copyright © 2004–2007 Active Endpoints, Inc.
