Using Assign

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 types:

    • Assign

      Assign enables data mapping. 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 parameters of operations, the Assign type action is actually a graft-like deep copy that transfers all child elements, with their data values, from the target to the source. This should only be used when the parameters are identical in definition.

    • Graft

      Use Graft to transfer a subset of the source structure into the target structure, including the source element. After the Graft operation, the structure of the source must match the definition of the target variable to insure that it is usable by other activities downstream in the business process. The graft action is based on a tree of elements and does not support calling functions on individual elements. That type of data-enrichment requires a map.

    • Graft Children

      Use Graft Children to transfer a subset of the source structure into the target structure, excluding the source element and copying only the child elements of the source element. After the Graft Children operation, the structure of the target must match the definition of the target variable to insure that it is usable by other activities downstream in the business process. The graft action is based on a tree of elements, and does not support calling functions on individual elements. That type of data-enrichment requires a map.

    • Prune

      Prune enables the deletion of elements from the target, including the specified element and all child elements.

  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

Working with XPath Functions in Assign Operations

Using the XPath Work Area

Assign

Variables

How Boolean Works in XPath Functions

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