In the Condition field, click the XPath Expression Builder icon to enter an XPath

10-12 Oracle Fusion Middleware Developers Guide for Oracle SOA Suite

10.5 Specifying XPath Expressions to Bypass Activity Execution

You can specify an XPath expression in an activity that, when evaluated to true, causes that activity to be skipped. This functionality provides an alternative to using a switch activity for conditionally executing activities. The skip condition for activities is specified as follows: activity bpelx:skipCondition=boolean-expr The bpelx:skipCondition attribute causes an XPath expression to be evaluated immediately upon creation of the activity instance. If the skip expression returns a false boolean value, the activity is executed. If the skip expression returns a true boolean value, the activity is completed immediately and execution moves to the activity immediately following that one. This construct is equivalent to a switchcase structured activity with a single case element with a condition that is the opposite of the skip condition. Example 10–6 provides an example of bpelx:skipCondition attribute use. If myvalue is 0, the expression evaluates to true, and the assign activity is skipped. If myvalue is 10, the expression evaluates to false, and the copy operation of the assign activity is executed. Example 10–6 Use of bpelx:skipCondition Attribute assign bpelx:skipCondition=bpws:getVariableDatainput, payload,tns:inputMsgtns:myvalue = 0 copy from expression=Value is greater than zero to variable=output part=payload query=tns:resultMsgtns:valueResult copy assign The equivalent functionality used with a switch activity is shown in Example 10–7 . Example 10–7 Equivalent Functionality with a Switch Activity switch case condition=bpws:getVariableDatainput, payload,tns:inputMsgtns:value 0 assign copy from expression=Value is greater than zero to variable=output part=payload query=tns:resultMsgtns:valueResult copy assign case switch You can also use built-in and custom XPath functions and variable references within the skip condition expression. Example 10–8 provides several examples: Note: The skip condition is only available in BPEL projects that support BPEL version 1.1.