How to Assign Boolean Values

Manipulating XML Data in a BPEL Process 6-21 Example 6–35 shows how the formatDate function works in BPEL 2.0. Example 6–35 formatDate Function in BPEL 2.0 assign copy fromora:formatDate2005-06-10T15:56:00,MMM dd, yyyyfrom tooutput.payloadformattedDateto copy assign

6.13 Manipulating Attributes

You can copy to or from something defined as an XML attribute. An at sign in XPath query syntax refers to an attribute instead of a child element.

6.13.1 How to Manipulate Attributes

The code in Example 6–36 fetches and copies the custId attribute from this XML data: Example 6–36 custId Attribute Fetch and Copy Operations invalidLoanApplication xmlns=http:samples.otn.com application xmlns = http:samples.otn.comXPathautoloan customer custId = 111 name Mike Olive name ... customer ... application invalidLoanApplication The BPEL 1.1 code in Example 6–37 selects the custId attribute of the customer field and assigns it to the variable custId: Example 6–37 custId Attribute Select and Assign Operations in BPEL 1.1 assign -- get the custId attribute and assign to variable custId -- copy from variable=input part=payload query=tns:invalidLoanApplicationautoloan:application autoloan:customercustId to variable=custId copy assign Example 6–38 shows the equivalent syntax in BPEL 2.0 for selecting the custId attribute of the customer field and assigning it to the variable custId: Example 6–38 custId Attribute Select and Assign Operations in BPEL 2.0 assign copy frominput.payloadautoloan:applicationautoloan:customercustIdfrom 6-22 Oracle Fusion Middleware Developers Guide for Oracle SOA Suite tocustIdto copy assign The namespace prefixes in this example are not integral to the example. The WSDL file defines a customer to have a type in which custId is defined as an attribute, as shown in Example 6–39 : Example 6–39 custId Attribute Definition complexType name=CustomerProfileType sequence element name=name type=string ... sequence attribute name=custId type=string complexType

6.14 Manipulating XML Data with bpelx Extensions

You can perform various operations on XML data in assign activities. The bpelx extension types described in this section provide this functionality. In Oracle BPEL Designer, you can add bpelx extension types at the bottom of the Copy Rules tab of an Assign dialog. After creating a copy rule, you select it and then choose a bpelx extension type from the dropdown list in BPEL 1.1 or the context menu in BPEL 2.0. This changes the copy rule to the selected extension type. In BPEL 1.1, you select an extension type from the dropdown list, as shown in Figure 6–6 . Figure 6–6 Copy Rule Converted to bpelx Extension in BPEL 1.1 In BPEL 2.0, you select an extension type by right-clicking the copy rule, selecting Change rule type , and then selecting the extension type, as shown in Figure 6–7 .