The Assign section is probably one of the more complex pages in the BPEL Designer, due to the nature of the BPEL Assign activity. The figure below shows the detail tab of an empty Assign activity with callouts describing each component:
Assign
The following figure shows the detail tab of an Assign activity which has an XPath expression as the source ( From ) and a process variable element as the target (To):
Assign
A requirement of the BPEL language is that all complex variables must be initialized with valid XML before they are referenced either as a target of an assignment, or in another BPEL activity. The BPEL Designer understands this and, once you have selected the target of an assignment operation, it will ask if you would like to have an XML fragment generated for the target variable:
Assign
Unless you are certain that the variable has been initialized during a previous assignment operation or other activity, you should click Yes . The figure below shows the Assign details tab after the initializer has been generated:
Assign
Additional type selection or data entry widgets will appear below the From and To combo boxes, depending on the source and target item categories selected in the combo boxes. Initially these will be controls for the selection of process variables, since the default combo box selection is Variable. The possible source and target categories are described in the following table:
Possible source and target categories
Category | Control type | Can be source? | Can be target? | Further information |
---|---|---|---|---|
Variable | Tree | Yes | Yes | Select an in-scope variable or any portion if it is a complex variable. The target of the assignment must have the same type (for simple variables) or structure (for complex variables) as the source. |
Expression | XPath | Yes | Yes | Enter a valid XPath expression with the XPath editor. For targets, the expression must resolve to an L-Value; that is, it must be a variable reference. |
Fixed Value | Text | Yes | No | Enter a valid XML fragment that is compatible in structure and data type with the target. |
Property of a Variable | List | Yes | Yes | N/A |
Partner Link reference | List | Yes | Yes | N/A |
Endpoint reference | List | Yes | No | N/A |
Opaque | None | Yes | No | N/A |