Friday, 6 July 2012

Assign Activity in BPEL 11g

Assign Activity in BPEL


This activity provides 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.

Figure A-2 shows the Copy Rules tab of the Assign dialog for BPEL 1.1. You 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.

Figure A-2 Copy Rules Tab of Assign Activity Dialog


The Select Insertion Mode list above the source node section enables you to insert the next copy rule you create either after or before the rule selected at the bottom of the dialog.
Icons display above the target node that enable you to perform the following tasks (from left to right) on target nodes.

·      Expression icon: Drag this icon to a target node to invoke the Expression Builder dialog for assigning an XPath expression to that node.
·       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.
·        Remove icon: Drag this icon to a target node to create a bpelx:remove extension rule.
·     Rename icon: Drag this icon to rename a target node. This adds a bpelx:rename extension rule with an elementTo attribute.
·      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 change a selected copy rule to a bpelx extension type (bpelx:copyList, bpelx:insertAfter, bpelx:insertBefore, or bpelx:append).

The method of selection differs between BPEL 1.1 and BPEL 2.0.

Figure A-3 shows how you select an extension type in BPEL 1.1. You select a copy rule, select the Copy dropdown list, and then select the appropriate extension.

Figure A-3 Copy Rule Converted to bpelx Extension in BPEL 1.1


Figure A-4 shows how you select an extension type in BPEL 2.0. You right-click a copy rule, select Change rule type, and then select the appropriate extension.
Figure A-4 Copy Rule Converted to bpelx Extension in BPEL 2.0


In the From and To XPath fields, you can also 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 also right-click a copy rule to display a list of actions to perform:
·    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(in BPEL 2.0 projects only): Select this option to toggle the keepSrcElementName attribute on the copy rule on and off. This option enables you to replace the element name of the destination (as selected by the to-spec) with the element name of the source.
·     Change Rule Type (in BPEL 2.0 projects only): Select this option to change the type of the selected rule to one of the BPEL extension rules: bpelx:copyList, bpelx:insertAfter, bpelx:insertBefore, or bpelx:append.
·        Delete rule: Select this option to delete the selected rule.

The icons above the To section enable you to delete, move up, and move down a selected copy rule.

Note:
If an assign activity contains multiple bpelx:append settings, it must be split into two assign activities. Otherwise, bpelx:append is moved to the end of the list each time, which can cause problems. As a work around, move it manually.

Reactions:

0 comments:

Post a Comment