Creating an Assign

The Assign activity is a light-weight mapping tool. Like a map, the properties for Assign require that you specify a source and target. Using Assign, you can:

Assign provides two types of data modification:

To create an Assign:

  1. Create a business process service.

  2. In your business process, select the Business Process tab.

  3. Click on the Business Process canvas to activate the Tool Palette.

    Note

    If the Tool Palette does not appear in the perspective or on the Fast View shortcut bar, open the Tool Palette.

  4. Select the Activities tool palette and drag and drop the Assign activity onto the canvas.

  5. Either expand Properties in the Business Process Logic Page or open the Properties Panel view.

  6. To change the assign type, from the Assign Overview tab, in the Type column, click in the cell of the Assign that you want to change, then click the arrow that appears to open the Type drop-down list.

    Note

    If you are using a complex parameter, you must change the type from Assign to Graft.

  7. Select one of the following:

    Assign Functions

    FunctionDescription

    Assign

    Use the Assign function to map data. If the source and target are leaf element nodes, the Assign type is based on the value of the single element specified as the target. If source and target are operation parameters, the Assign type action is actually a graft-like deep copy that transfers all child elements, with their data values, from the target structure to the source structure. Use this function when parameters have identical definitions.

    Graft

    Use the Graft function to transfer a subset of the source structure to the target structure when the source and target elements have the same namespaces. This action can be used to combine several document instances into a single document instance, aggregating an entire tree of elements. To map individual source elements, see Creating a Transformation Service.

    Graft Children

    Use the Graft Children function to transfer a set of children from the source structure to the target structure when the source and target elements have the same namespaces. This action can be used to combine several child document instances into a single child document instance, excluding the source element itself. To map individual child elements, see Creating a Transformation Service.

    Prune

    Use the Prune function to delete elements from the target structure, including all the child elements of a specified element.

  8. Click in the Source column and click .

    The Variable Reference Dialog appears.

    Note

    As an alternative, you can drag and drop variables from the Variables section to the appropriate fields in Properties.

  9. Select one of the following:

    • Variable

      Click Select. The Variable Selection Dialog appears. Select the variable that you want to use and click OK.

      Note

      The source in an Assign must be a simple type or an XSD complex or simple type to invoke the Expression editor. A complex parameter cannot be used to create an XPath.

    • Literal

      Type the literal in the text box.

  10. Click OK.

    The variable or literal you selected now appears in the Source column.

  11. Click in the Target column and click .

    The Variable Reference Dialog appears.

  12. Select the variable that you want to use and click OK.

  13. Click OK.

  14. Repeat step 6 through step 13 to add multiple types, sources, and targets.

  15. To change the execution order, use the Move Up and Move Down buttons.

    Operations are executed in the order specified, from first to last.

Note

If you are creating an Assign for a Database service in a Business Process service, to catch faults, create a Fault Handler.

Using an Assign to Specify an Instance of a Repeating Element

Acting on Repeating Elements in Data

Working with XPath Functions in Assign Operations

Using the XPath Work Area

Variables

How Boolean Works in XPath Functions

Send your feedback on this help topic to Sybase Tech Pubs: pubs@sybase.com