WSO2 Business Process Server(BPS) Quick Start Guide
This guide offers the quickest way to install and begin using the WSO2 Business Process Server.
You will be guided through a step-by-step approach to create, deploy, invoke and manage
business process written following WS-BPEL 2.0 standard using BPS management console.
By the end of this guide you should have a basic understanding of most features available in the system.
You should have the following prerequisites installed on your system to
follow this guide.
Java 2 SE - JDK or JRE version 1.5.x or higher
WSO2 BPS v1.1.0 - For more information on installing refer installation
guide.
Eclipse 3.4
Installing BPEL Editor Plugin for Eclipse
In order to use BPEL plugin on Eclipse 3.4, you need to install it from the source.
First you need to switch to the CVS perspective by
clicking
Window->Open Perspective->Other->CVS Repository Exploring
.
To add a new repository location, Right-click on the "CVS Repositories" view.
Fill the dialog as follows.
Expand "org.eclipse.bpel/plugins" under HEAD and checkout following packages by Right-click on the
selection.
org.eclipse.bpel.apache.ode.deploy.model
org.eclipse.bpel.apache.ode.deploy.ui
org.eclipse.bpel.apache.ode.runtime
org.eclipse.bpel.common.model
org.eclipse.bpel.examples.extensionPoints
org.eclipse.bpel.model
org.eclipse.bpel.runtimes
org.eclipse.bpel.ui
org.eclipse.bpel.validator
org.eclipse.bpel.wsil.model
org.eclipse.bpel.xpath10
Switch Back to the Java Perspective by selecting
Window->Open Perspective->Other->Java(default)
.
If there are compiler errors, go to
Window->Preferences->Java->Compiler-> Errors/Warnings
. Expand the "Deprecated and restricted API" section. Set the "Forbidden reference (access rules)" to
"Warning" (instead of Error). Click OK, click "Yes" on the rebuild dialog that appears.
To configure a launch configuration, go to
Run->Run Configurations..
from the main menu.
Select "Eclipse Application", then click the "New launch configuration" button.
Fill in a Location (e.g. "/home/milinda/Personal/BPELPlugin"), click "Apply" and "Run".
After some time, you should see a new Eclipse workbench comming up. Close the
Welcome Screen to you see a new, blank Eclipse workspace. Go to
File->New->Other
,
Now you should see BPEL 2.0 projects.
Creating and Deplying a Simple BPEL Process
Go to
File->New->Other
from main menu and select BPEL Project
from the wizard and clickNext.
Specify the project name(e.g. "Hello World") and click Finish.
Right-click on the newly created project and select
New->Other
.
Select
New BPEL Process File
from the wizard and clickNext.
Fill the new BPEL file details as shown in the screencap below and clickFinish.
The BPEL Editor will now open and show the newly created process.
As shown in the above figure, the newly created process has two intenral BPEL variables called
input and output and a sequence with one receive activity and one reply activity.
During the creation of new process, the wizard created a WSDL file. This WSDL describes input and output
data types and a port type that represents the BPEL process. Input and output data types created by
wizard simply contains single string fields. In order for this process to work, we'll add an Assign
Activity between the receiveInput and replyOutput activities.
Expand the Palette if not shown in order to be able to pick the assign activity.
Right-click the assign activity added in previous step and select "Show in properties".
At the bottom left of the Assign Details Page, click "New" button to start creation of the first assign
procedure. Then, assign "input -> payload -> input" to "output -> payload -> result" as
shown in the screencap. When you do the above initializer popup dialog will appear and click "Yes"
to generate the initiaizer for output variable.
The types used in BPEL process, port types, bindings and services for the process should describe
in the WSDL file for a BPEL process. The WSDL created by wizard only contains a port type and in order
to make process functional, create a Port and a Biniding for it. To do that fisr double-click and
open the WSDL file in WSDL editor.
Right-click on WSDL editor canvas and select "Add Service". New service element will appear on the
canvas. Name the newly added service "HelloWorldProcessService". Right-click on the it's port "NewPort"
and select "Show Properties". Rename it to "HelloWorldProcessPort".
To specify a Binding, Right-click on white space area in canvas of WSDL editor and select "Add Binding".
A new Binding element appears on the WSDL editor and rename it to "HelloWorldSOAPBinding". In the
PortType Box, select "HelloWorld". Finally click on the "Generate Binding Content" button.
In the Protocol, select "SAOP" and in the SOAP binding options, select "Document Literal", click Finish.
Select the "HelloWorldProcessPort" and in properties view select the "HelloWorldSOAPBinding" from
the Biniding combo box. In the address field, type http://localhost:9673/services/HelloWorldService.
You WSDL editor will look like follows:
To deploy BPEL process you created in BPS, you need to create a ODE Deployment Descriptor.
Right-click on the "Hello World" project and select
New->Other
.
Select Apache ODE Deployment Descriptor, click Next. Click Finish on the next dialog window and leave
the file name as "deploy.xml".
After click Finish, a new File "deploy.xml" got created. If it gets opened in an XML Editor,
then close that XML Editor, right click on "deploy.xml" and select
"Open With -> ODE Deployment Descriptor Editor".
To fill in the deployment descriptor, first click the combo box under the General section and select
"activated". Then click in "Associated Port" column for the "client" Partner link in the
"Inbound Interfaces" section. Select "HelloWorldProcessPort" from the drop down box. Click in the white
space of the Deployment Descriptor Editor. The "related Service" and "Binding Used" columns should
automatically be filled in. Right click on "deploy.xml" in Package Explorer and select
"Open With -> XML Editor". In the XML editor right-click on the retired
element(deploy->process->retired)
and select "Remove". Save the deploy.xml.
Now the modeling part is complete. We have a BPEL project(Hello World) with a BPEL (HelloWorld.bpel),
a WSDL (HelloWorldArtifacts.wsdl) and a ODE deployment descriptor (deploy.xml). Now is the time to
deploy the BPEL in BPS. To do that first export your "Hello World" project in to file system. Select
files as shown in screencap.
Before deploying the "Hello World" BPEL project in WSO2 BPS, we have to packge it as a ZIP archive. If
you export your project to directory called "hello_bpel", you will find HelloWorld.bpel,
HelloWorldArtifacts.wsdl, and deploy.xml inside that directory. Put those files into directory
called "HelloWorld" or any name you prefer and archive it using ZIP format.
Before deploying the BPEL package you created on BPS, please refer
installtion guide
and
user guide
to install and access the WSO2 BPS management console.
After sign in to BPS management console, Go to
Business Processes->Add BPEL
and select the newly created BPEL archive(HelloWorld.zip) and upload.
Go to
Business Processes->Processes
page to list the available process in the system.
Invoking BPEL Process Created Using Try-it
Once you deploy the "HelloWorld" process in BPS, it is exposed as a Web Service to the external world. Go to
Service->List
in the WSO2 BPS Management Console and service list will contains
"HelloWorldService" under "HelloWorldService" group.
Invoking "Hello World" Process:
Click
Try this service
link which resides infront of "HelloWorldService".
Try-it page appears, enter a string in input field and click "process" button.
Try-it'll show cross domain warning and progress animation when you click "process" button.
After sevaral seconds response will appear under the input field.
You can also find the Try-It link in process list page itself
Managing BPEL Processes and Process Instances
WSO2 BPS has the capability to execute business processes written using WS-BPEL standard in
WSO2 SOA platform. It also provides a complete web based graphical console to deploy, manage and view
processes and process instances. For more information please read
BPEL component user guide.