JBoss.orgCommunity Documentation

Chapter 2. Tasks

2.1. Creating and editing a BPEL project
2.1.1. Creating a BPEL project
2.1.2. Creating a BPEL process
2.1.3. Editing a BPEL process file
2.1.4. Adding Service to WSDL file
2.2. Deploy a JBoss BPEL project to JBoss BPEL Runtime
2.2.1. Creating a deploy.xml file
2.2.2. Creating JBoss BPEL Server
2.3. Creating correlation sets

In this chapter we describe the necessary steps to create a new BPEL project and edit the BPEL files. You can get the example source code from riftsaw/samples/quickstart/hello_world. In this guide we will create a simple echo example, used to respond to a message with a modified version of the request message.

The first step is to create a BPEL project.

Now you should create a BPEL process. You can create it by selecting FileNewOthers...BPEL 2.0New BPEL Process File.


Click the Next button. Enter the following information:



Click the Next button. On the second page, you can customize your WSDL service details. Enter the following information:



Click the Next button. On the third page, you can select a folder for the process file from the projects in your workspace. If a folder is not selected, the default folder HelloWorld/bpelContent will be used. Click the Finish button.

Note

All of your files that are used in your BPEL project must be under the bpelContent folder of a BPEL project. Only in this case these files can be deployed to JBoss server.

This will create a simple BPEL process as shown in the image below.


If the Properties view and Palette view are not opened, you can open the views by right-clicking the BPEL editor and selecting the Show in Properties or Show Palette in Palette view options. Then you should have the view like this:


In the Palette view, you can drag a BPEL element to the BPEL editor and drop it in the place you want.

In the Properties view, you can view the information on every element in the BPEL process. The contents of the Properties view is automatically updated as elements are selected in the BPEL editor. The table below describes the tabs shown in the Properties view:


In order to see how a simple BPEL process works in action, you should do some steps as below:

Correlation sets are used to identify ongoing conversations between a client and the BPEL process. Typically, a correlation is an element in a message that uniquely identifies the conversation between client and service; for example, an Order ID or Social Security Number. This also identifies a specific process instance being managed by the BPEL engine.

In many cases a single element of a message is not enough to make it unique, so correlations can be defined as composites of several fields. Since a conversation can involve many different types of messages. Different correlations will need to be defined for each message type.

To create a correlation for a messaging activity (for example: Invoke, Receive, Reply), select the activity and then click Add on the Correlation Detail property tab. This will display the Select a Property dialog.


You canselect an existing property defined in the WSDL or click New to create a new WSDL property, which will display the Create Message Property dialog.


Enter a name for the new WSDL property and its type. Either an XSD simple type or an XML Schema element.

Next, click the Browse button to select a type. This will display the Type Selection dialog.

Click New in the Aliases section to create a new WSDL property alias.


Select either the Message Type, XSD Simple Type or XML scheme Element radio button and click Browse to select its type. Then click OK.