Designer > Simulation and Debugging > Simulation Preferences
  

Simulation Preferences

Set preferences for variable handling during simulation.
When you simulate execution of a process in Process Developer, the simulation engine behaves identically to the server engine, where your deployed processes run. You can set preferences to modify the server engine behavior, and you can set the same preferences for the simulation engine.
To learn more about setting server engine behavior, refer to the Process Server documentation.
Select Window > Preferences > Process Developer > Simulation to view simulation preferences, described in the following table.
Simulation Preference
Description
Validate input/output messages against schema
Validates the sample data loaded into process variables against the WSDL schema. If you add a sample data file to a complex message, and the data file is not valid, Process Developer warns you and allows you to add it with errors.
Enable this option to validate data before simulation starts. Disable this option for faster simulation. This option is enabled by default.
Disable bpws:selectionFailurefault
BPEL Version 1.1 only
Enabling this option allows a null value to be returned from a function or assignment that contains an XPath (or other language) query string. You can enable this to override behavior, for cases that handle data samples with optional elements.
By default, this option is not enabled, and if the query string returns an empty selection from an assign copy FROM, the process throws a bpws:selectionFailure fault, which is the standard response described in the BPEL4WS specification.
To set a preference to include this option as a process extension for all WS-BPEL 2.0 processes, see Process Developer Preferences.
See Disable bpel:selectionFailure Fault Example and Disable bpel:selectionFailure Fault and Auto Create Target Path for Copy/To Example for more information.
Auto create target path for Copy/To
BPEL Version 1.1 only
Determines if Process Developer is allowed to create a location path for a non-existent node in a complex variable in a process instance document. When an assignment refers to a non-existent node (or to more than one node), the standard BPEL fault, bpws:selectionFailure, must be thrown, according to the BPEL specification.
Enabling this option allows selections to be created on-the-fly. This means an assign copy TO operation can refer to a non-existent node and assign a value to it. This option is disabled by default.
To set a preference to include this option as a process extension for WS-BPEL 2.0 processes, see Process Developer Preferences.
See Auto Create Target Path for Copy/To Example and Disable bpel:selectionFailure Fault and Auto Create Target Path for Copy/To Example for more information see Disable bpel:selectionFailure Fault and Auto Create Target Path for Copy/To Example

Disable bpel:selectionFailure Fault Example

The following example shows the effect of enabling and disabling the Disable bpel:selectionFailure Fault (BPEL4WS 1.1 processes: bpws:selectionFailure) option.
For details on WS-BPEL 2.0 processes, see Using the Process Developer Disable Selection Failure Fault Extension.
For a description of this BPEL4WS 1.1 preference, 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::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.
Schema Snippet for Var1 and Var2:
<xs:complexType
name="AddressInfoType">
<xs:sequence>
<xs:element ref="ord:Name"/>
<xs:element ref="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"/>
Var1 Sample Data
Var2 Initialization
<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>
...
<ns1:OrderInfo
xmlns:ns1="http://temp.com">
<ns1:OrderHeader>
<ns1:OrdId/>
<ns1:BillToInfo>
<ns1:Name/>
<ns1:Addr1/>
<ns1:Addr2/
<ns1:City/>
<ns1:St/>
<ns1:Zip/>
<ns1:Cntry/>
</ns1:BillToInfo>
...
With Disable bpel:selectionFailure Faultdisabled, the simulation ends in a Selection Failure fault because Var1 is missing the query selection node, and it cannot be assigned to the Var2 query selection node.
With Disable bpel:selectionFailure Faultenabled, the process terminates normally because the empty selection node is allowed. A null value is added to Addr1 during the assignment.

Auto-create Target Path for Copy To Example

The following example shows the effect of enabling and disabling the Auto Create Target Path for Copy/To option.
For details on WS-BPEL 2.0 processes, see Using the Process Developer Create XPath Extension.
For a description of this BPEL4WS 1.1 preference, 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.
Schema Snippet for Var1 and Var2:
<xs:complexType name="AddressInfoType">
<xs:sequence>
<xs:element ref="ord:Name"/>
<xs:element ref="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"/>
Var1 Sample Data
Var2 Initialization
<ns1:OrderInfo
xmlns:ns1="http://
temp.com">
<ns1:OrderHeader>
<ns1:OrdId>78</ns1:OrdId>
<ns1:BillToInfo>
<ns1:Name>Name1</ns1:Name>
<ns1:Addr1>Apt 12</ns1:Addr1>
<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>
...
<ns1:OrderInfo
xmlns:ns1="http:/
/temp.com">
<ns1:OrderHeader>
<ns1:OrdId/>
<ns1:BillToInfo>
<ns1:Name/>
(Addr1 is missing)
<ns1:Addr2/>
<ns1:City/>
<ns1:St/>
<ns1:Zip/>
<ns1:Cntry/>
</ns1:BillToInfo>
...
With Auto Create Target Path for Copy/To disabled, the simulation ends in a fault because Var1 contains the query selection node, but it cannot be assigned to theVar2 query selection node because the location path is missing.
With Auto Create Target Path for Copy/To enabled, the process terminates normally because the location path for Addr1 is built, and the value is added to Addr1 during the assignment.

Disable bpel:selectionFailure Fault and Auto-create Target Path for Copy To Example

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 Process Developer Create XPath Extension and Using the Process Developer 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.