LDAP Binding Component Tutorial

Creating a BPEL Process

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.

ProcedureTo Create a BPEL Process

  1. 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.

    BPEL Process
  2. Type the Filename in the File Name field.

    For example, AddBPELProcess

  3. Click Finish.

    BPEL Process WSDL
    Note –
    • 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.


ProcedureTo Add a Partner Link

  1. 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.

    Trigger WSDL Created
  2. 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.

    AddWSDL Created

ProcedureTo Add a Web Service and Basic Activities

Drag and Drop the following Web Services:

Drag and Drop the Basic Activities : Assign.

  1. Select the Web Service : Receive in the Web Service section of the Palette.

  2. 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.

    Visual Clues

    This action places a Web Service Receive called Receive1 in the Design view.

  3. 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.

  4. Drag the selection to the AddBPELProcess box in the design area, between the Process Start and the Process End activities.


    Note –

    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.


    Note –

    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.


    Edit Enabled

ProcedureTo Edit the Web Service : Receive1

  1. Click Web Service — Receive1 and click Edit.

    This opens the Receive1 [Receive] - Property Editor.

  2. Select the properties of this service from the Main tab. Select PartnerLink1.

    The Operation drop-down list refreshes to display TriggerWSDLOperation.

    Trigger Receive Editor
  3. 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.

    Input Variable
    Note –
    • All the fields are populated with the assigned values.

      The Input Variable is TriggerWSDLOperationIn

    • Create Instance check-box is checked, by default.


    Receive Property
  4. Click OK to close the Receive1 [Receive] - Property Editor.

  5. Save the project.

    Receive Edit Map

ProcedureTo Edit the Web Service : Invoke1

  1. Click Web Service — Invoke1 and click Edit.

    This opens the Invoke1 [Invoke] - Property Editor.

  2. Select the properties from the Main tab. Select PartnerLink2 from the drop-down list.

    The Operation drop-down list refreshes to display AddWSDLAddOperation.

    Invoke Property Dialog
  3. Follow these steps to create a new input and an output variable.

    1. Click the Create button next to the Input Variable field.

      This opens the New Input Variable dialog box.

      New Input Variable

      The Name, Type, and Scope variable fields are refreshed with their default values.

      You can also change the value in the Name field.

    2. Click OK to close the New Input Variable dialog box.

    3. Click the Create button next to the Output Variable field.

      This opens the New Output Variable dialog box.

      New Output Variable

      The Name, Type, and Scope variable fields are refreshed with their default values.

      You can also change the value in the Name field.

    4. Click OK to close the New Output Variable dialog box.


    Note –

    All the fields are populated with the assigned values.

    Select the following Variables:

    • Input Variable : AddWSDLAddOperationIn

    • Output Variable : AddWSDLAddOperationOut


    Invoke Property Editor
  4. Click OK to close the Invoke1 [Invoke] - Property Editor.

  5. Save the project.

    Invoke Edit Map

ProcedureTo Edit the Web Service : Reply1

  1. Click Web Service : Reply1. Click Edit.

    This opens the Reply1 [Reply] - Property Editor.

  2. Select the properties from the Main tab. Select PartnerLink1 from the drop-down list.

    The Operation drop-down list refreshes to display TriggerWSDLOperation.

    Reply Property Editor
  3. Follow the steps to create a New Output Variable.

    1. Make sure to select the Normal Response radio button.

    2. Click the Create button next to the Output Variable field.

      This opens the New Output Variable dialog box.

      Trigger New Output
    3. Change the value in the Name field. This is optional.

      TriggerWSDLOperationOut is displayed, by default.

    4. Click OK.

      Reply1 Property Editor
  4. Click OK to close the Reply1 [Reply] - Property Editor.

    Final Mapper

ProcedureTo Edit the Basic Activities : Assign1

  1. Double-click the Basic Activity : Assign1.

    This displays the BPEL Mapper window.


    Note –

    Choose Window —> Other —> BPEL Mapper from the main menu if the BPEL Mapper window is not visible.


  2. 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.

  3. 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.

  4. Select the node in the Source tree pane. Drag the selection and map it to the node in the Destination tree pane.

    For example,

    1. Source tree pane: TriggerWSDLOperationIn — Trigger1n

    2. Destination tree node: AddAddOperationIn — request — attributes — MainAttribute — inetOrgPerson.uid

    Map the following:

    TriggerIninetOrgPerson.uid

    Map Trigger In
  5. Click Save All.

  6. Expand the node in the Destination tree pane (the right pane) of the BPEL Mapper under Input —> Variables.

    For example, AddWSDLAddOperationIn

    1. Select request — attributes — Attributes

      1. Select person.sn.

      2. Click String and select String Literal from the drop-down list.

        String Literal
      3. 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


      Note –

      Similarly, select person.cn and follow steps b and c.


    String Literal Mapper
  7. Click Save All.

  8. Click the Design tab.


    Note –

    A red icon marked against Basic Activities — Assign1 is not shown.


    Assign1 Cleared

ProcedureTo Edit the Basic Activities : Assign2

  1. Double-click the Basic Activity : Assign2.

    This displays the BPEL Mapper window.


    Note –

    Choose Window —> Other —> BPEL Mapper from the main menu if the BPEL Mapper window is not visible.


  2. Expand the node in the Source tree pane (the left pane) of the BPEL Mapper under Output — Variables.

    For example, AddWSDLAddOperationOut

    Expand response — OperationResult.

  3. Expand the node in the Source tree pane (the right pane) of the BPEL Mapper under Input — Variables.

    For example, TriggerWSDLOperationOut

  4. Map the following variables

    For example, OperationResult — TriggerOut

  5. Click Save All.

    Assign2 Mapper
  6. Click the Design tab.

    The final output is as shown in the illustration.

    Final Mapper
  7. Right-click the BPEL Module and select Clean and Build.

    For example, LDAPBpelModule

    The following message is displayed.


    BUILD SUCCESSFUL (total time: 3 seconds).
    Clean and Build
  8. Click Save All.