In this section, add a BPEL process file. For example, AddBPEL.bpel. You will also learn to add a partner link and associate three activities to the BPEL process file. Create a BPEL Module project to orchestrate.
Expand the project node in the Projects window. Right-click the node or Process Files node. Choose New —> BPEL Process...
For example, LDAPBpelModule
This opens the New BPEL Process wizard.
Type the Filename in the File Name field.
For example, AddBPELProcess
Click Finish.
In the Projects window, the IDE adds a AddBPELProcess.bpel node under the Process Files node.
The AddBPELProcess.bpel file is open in the BPEL Designer.
The BPEL Designer has two views: Source and Design.
The Properties window is open.
Choose Window —> Properties if the Properties window is not visible.
The Navigator window shows the BPEL Logical View of the BPEL Process document.
Select the Partner Link from the Projects tab. Drag and drop it to the left panel of the design area.
For example, TriggerWSDL.wsdl
This is the Input WSDL.
Select the Partner Link from the Projects tab. Drag and drop it to the right panel of the design area.
For example, AddWSDL.wsdl
This is the Output WSDL.
Drag and Drop the following Web Services:
Receive
Invoke
Reply
Drag and Drop the Basic Activities : Assign.
Select the Web Service : Receive in the Web Service section of the Palette.
Drag the selection to the box in the design area between the Process Start and the Process End activities.
For example, BPEL Process box : AddBPELProcess
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. Choose 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 AddBPELProcess 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.
The icon symbolizes that the Web Services can be edited.
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.
Click Web Service — Receive1 and click Edit.
This opens the Receive1 [Receive] - Property Editor.
Select the properties of this service from the Main tab. Select PartnerLink1.
The Operation drop-down list refreshes to display TriggerWSDLOperation.
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 variable fields are refreshed with their default values.
Change the value in the Name field.
Click OK.
All the fields are populated with the assigned values.
The Input Variable is TriggerWSDLOperationIn
Create Instance check-box is checked, by default.
Click OK to close the Receive1 [Receive] - Property Editor.
Save the project.
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.
The Operation drop-down list refreshes to display AddWSDLAddOperation.
Follow these 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 variable fields are refreshed with their default values.
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 variable fields are refreshed with their default values.
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 : AddWSDLAddOperationIn
Output Variable : AddWSDLAddOperationOut
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 Operation drop-down list refreshes to display TriggerWSDLOperation.
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.
Choose Window —> Other —> BPEL Mapper from the main menu if the BPEL Mapper window is not visible.
Expand the node in the Source tree pane (the left pane) of the BPEL Mapper under Output —> Variables.
For example, TriggerWSDLOperationIn
A Trigger1n node appears under the TriggerWSDLOperationIn node.
Expand the node in the Destination tree pane (the right pane) of the BPEL Mapper under Input —> Variables.
For example, AddWSDLAddOperationIn
A request node appears under the AddWSDLAddOperationIn node.
Select the node in the Source tree pane. Drag the selection and map it to the node in the Destination tree pane.
For example,
Source tree pane: TriggerWSDLOperationIn — Trigger1n
Destination tree node: AddAddOperationIn — request — attributes — MainAttribute — inetOrgPerson.uid
Map the following:
TriggerIn — inetOrgPerson.uid
Click Save All.
Expand the node in the Destination tree pane (the right pane) of the BPEL Mapper under Input —> Variables.
For example, AddWSDLAddOperationIn
Select request — attributes — Attributes
Select person.sn.
Click String and select String Literal from the drop-down list.
Enter the values in the String Literal and map the String Literal with person.sn.
For example, person.sn = Joe, where sn = surname and person.cn = Jane where cn = common name
Similarly, select person.cn and follow steps b and c.
Click Save All.
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.
Choose Window —> Other —> BPEL Mapper from the main menu if the BPEL Mapper window is not visible.
Expand the node in the Source tree pane (the left pane) of the BPEL Mapper under Output — Variables.
For example, AddWSDLAddOperationOut
Expand response — OperationResult.
Expand the node in the Source tree pane (the right pane) of the BPEL Mapper under Input — Variables.
For example, TriggerWSDLOperationOut
Map the following variables
For example, OperationResult — TriggerOut
Click Save All.
Click the Design tab.
The final output is as shown in the illustration.
Right-click the BPEL Module and select Clean and Build.
For example, LDAPBpelModule
The following message is displayed.
BUILD SUCCESSFUL (total time: 3 seconds). |
Click Save All.