JBoss.orgCommunity Documentation
In the chapter we describe the necessary steps to create a new BPEL project and edit the BPEL files. First of all, you should create a BPEL project.
Create the project by selecting New > Project... > BPEL 2.0 > BPEL Project from the menu bar. Then click the Next button.
On this page of the New BPEL Project Wizard enter a project name in the Project Name field,e.g enter HelloWorld.
Click the Finish button. So you have created the BPEL project named HelloWorld. Its structure is like this:
Now you should create a BPEL process. You can create it by selecting New > Others... > BPEL 2.0 > New BPEL Process File.
Click the Next button. Enter the following information:
Table 3.1. Fields and values
Field | Value |
---|---|
BPEL Process Name | enter a process name. For example, HelloWorld. |
Namespace | enter or select a namespace for the BPEL process. |
Template | select a template for the BPEL process. When you select the template, you will see the information about the template below on the page. |
Click the Next button. On the second page make sure that the folder HelloWorld/bpelContent is selected. Click Finish.
All of your files that are used in your BPEL project must be under the bpelContent folder. Only in this case these files can be deployed to JBoss server.
Up to now, you have got a simple BPEL process as on the screen below.
The next step, you can do is to edit the BPEL process file and then deploy it to JBoss server.
If the Properties view and Palette view are not opened, you can open the views by right-clicking the BPEL editor and selecting Show in Properties, Show Palette in Palette view. 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 get the information about every element of the BPEL process. In the BPEL editor select any element you want,and then the element's properties will be shown in the Properties view.The table below describes the tabs of the Properties view:
Table 3.2. Tabs of the Property view
Tab | Description |
---|---|
Description | Shows the descriptive information about the element,e.g. Name of the element. |
Details | Shows the detailed and important information about the element. It is the most important section of an element. Most of the properties of an element are set in this section. |
Join Behavior | Shows the Join Failure property of the element. |
Documentation | Shows the documentation sub-element of an element. |
Other | Every BPEL element has its own sections: Correlation section, Message Exchange section, and so on. We will introduce them while using them. |
In order to see how a simple BPEL process works in action, you should do some steps as below:
Add an Assign element between the receiveInput element and replyOutput element.
Click the Assign element in the BPEL editor in order to get the properties information of it in the Properties view.
In the Details section of Properties view, you should click the New button to add a copy sub-element to the element. Assign "input->payload->input" to "output->payload->result". At this time, an "initializer" popup dialog appears. Click on the Yes button in the dialog.
Open the file "HelloWorldArtifacts.wsdl" in the "HelloWorld" project by double-clicking the file. Right-click the WSDL editor and select Add Service. A new service should appear in the editor. Name it HelloWorldProcessService. It has the Port named NewPort. Select it, right-click on it and rename it to HelloWorldProcessPort in the Properties view.
Right-click somewhere in the whitespace of the WSDL editor and select Add Binding. A new Binding component will appear in the editor. Name it HelloWorldSOAPBinding. Select it, in the General tab of the Properties view and select HelloWorld as a port type in the PortType. Then click on the Generate Binding Content... button to open the Binding Wizard. In the wizard, select SOAP as the Protocol. Finally, click the Finish button to close the wizard.
Click the HelloWorldProcessPort property in the General section of the Properties view, select HelloWorldSOAPBinding in the Binding combobox. In the Address field input http://localhost:8080/bpel/processes/HelloWorld?wsdl.
Now you have finished creating a simple BPEL process.As a next step, you can deploy the BPEL project to JBoss BPEL Runtime.