Creating an Assign

The Assign activity is a light-weight mapping tool.

  1. Create a service with a business process endpoint binding.
  2. In the Service editor, select the Business Process tab.
  3. Right-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. Expand Properties in the Business Process Logic page.
  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:
    Function Description
    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 ellipsis Ellipsis icon.
    Note: As an alternative, you can drag and drop variables from the Variables section to the appropriate fields in Properties.

    The Variable Reference Dialog appears.

  9. Select one of the following:
    Option Action
    Variables
    1. Click Select.

      The Variable Selection Dialog opens.

    2. 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. 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 ellipsis Ellipsis icon.

    The Variable Reference Dialog opens.

  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.
Related concepts
Assign Activities
Related tasks
Using an Assign to Specify an Instance of a Repeating Element
Working with XPath Functions in Assign Activities
Related reference
How Boolean Functions Work in XPath Functions

Send your feedback on this help topic to Sybase Technical Publications: pubs@sybase.com

Your comments will be sent to the technical publications staff at Sybase, Inc. For product-related issues or technical support, contact Sybase Technical Support at 1-800-8SYBASE.