Adding an Assign activity

This step is to configure three Assign activities to:

  1. Set the header details.

    Note: You need to populate certain variables in the BPEL process for ServiceBean_Header elements to pass values that may be required to embed applications context into SOAP envelopes for Web service authorization. These ServiceBean_Header elements for Business Service Object interface type are RESPONSIBILITY_NAME, RESPONSIBILITY_APPL_NAME, SECURITY_GROUP_NAME, NLS_LANGUAGE, and ORG_ID.

    Detailed information on how to set ServiceBean_Header for the SOAP request, see Assigning ServiceBean_Header Parameters.

  2. Pass the purchase order details read from the File Adapter as an input to the second Invoke activity for PurchaseOrderService partner link.

  3. Pass single purchase order approval information to the requestor through the dummy Reply activity.

To add the first Assign activity to pass header details:

Assigning ServiceBean_Header Parameters:

  1. In Oracle JDeveloper, expand the BPEL Constructs from the Component Palette. Drag and drop the Assign activity into the center swim lane of the process diagram between the two Invoke activities you just created earlier.

  2. Double-click the Assign activity to access the Edit Assign dialog box.

  3. Click the General tab to enter the name for the Assign activity, such as 'SetServiceBeanHeader'.

  4. Select the Copy Rules tab and expand the target trees:

    Drag the Expression icon to connect to the target node (ns5:RESPONSIBILITY_NAME) that you just identified. This creates a line that connects the source and target nodes. The copy rule is displayed in the From and To sections at the bottom of the Edit Assign dialog box.

  5. Enter second pair of parameters by clicking the Expression icon to invoke the Expression Builder dialog.

    Drag the Expression icon to connect to the target node (ns5:RESPONSIBILITY_APPL_NAME) that you just identified. This creates a line that connects the source and target nodes. The copy rule is displayed in the From and To sections at the bottom of the Edit Assign dialog box.

  6. Enter third pair of parameters by clicking the Expression icon to invoke the Expression Builder dialog.

    Drag the Expression icon to connect to the target node (ns5:SECURITY_GROUP_NAME) that you just identified. This creates a line that connects the source and target nodes. The copy rule is displayed in the From and To sections at the bottom of the Edit Assign dialog box.

  7. Enter the fourth pair of parameters by clicking the Expression icon to invoke the Expression Builder dialog.

    Drag the Expression icon to connect to the target node (ns5:NLS_LANGUAGE) that you just identified. This creates a line that connects the source and target nodes. The copy rule is displayed in the From and To sections at the bottom of the Edit Assign dialog box.

  8. Enter the fifth pair of parameters by clicking the Expression icon to invoke the Expression Builder dialog.

    Drag the Expression icon to connect to the target node (ns5:ORG_ID) that you just identified. This creates a line that connects the source and target nodes. The copy rule is displayed in the From and To sections at the bottom of the Edit Assign dialog box.

  9. Click Apply and then OK to complete the configuration of the Assign activity.

To enter the second Assign activity to pass PO details to the InvokePOService Invoke activity:

  1. In Oracle JDeveloper BPEL Designer, drag and drop the second Assign activity from the BPEL Constructs into the center swim lane of the process diagram, between the first Assign and Invoke activities.

  2. Double-click the Assign activity to access the Edit Assign dialog box.

  3. Click the General tab to enter the name for the Assign activity, such as 'SetPOApproval'.

  4. Select the Copy Rules tab and expand the target trees:

    Drag the source node (poNumber) to connect to the target node (poNumber) that you just identified. This creates a line that connects the source and target nodes. The copy rule is displayed in the From and To sections at the bottom of the Edit Assign dialog box.

  5. Click Apply and then OK to complete the configuration of the Assign activity.

To enter the third Assign activity to set the SOAP response to output:

  1. Add the third Assign activity by dragging and dropping the Assign activity into the center swim lane of the process diagram, between the InvokePOService Invoke and the Replyoutput activities.

  2. Repeat Step 2 to Step 3 described in creating the first Assign activity to add the second Assign activity called 'SetPOStatus'.

  3. Select the Copy Rules tab and expand the source and target trees:

    Drag the source node (body) to connect to the target node (payload) that you just identified. This creates a line that connects the source and target nodes. The copy rule is displayed in the From and To sections at the bottom of the Edit Assign dialog box.

  4. Click Apply and then OK to complete the configuration of the Assign activity.

Configuring Web Service Policies

Use the following steps to add a security policy at design time:

  1. Navigate to SOA Content > Business Rules > composite.xml. Right click on the PurchaseOrderService service and select "Configure WS Policies" from the drop-down list.

  2. The Configure SOA WS Policies dialog appears.

    In the Security section, click the Add icon (+). The Select Server Security Policies dialog appears.

    Select 'oracle/wss_username_token_service_policy' and click OK.

    The attached security policy is shown in the Security section.

  3. From the navigation menu, select View > Property Inspector to display the Property Inspector window for PurchaseOrderService service component.

    In the Properties section, click the Add icon (+) for binding properties. The Create Property dialog appears.

    Enter 'oracle.webservices.auth.username' in the Name field and enter 'operations' as the value.

    Click OK.

  4. Use the same approach by clicking the Add icon (+) again in the Properties section for binding properties. Enter 'oracle.webservices.auth.password' in the Name field. Enter the associated password for user 'operations' in the Value field.

    Click OK.

    Both selected property names and values appear in the Properties section.