How to Use bpelx:insertAfter

6-28 Oracle Fusion Middleware Developers Guide for Oracle SOA Suite Figure 6–8 Remove Icon in Copy Rules Tab of an Assign Activity After releasing the cursor, the bpelx:remove extension is applied to the target variable. Figure 6–9 provides details. Figure 6–9 bpelx:remove Extension Applied to a Target Variable

6.14.4.1 bpelx:remove in BPEL 1.1

Example 6–53 provides an example of bpelx:remove in a BPEL project that supports BPEL version 1.1. Example 6–53 bpelx:remove Extension in BPEL 1.1 bpel:assign bpelx:remove bpelx:target variable=ncname part=ncname? query=xpath_str bpelx:remove bpel:assign Node removal specified by the XPath expression is supported. Nodes specified by the XPath expression can be multiple, but must be L-Values. Nodes being removed from this parent can be text nodes, attribute nodes, and element nodes. The XPath expression can return one or more nodes. If the XPath expression returns zero nodes, then a bpel:selectionFailure fault is generated. The syntax of bpelx:target is similar to and a subset of to-spec for the copy operation. Example 6–54 shows addrVar with the following value: Example 6–54 addrVar a:usAddress a:addressLine500 Oracle Parkwaya:addressLine a:addressLineMailstop 1op6a:addressLine a:stateCAa:state a:zipcode94065a:zipcode a:usAddress After executing the syntax shown in Example 6–55 in the BPEL process service component file, the second address line of Mailstop is removed: Manipulating XML Data in a BPEL Process 6-29 Example 6–55 Removal of Second Address Line bpel:assign bpelx:remove target variable=addrVar query=a:usAddressa:addressLine[2] bpelx:remove bpel:assign After executing the syntax shown in Example 6–56 in the BPEL process service component file, both address lines are removed: Example 6–56 Removal of Both Address Lines bpel:assign bpelx:remove target variable=addrVar query=a:usAddressa:addressLine bpelx:remove bpel:assign

6.14.4.2 bpelx:remove in BPEL 2.0

Example 6–57 provides an example of bpelx:remove syntax in a BPEL project that supports BPEL version 2.0. In BPEL 2.0, the functionality is the same as described in Section 6.14.4.1, bpelx:remove in BPEL 1.1, but the syntax is slightly different. An extensionAssignOperation element wraps the bpelx:remove. Example 6–57 bpelx:remove Extension in BPEL 2.0 assign extensionAssignOperation bpelx:remove bpelx:targetncname.ncnamexpath_strbpelx:target bpelx:remove extensionAssignOperation assign

6.14.5 How to Use bpelx:rename and XSD Type Casting

The bpelx:rename extension in an assign activity enables a BPEL process service component to rename an element through use of XSD type casting. In Oracle BPEL Designer, you add the bpelx:rename extension by dragging the rename icon in the upper right corner of the Copy Rules tab to the target variable you want to remove, and releasing the cursor. The rename icon displays to the right of the remove icon shown in Figure 6–8 . After releasing the cursor, the Rename dialog is displayed for renaming the target variable.

6.14.5.1 bpelx:rename in BPEL 1.1

Example 6–58 provides an example of bpelx:rename in a BPEL project that supports BPEL version 1.1. Example 6–58 bpelx:rename Extension in BPEL 1.1 bpel:assign bpelx:rename elementTo=QName1? typeCastTo=QName2? bpelx:target variable=ncname part=ncname? query=xpath_str bpelx:rename bpel:assign