2.85 Assign Dialog - Copy Rules Tab

Use to create a method for data manipulation, such as copying the contents of one variable to another.

Copy operations enable you to transfer information between variables, expressions, endpoints, and other elements.

You create rules by dragging and dropping nodes from the source tree on the left side to the target tree on the right side.

For more information about the assign activity, see the Business Process Execution Language for Web Services Specification (for BPEL 1.1) or the Web Services Business Process Execution Language Version 2.0 Specification at http://www.oasis-open.org.

Notes:

  • By default, the center canvas is open. If it is closed, drag the bars open to display the center canvas.

  • You can also create a mapping between source and target nodes by selecting the source node, selecting the target node, and then clicking the Add icon above the table at the bottom of the dialog. The mapping is then added to the table and the connecting line between the nodes is drawn in the tree.

Element Description

Select Insert Mode

Determines whether a newly created copy rule is inserted before the selected rule or after the selected rule.

Insert New Rule After

Select to insert a rule after the currently selected copy rule in the table at the bottom of the dialog.

Insert New Rule Before

Select to insert a rule before the currently selected copy rule in the table at the bottom of the dialog.

Expression icon Expression icon

Drag this icon to a target node to invoke the Expression Builder dialog for assigning an XPath expression to that node. You can also drag this icon to the center canvas to invoke this dialog, specify the expression, save and close the dialog, and then drag the icon to the target node.

Literal (BPEL 2.0) or XML Fragment (BPEL 1.1 icon Literal (BPEL 2.0 specification) icon or XML Fragment (BPEL 1.1 specification) icon

Drag this icon to a target node to invoke a dialog for assigning a literal (if the BPEL project supports the BPEL 2.0 specification) or XML fragment (if the BPEL project supports the BPEL 1.1 specification) to that target node. You can also drag this icon to the center canvas to invoke this dialog, specify the value, save and close the dialog, and then drag the icon to the target node.

Remove icon Remove icon

Drag this icon to a target node to create a bpelx:remove extension rule. You can also drag this icon to the center canvas to invoke this dialog, specify the rule, save and close the dialog, and then drag the icon to the target node.

Rename icon Rename icon

Drag this icon to rename a target node. This adds a bpelx:rename extension rule with an elementTo attribute. You can also drag this icon to the center canvas to invoke this dialog, specify the rule, save and close the dialog, and then drag the icon to the target node.

Recast icon Recast icon

Drag this icon to recast a target node. This adds a bpelx:rename extension rule with a typeCastTo attribute. This results in an xsi:type attribute in the XML output. You can also drag this icon to the center canvas to invoke this dialog, specify the rule, save and close the dialog, and then drag the icon to the target node.

Source and Target Trees

Drag the source node to the target node to create a BPEL copy rule from the source to the target node. This action creates a line that connects the source and target types. The copy rule is displayed in the From and To sections at the bottom of the dialog.

Note: You can also double-click the appropriate literals, XML fragments, renames, or recasts icon in the center canvas to edit that object. Alternatively, double-click the From element for the rule or right-click a rule and select the edit option to edit these objects.

Change rule type (BPEL 1.1 only)

Use to change the type of the selected rule to one of the BPEL extension rules (bpelx:copyList, bpelx:append, bpelx:insertAfter, or bpelx:insertBefore).

Note: In BPEL 2.0, you must right-click the rule context menu and select Change rule type to access the BPEL extension rules.

Copy

Use to copy the contents of one type to another type. This is the default selection. For an assignment to be valid, the data referenced in the From and To sections selections must be of compatible types. For example:

  • The From variable selection and To variable selection are both of a Web Services Description Language (WSDL) message type. In this case, both variables must be of the same message type. Two message types are said to be equal if their qualified names (QNames) are the same.

  • The From variable selection is a WSDL message type and the To variable selection is not, or vice versa. This is illegal because parts of variables, selections of variable parts, or endpoint references cannot be directly assigned to and from variables of WSDL message types.

  • In all other cases, the types of the source and destination are XML schema types or elements, and the constraint is that the source value must possess the element or type associated with the destination. This does not require the types associated with the source and destination to be the same. In particular, the source type can be a subtype of the destination type. In the case of variables defined by reference to an element, both the source and the target must be the same element.

CopyList

Use to perform a CopyList operation of the contents of one type to another type. The From selection (from-spec) can yield a list of either all attribute nodes or all element nodes. The To selection (to-spec) can yield a list of L-value nodes: either all attribute nodes or all element nodes. All the element nodes returned by the To selection must have the same parent element. If the To selection returns a list of element nodes, all element nodes must be contiguous. If the From selection returns attribute nodes, then the To selection must return attribute nodes. Likewise, if the From selection returns element nodes, then the To selection must return element nodes. Otherwise, a bpws:mismatchedAssignmentFailure fault is thrown. The From selection can return zero nodes, while the To selection must return at least one node. If the From selection returns zero nodes, the effect of the CopyList operation is similar to the remove operation. The CopyList operation provides the following features:

  • Removes all the nodes pointed to by the To selection.

  • If the To selection returns a list of element nodes and there are leftover child nodes after removal of those nodes specified by the To selection, the nodes returned by the From selection are inserted before the next sibling of the last element specified by the To selection. If there are no leftover children nodes, an append operation is performed.

  • If the To selection returns a list of attribute nodes, those attributes are removed from the parent element. Then, the attributes returned by the From selection are appended to the parent element.

Append

Use to append the contents of one type to another type. The From selection (from-spec) of the append operation yields zero or more nodes. The node list is appended as child nodes to the target node specified by the To selection (to-spec). If the From selection yields a zero node, a bpel:selectionFailure fault is generated. The To selection must yield a single L-Value element node. Otherwise, the same fault error is also generated. The To selection cannot refer to a partner link.

InsertAfter

Use to insert the contents of one type after another type's contents. This operation is similar to the functionality for the Insert-Before operation, except for the following issues:

  • If multiple L-Value nodes are returned by the To selection (to-spec), the last node is used as the reference node.

  • Instead of inserting nodes before the reference node, the source nodes are inserted after the reference node.

InsertBefore

Use to insert the contents of one type before another type's contents. The From selection (from-spec) of the insert-before operation yields zero or more nodes. The node list is appended as child nodes to the target node specified by the To selection (to-spec). The To selection of the insert-before operation points to one or more single L-Value nodes. If more than one node is returned, the first node is used as the reference node. The reference node must be an element node. The parent of the reference node must also be an element node. Otherwise, a bpel:selectionFailure fault is generated. The node list generated by the From selection is inserted before the reference node. The To selection cannot refer to a partner link.

From XPath Field and To XPath Field

Displays the rules that you created in the tree. Place your cursor over the icon to the left of the source type to display the operation being performed (for example, copy, append, and so on). Each operation type is represented by a different icon. You can right-click a copy rule to display a list of actions to perform.

Note: In BPEL 1.1, you can edit XPath values when the created copy rule contains a query for the source node in the From XPath field and edit XPath values when the created copy rule contains a query for the target node in the To XPath field.

Edit 'From' Expression or Edit 'To' Expression

Select this option to edit XPath expression values when the created copy rule contains a query for the source or target node. This selection invokes the Expression Builder dialog. The menu option that displays is based on the current content of your copy rule selection.

ignoreMissingFromData

Select this option to toggle the ignoreMissingFromData attribute on the copy rule on and off. When toggled on, this suppresses any bpel:selectionFailure standard faults.

insertMissingToData

Select this option to toggle the insertMissingToData attribute on the copy rule on and off.

keepSrcElementName (BPEL 2.0)

Select this option to toggle the keepSrcElementName attribute on the copy rule on and off. This enables you to replace the element name of the destination (as selected by the to-spec) with the element name of the source. This attribute is only available in BPEL version 2.0 projects.

Change rule type (BPEL 2.0)

Use to change the type of the selected rule to one of the BPEL extension rules: bpelx:copyList, bpelx:append, bpelx:insertAfter, or bpelx:insertBefore.

Create rule from selected node icon

Create a mapping between source and target nodes in the tree by selecting the source node, selecting the target node, and then clicking the Add icon. The mapping is then added to the table and the connecting line between the nodes is drawn in the tree.

Delete selected rule icon

Click to delete the selected rule. You can also use the Delete key on your keyboard.

Move selected rule up in list icon

Click to move the selected rule up in the list.

Move selected rule down in list icon

Click to move the selected rule down in the list.

Related Topics

Manipulating XML Data with bpelx Extensions in Developing SOA Applications with Oracle SOA Suite

How to Use Assign Extension Attributes in Developing SOA Applications with Oracle SOA Suite

Introduction to Manipulating XML Data in BPEL Processes in Developing SOA Applications with Oracle SOA Suite

Copying Between Variables in Developing SOA Applications with Oracle SOA Suite

Invoking a Synchronous Web Service in Developing SOA Applications with Oracle SOA Suite

BPEL Process Activities and Services in Developing SOA Applications with Oracle SOA Suite