WSO2 Business Process Server v3.0.1 Documentation

##### Overview

- Home
- Release Note
- WS-BPEL Compliance
- License

##### Downloads

- Releases

##### Installation Guide

- Installing WSO2 BPS

##### Quick Start Guide

- Modeling the process
- Deploying the process
- Testing the process

##### User Guide

- Deploying BPEL Processes
- Deploying Human Tasks
- Managing BPEL processes
- Managing BPEL process instances
- QoS for BPEL processes
- Securing BPEL processes
- Invoking secured partner services
- Versioning
- Management API

##### Human Task Guide

- Human Tasks Quick Start Guide
- Deploying HumanTasks
- Managing Tasks
- Developing a Human Task Artifact
- Human Task Management and Configuration
- Human Task Concepts

##### Administrator Guide

- External data sources Configuration
- Registry Configuration
- Events
- Unified Endpoints
- BPEL Extensions
- Transaction Factory Configuration
- Message Exchange Interceptors
- OpenJPA specific properties
- JMS Transport Configuration
- Process Instance Cleanup Tasks
- Process Hydration and Dehydration
- Enabling Peer-to-Peer(P2P) Communication
- Setting up a BPS Cluster

##### Best Practices

- Process Deployment Best Practices

##### Concepts

- Process Versioning
- Process instance events
- Partner links

##### WS-BPEL Extensions

- Activity Failure and Recovery
- Extension Activities and Extensible Assign Operations
- XPath Extensions
- Iterable ForEach
- Flexible Assigns
- BPEL4People Extension

##### Samples

- HelloWorld
- If-Else
- ForEach
- While
- Repeat Until
- Flow and Links
- Pick
- Synchronous and Asynchronous Service Invocations
- Fault Handling
- Split
- XslTransform
- Compensation Handler
- Event Handler

##### Resources

- FAQ
- External Articles
- Library
- Source Code

##### Community

- Forum
- Mailing Lists

##### Project Information

- Issue Tracking

# WSO2 BPEL Component User Guide

## Introduction

WSO2 Business Process commponent adds 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. WSO2 Business Process component is powered by Apache ODE(Orchestration Director Engine).

### WS-BPEL

WS-BPEL defines a language for the specification of Executable and Abstract business processes. By doing so, it extends the Web Services interaction model and enables it to support business transactions. WS-BPEL defines an interoperable integration model that should facilitate the expansion of automated process integration in both the intra-corporate and the business-to-business spaces. Processes in WS-BPEL export and import functionality by using Web Service interfaces exclusively.

## Deploying BPEL Package

### BPEL Package Format

BPEL package is a ZIP archived directory with all the relevant deployment artifacts. Minimal BPEL package contains the deployment descriptor, one or more process definitions(.bpel or .cbp), WSDL and XSDs(excluding the ones compiled into .cbp). The deployment descriptor is a file named deploy.xml. To deploy, just copy the BPEL package containing your artifacts to the %CARBON_HOME%/repository/bpel directory. If you are using a URL repository copy the package to 'bpel' direcotry in that repository.

Folder structure of BPEL Package:

BPEL.zip

BPEL

myprocess.bpel

myprocess.cbp

myprocess.wsdl

deploy.xml

myschema.xsd

Deploying BPEL package through the management console

1. In the management console, under Business Processes click Add BPEL. The Add BPEL page will appear.
2. Click Browse to locate the file you want to upload.
3. Click Upload. If the BPEL package contains valid processes and adheres to the format, a message will appear saying the deployment was successful. If there are compilation failures in process definitions, a compilation error message will appear. In case of missing deployment descriptor, 'deploy.xml does not exist' message will appear. In this case managment console will not automatically go to Processes page or Deployed Packages page.

## Managing Deployed Packages

Click Deployed Packages under Business Processes in the navigation menu. The Deployed Packages page will appear.

This list contains all the BPEL packages deployed in the system and will display business processes in those packages.By clicking Undeploy link, users can undeploy the packages available in the system.

If user tries to undeploy a package which contains business processes with running process instances, management console will warn the user that thare are running process instances. If user really wants, he can undeploy BPEL packages with running process instances.

## Managing Deployed Processes

In the management console, under Business Processes click Processes. The Processes page will appear.

Process list will display IDs of the deployed processes with their version, status and deployed date. With this list you can retire and activate processes. You can view detailed description about the process, when you click the process id link.

'Filter Process List' link can be used to expand the process list filter. You can use process list filter to narrow down the list of processes using criteria like process name, namespace or deployed date. You can order the process list by using properties like name, namespace or version.

Sample Order by filter:

- Let's say we want to sort the process list by process definition name. Here if there are processes with same name, we want to sort them by their version. The filter for this will be: 'name -version'

### Difference between Active and Retired Processes

Active processes can be invoked by partners and as a result, new process instances will be created. When a process is retired all the running instances of that particular process will behave normally. But no new instances will be created from retired processes.

## Detail View of Deployed Business Process

In the management console, click Processes under Business processes. Then click on any of the process ID links. It will display a detailed description about the process including version, status, deployed date, container package of that process, total instance, instance summary and syntax highlighted process definition.

Using the link display in front of the status of the process users can activate or retire that process.

## Managing Process Instances

When you click Instances under Business Processes, Instances page will appear. TThis page will display paginated list of currently available process instances in the system.

The instance list will display ID of the instance with the process id of that instance, current status, date started, last active date and actions that can be performed on that instance. Users can click on the instance id link to go to the detailed view of that instance and use process id link to view the details of the process. Users can use Suspend/Resume, Terminate and Delete links to suspend/resume active instance, terminate active instance and to delete instance from the system. Complete and Terminated instances can only be deleted and can't perform any other actions on it.

User can use shortcuts available below the bread crumbs to filter the available instances according to their status. Advance Filter link will expand the filter from and users can use that to filter the instance list according to process name, process namespace, started date and etc.. If the user want to reset the filter and list all the available instances user can use either 'All' shorcut link or 'Reset Filter' link.

Advance Filter link will expand the filter form and user can use it to narrow down the instace list.

Using Advance Filtering

Advance Filtering can be used to narrow down the instance by process name, process namespace, status, started date, and last active date. And user can order the filtered instance list using Process ID, Name, Version, Started Date and Last Active Date.

Example:

- To get the all the process instances created by process definitions in http://example.com namespace, started after 23rd January 2009 6.30 PM and order them in Descending order you should configure filter like shown below. When you specify times you have to use 24-hour format "hour:minutes:seconds".

Users can use 'Delete Instances' link to bring the delete instance dialog box and they can specify an instance filter to select the instances from the available instances and delete them.

Sample instance deletion filters:

- To delete all the completed instances: 'status=completed'
- To delete all the instances of process definition {http://example.com}counter-3(3 is the version): 'pid={http://example.com}counter-3'

## Instance Detail Page

When a user clicks on instance id link at the 'Instances Created' page, instance details page for the instance represented by that ID will appear.

Instance details page will display information like process id of that instance, status, last active date and event information, scope information, variable values and activity information of that instance.