8.3 Moving Data to and from the Integration Activity

  1. Create form fields to allow users to provide input to the Web service accessed by the Integration activity (see Section 5.0, Creating Forms for a Provisioning Request Definition). For example, if you are working with a Web service that provides stock quotes, you need a field for the user to specify a stock symbol.

  2. To move user input from the form to the workflow, create a flowdata variable in an activity that precedes the Integration activity in the workflow.

    See Section 6.5.3, Understanding Workflow Data for information about creating flowdata variables.

    For example, if you have created a form field called “symbol” to accept a stock symbol for input to the Web service, you would go to the post-activity data item mapping for the activity associated with the form that contains the symbol field, then you would map the symbol field to a flowdata variable (for example, flowdata.symbol).

  3. In the Workflow tab, right-click the icon for the Integration activity, then choose Show Data Item Mapping.

    The Data Item Mapping tab is displayed.

  4. In the Data Item Mapping view, click Pre-Activity.

    In the Web Service Input Field grid, you should see fields that match all of the input fields associated with the port type and operation specified in Step 9 and Step 10.

    The integration activity automatically selects all of the input field associated with the port type and operation. You can remove the input fields or modify properties of the input fields by following this procedure:

    1. Click Mapping.

      The Sample Document dialog box is displayed.

    2. Expand the nodes of the sample document and deselect any input fields that you want to remove.

    3. If an input field is an unbounded element, right-mouse and select Occurs.

    4. Type the maximum number in the Enter Repeats dialog, and click OK

    5. Click OK to return to the Data Item Mapping view.

  5. For each Web Service Input Field, click in the Source Expression field, then click the ECMA expression builder button.

    The ECMA expression builder is displayed.

  6. Expand the flowdata node in the Ecmascript Variables pane of the ECMA expression builder, then double-click the flowdata variable for the user input to the Web service.

  7. Click OK to return to the Data Item Mapping view.

  8. Click Post Activity.

    In the Web Service Output Field grid, you should see fields that match all of the output fields associated with the port type and operation specified in Step 9 and Step 10.

  9. The Integration activity automatically selects all of the output fields associated with the port type and operation. If you want to remove some of the output fields, follow these steps:

    1. Click Mapping.

      The Sample Document dialog box is displayed.

    2. Expand the nodes of the sample document and deselect any attributes that you want to remove.

    3. Click OK to return to the Data Item Mapping view.

  10. Click Map All to automatically create flowdata variables for each Web Service Output Field.

    Alternatively, for each Web Service Output Field, click in the Source Expression field, then click the ECMA expression builder button.

  11. Expand the flowdata node in the Ecmascript Variables pane of the ECMA expression builder, then double-click the flowdata variable that will receive data from the Web service.

  12. Click OK to close the ECMA expression builder.

    Now you can work in the Integration view to test and refine the interaction with the Web service.