WSO2 BPS - Quick Start Guide

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.

Table of Contents

Prerequisites

You should have the following prerequisites installed on your system to follow this guide.

Installing BPEL Editor Plugin for Eclipse

In order to use BPEL plugin on Eclipse 3.4, you need to install it from the source.
  1. First you need to switch to the CVS perspective by clicking Window->Open Perspective->Other->CVS Repository Exploring .
  2. To add a new repository location, Right-click on the "CVS Repositories" view.
  3. Fill the dialog as follows.

  4. 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


  5. Switch Back to the Java Perspective by selecting Window->Open Perspective->Other->Java(default) .
  6. 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.
  7. To configure a launch configuration, go to Run->Run Configurations.. from the main menu.
  8. Select "Eclipse Application", then click the "New launch configuration" button.

  9. Fill in a Location (e.g. "/home/milinda/Personal/BPELPlugin"), click "Apply" and "Run".

  10. 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

  1. Go to File->New->Other from main menu and select BPEL Project from the wizard and clickNext.

  2. Specify the project name(e.g. "Hello World") and click Finish.

  3. Right-click on the newly created project and select New->Other .
  4. Select New BPEL Process File from the wizard and clickNext.

  5. Fill the new BPEL file details as shown in the screencap below and clickFinish.

  6. The BPEL Editor will now open and show the newly created process.

  7. 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.
  8. Right-click the assign activity added in previous step and select "Show in properties".

  9. 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.

  10. 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.
  11. 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".
  12. 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.
  13. 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:

  14. 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".

  15. 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".
  16. 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.



  17. 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.

  18. 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.
  19. 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.
  20. After sign in to BPS management console, Go to Business Processes->Add BPEL and select the newly created BPEL archive(HelloWorld.zip) and upload.

  21. 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:
  1. Click Try this service link which resides infront of "HelloWorldService".
  2. Try-it page appears, enter a string in input field and click "process" button.
  3. 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.

  4. 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.