Building Your Event-Driven Architecture : Service Development Help : Building Flow Services : The BRANCH Step : Branching on an Expression
Branching on an Expression
When you branch on an expression, you assign an expression to each child of a branch step. At run time, the BRANCH step evaluates the expressions assigned to the child steps. It executes the first child step with an expression that evaluates to true.
To branch on an expression
1. Create a list of the conditional steps (target steps) and make them children of the BRANCH step.
2. In the Properties view for the BRANCH step, set Evaluate labels to True.
3. In the Label property of each target, specify the expression that, when true, will cause the target step to execute. The expressions you create can include multiple variables and can specify a range of values for variables. Use the syntax provided by webMethods to create the expression. For more information about expression syntax, see Conditional Expressions.
Simple BRANCH step that branches on an expression
Keep in mind that only one child of a BRANCH step is executed: the first target step whose label contains an expression that evaluates to true. If none of the expressions evaluate to true, none of the child steps are invoked, and execution falls through to the next step in the flow service. You can use the $default value in the Label property to designate a default step for cases where no expressions evaluate to true. For more information about using the $default value, see Specifying a Default Step.
Important:  
The expressions you create for the children of a BRANCH step need to be mutually exclusive (only one condition should evaluate to true at run time).
Copyright © 2016 - 2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback