Assign Assign

The Assign activity can copy data from one variable to another, copy fixed values into variables, or copy the results of an XPath expression into a variable.

You can use XPath expressions to select specific parts of variables or compute values.

The Assign activity can contain one or more copy rules. The Assign is a parent for copy activities that contain ‘from’ and ‘to’ sub-elements.

To add an Assign activity to the process:

  1. From the palette, drag an Assign activity to the BPEL Editor.

  2. In the Properties view, click cross to open the Create Copy Rule dialog box.
    Copy rules are made up of two parts: a ‘From’ and a ‘To’. The Assign activity copies a value from the source to the destination using the Copy element.

  3. From the From section drop down list, select the type of variable you want to use.

    arrowWhat do the different variable types do?

  4. In the To section, select a type from the drop down list. The To complex XML type must be compatible with the From XML type. This means that complex XML types must be similarily defined in the schema.
    As you make your selections, the copy rule displays at the bottom of the Copy Rule dialog box.

  5. Click OK.

    The completed copy rule is listed in the Copy Rules section of the Details tab in the Properties view. You can add multiple Copy operations to an Assign and they will be executed in the order they are listed here. You can re-order the list using the UP arrow in the right-hand toolbar.

Related Topics
Bullet Understanding Activities
Bullet Using Variables
Bullet What is a Partner Link?