2.14 Switch Dialog - Condition Branch

Use to specify an XPath expression in the condition (case) branch.

You select exactly one branch of activity from a set of choices. The condition branches are considered in the order in which they appear. The first branch whose condition is true is taken and provides the activity performed for the switch. If no branch with a condition is taken, then the otherwise branch is taken. If the otherwise branch is not explicitly specified, then an otherwise branch with an empty activity is assumed to be available. This activity is complete when the activity of the selected branch completes.

Element Description

Label

Enter a label for the condition branch. When complete, this label becomes the name for the condition branch of the switch activity in Oracle BPEL Designer.

Description

Enter a complete description of the functionality of this condition branch.

Condition

Click the XPath Expression Builder icon to display the Expression Builder dialog that enables you to create an expression.

For example, assume you have two loan offers from competing loan companies stored in the global variables loanOffer1 and loanOffer2. Each loan offer variable contains the loan offer's APR. The BPEL flow must choose the loan with the lower APR, as shown in the following XPath expression example:

bpws:getVariableData('loanOffer1','payload','/loanOffer/APR') >
bpws:getVariableData('loanOffer2','payload','/loanOffer/APR')

Related Topics

Creating a Switch Activity to Define Conditional Branching in Developing SOA Applications with Oracle SOA Suite