WSO2 Business Process Server v3.1.0 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

# Quick-Start Guide - Modeling a Process

This guide will explain the initial step for modeling a BPEL process. Refer this article to get more informative idea on how to model a BPEL process via Carbon Studio. Major steps in modeling a business process are.

- Creating the Carbon Application Project (in this example, Carbon Application Project name is WS_NumberAdderCarbon)
- Creating a new BPEL Work-flow Project as a new Carbon Artifact under the created Carbon Application Project (in this example, BPEL Work-flow Project name is BPELNumberAdder)
- Creating the BPEL 2.0 process under the created BPEL Work-flow Project (in this example, BPEL process name is AdderProcess)

1. Open eclipse IDE. Go to File -> new -> Other (see Figure 1)

   Figure 1

2. From the dialog window select Carbon Application project and click Next(see Figure 2).

   Figure 2

3. Give a name to the Carbon Application project. Here I'm giving the carbon Application project name as WS_NumberAdderCarbon. Then click Finish. (See Figure 3)

   Figure 3

   Note: Eclipse will prompt you to "root-artifact.xml" automatically. (If not, open it from Project Explore window)

   Figure 4

4. Let's create a new BPEL project. Click on "Create new Artifact" (figure 4) and select "BPEL WorkFlow" (Figure 5). In the opened dialog (Figure 6) click on "New BPEL Project".

   Figure 5

   Figure 6

5. It will show dialog box (Figure 7). Give a name to the BPEL project. Here give the project name as BPELNumberAdder.

6. Then click Finish to close the wizard and again click finish to close the New BPEL workflow dialog. Now you can see the newly created BPEL project appears in Project explore window.

   Figure 7

   Now there's an already created BPEL project. Now-onwards we are going to create our BPEL process.

7. Let's create a BPEL process file. For that right-click on BPEL project "BPELNumberAdder" form the "Project Explore".

   Note: If you expand the WS_NumberAdderCarbon project folder in the Project Explore window, you can see another folder called BPELNumberAdder. This is an instance of our BPELNumberAdder Project. Both are linked in together. In Other words all changes which are done to the BPELNumberAdder project, automatically applied to the BPELNumberAdder folder of the WS_NumberAdderCarbon. Here the BPELNumberAdder project is used for BPEL process development.

8. Then go to New -> Other. It will show a Wizard (Figure 8). From the wizard, select "New BPEL process File" which is under the BPEL 2.0. Then click Next.

   Figure 8

9. In next dialog (Figure 9), it will ask for a name for BPEL process, a namespace, and a template. Here I am giving the Process name as "AdderProcess" and namespace as "http://NumberAdder.com". The process which we are going to create is a synchronous process. So select template asSynchronous BPEL process. Then click Finish.

   Figure 9

   Note: It will automatically generate AdderProcessArtifacts.wsdl and AdderProcess.bpel. If we look at the folder structure of the BPEL process, we can easily figure out these two files. (Figure 10)

   Figure 10

10. Open the AdderProcess.bpel file from the Project Explore window. Here you can see the template for our business process. The BPEL editor automatically generates receiveInput and replyOutput activities. (Figure 11) Also it will generate partnerLink and variables used in these two activities.

    Figure 11