ActiveVOS Designer User’s Guide
The following example shows the effect of enabling both Disable bpel:selectionFailure Fault (BPEL4WS 1.1 processes: bpws:selectionFailure) and Auto Create Target Path for Copy/To options.
For details on WS-BPEL 2.0 processes, see Using the ActiveVOS Create XPath Extension and Using the ActiveVOS Disable Selection Failure Fault Extension.
For a description of these BPEL4WS 1.1 preferences, see Simulation Preferences.
Code sample:
<assign>
<copy>
<from part=”OrderInfo” query="/ns1:OrderInfo
/ns1:OrderHeader/ns1:BillToInfo/ns1:Addr1"
variable=”var1”/>
<to part=”OrderInfo” query="/ns1:OrderInfo
/ns1:OrderHeader/ns1:BillToInfo/ns1:Addr1"
variable=var2”/>
</copy>
</assign>
In the code sample, the Assign From/To query is for an optional element, as shown in the schema snippet below.
|
Var1 Sample Data |
Var1 and Var2 Schema Snippet |
|---|---|
<ns1:OrderInfo xmlns:ns1="http:// temp.com"> <ns1:OrderHeader> <ns1:OrdId>78</ns1:OrdId> <ns1:BillToInfo> <ns1:Name>Name1</ns1:Name> (Addr1 is missing) <ns1:Addr2>1 Main St </ns1:Addr2> <ns1:City>Albany</ns1:City> <ns1:St>NY</ns1:St> <ns1:Zip>12012</ns1:Zip> <ns1:Cntry>USA</ns1:Cntry> </ns1:BillToInfo> ... |
<xs:complexType name="AddressInfoType"> <xs:sequence> <xs:element ref="ord:Name"/> <xs:elementref="ord:Addr1"minOccurs="0"/> <xs:element ref="ord:Addr2" /> <xs:element ref="ord:City"/> <xs:element ref="ord:St"/> <xs:element ref="ord:Zip"/> <xs:element ref="ord:Cntry" /> </xs:sequence> </xs:complexType> <xs:element name="BillToInfo" type="ord:AddressInfoType"/> |
With Disable bpws:selectionFailure Fault and Auto Create Target Path for Copy/To enabled, the process terminates normally because the empty selection node is allowed, and the location path to the empty selection is built. A null value is added to Addr1 during the assignment.
Copyright (c) 2004-2009 Active Endpoints, Inc.