In this section, you add a BPEL process file, for example, BPELProcess.bpel. Add a partner link and three activities to the BPEL process file.
Expand the BPEL Module project node in the Projects window.
For example, BpelModuleSample
Right-click the BPEL Module project name or Process Files node. Choose New —> BPEL Process...
For example, BpelModuleSample
This opens the New BPEL Process wizard.
Type the File Name in the File Name field.
For example, BPELProcess
Click Finish.
In the Projects window, the IDE adds a BPELProcess.bpel node under the Process Files node.
The BPELProcess.bpel file is open in the BPEL Designer.
The Properties window is open.
If you do not see the Properties window, choose Window —> Properties.
The Navigator window is open showing the BPEL Logical View of the BPEL Process document.
Select the Partner Link from the Projects tab.
For example, SOAPWSDL.wsdl
This is the Input WSDL.
Drag and drop the SOAP WSDL Document to the left panel of the design area.
For example, SOAPWSDL.wsdl
Select the Partner Link from the Projects tab.
For example, dbWSDL.wsdl
This is the Output WSDL.
Drag and drop DATABASE WSDL Document to the right panel of the design area.
For example, dbWSDL.wsdl
Drag and Drop the following Web Services:
Receive
Invoke
Reply
Drag and Drop the Basic Activities : Assign1 and Assign2.
Select the Web Service : Receive in the Web Service section of the Palette.
Drag the selection to the BPELProcess box in the design area between the Process Start and the Process End activities.
The IDE provides the visual clues to show an appropriate location to drop the selection.
This action places a Web Service Receive called Receive1 in the Design view.
Select the Basic Activities — Assign in the Basic Activities section of the Palette.
This action places a Assign activity called Assign1 in the Design view.
Drag the selection to the BPELProcess box in the design area, between the Process Start and the Process End activities.
Repeat steps 1 through 4 to select Invoke1, Assign2, and Reply1.
Choose the following:
Select the Web Service : Invoke and Basic Activities : Assign.
Select the Web Service ; Reply.
In the diagram, a red cross next to an element means that the element has not passed validation and the output contains errors. Edit each Sequence to pass validation.
The icon symbolizes that the Web Services can be edited.
Click Web Service — Receive1 and click Edit.
This opens the Receive1 [Receive] - Property Editor.
Select the properties from the Main tab. Select PartnerLink1 from the drop-down list.
The IDE fills in the Operation field with SOAPWSDLOperation.
Create a new input variable.
Perform the following:
Click the Create button next to the Input Variable field.
This opens the New Input Variable dialog box.
The Name, Type, and Scope are displayed, by default.
You can also change the value in the Name field.
Click OK.
All the fields are populated with the assigned values.
Input Variable — SOAPWSDLOperationIn
Click OK to close the Receive1 [Receive] - Property Editor.
Click Save All.
Click Web Service — Invoke1 and click Edit.
This opens the Invoke1 [Invoke] - Property Editor.
Select the properties from the Main tab. Select PartnerLink2 from the drop-down list.
Select any one of the Operations from the drop-down list.
Insert
Update
Delete
Find
Pollrecords
Select Operation — find from the drop-down list. The IDE fills in the Operation field.
Follow the steps to create a new input and an output variable.
Click the Create button next to the Input Variable field.
This opens the New Input Variable dialog box.
The Name, Type, and Scope are displayed, by default.
You can also change the value in the Name field.
Click OK to close the New Input Variable dialog box.
Click the Create button next to the Output Variable field.
This opens the New Output Variable dialog box.
The Name, Type, and Scope are displayed, by default.
You can also change the value in the Name field.
Click OK to close the New Output Variable dialog box.
All the fields are populated with the assigned values.
Select the following Variables:
Input Variable : FindIn
Output Variable : FindOut
Click OK to close the Invoke1 [Invoke] - Property Editor.
Save the project.
Click Web Service : Reply1. Click Edit.
This opens the Reply1 [Reply] - Property Editor.
Select the properties from the Main tab. Select PartnerLink1 from the drop-down list.
The IDE fills in the Operation field with SOAPWSDLOperation.
Follow the steps to create a New Output Variable.
Click OK to close the Reply1 [Reply] - Property Editor.
Double-click the Basic Activity : Assign1.
This displays the BPEL Mapper window.
Expand the node in the Source tree pane (the left pane) of the BPEL Mapper under Output —> Variables.
For example, SOAPWSDLOperationIn
A part1 node appears under the SOAPWSDLOperationIn node.
Expand the node in the Destination tree pane (the right pane) of the BPEL Mapper under Input —> Variables.
For example, FindIn
A part node appears under the FindIn node.
Select the node in the Source tree pane.
For example, SOAPWSDLOperationIn — part1 — CUSTOMER_Record
Drag the selection and map it to the node in the Destination tree pane.
For example, FindIn — part — CUSTOMER_Record
For example, Map the following Variables:
Click the Design tab.
A red icon marked against Basic Activities — Assign1 is not shown.
Double-click the Basic Activity : Assign2.
This displays the BPEL Mapper window.
Expand the node in the Source tree pane (the left pane) of the BPEL Mapper under Output — Variables.
For example, FindOut
Expand the node in the Destination tree pane (the right pane) of the BPEL Mapper under Input — Variables.
For example, SOAPWSDLOpertionOut
Select the node in the Source tree pane.
For example, FindOut : part : CUSTOMER_Record
Drag the selection to the node in the Destination tree pane.
For example, SOAPWSDLOpertionOut : part1 : CUSTOMER_Record
For example, Map the following variables:
Click the Design tab.
The final output is as shown in the illustration.
Right-click the project node and select Clean and Build.
For example, BpelModuleSample
The following message is displayed.
BUILD SUCCESSFUL (total time: 2 seconds). |
Click Save All.