webMethods 10.2 | Service Development Help | Building Flow Services | The BRANCH Step
 
The BRANCH Step
 
Branching on a Switch Value
Branching on an Expression
Branching on Null and Empty Values
Specifying a Default Step
Using a SEQUENCE as the Target of a BRANCH
Building a BRANCH Step
The BRANCH step allows you to conditionally execute a step based on the value of a variable at run time. For example, you might use a BRANCH step to process a purchase order one way if the PaymentType value is “CREDIT CARD” and another way if it is “CORP ACCT”.
When you build a BRANCH step, you can:
*Branch on a switch value.Use a variable to determine which child step executes. At run time, the BRANCH step matches the value of the switch variable to the Label property of each of its targets. It executes the child step whose label matches the value of the switch.
*Branch on an expression. Use an expression to determine which child step executes. At run time, the BRANCH step evaluates the expression in the Label property of each child step. It executes the first child step whose expression evaluates to “true.”
Important: You cannot branch on a switch value and an expression for the same BRANCH step. If you want to branch on the value of a single variable and you know the possible run-time values of the switch variable exactly, branch on the switch value. If you want to branch on the values of more than one variable or on a range of values, branch on expressions.
BRANCH Properties
Branching on a Switch Value
Branching on an Expression
Branching on Null and Empty Values
Specifying a Default Step
Using a SEQUENCE as the Target of a BRANCH
Building a BRANCH Step

Copyright © 2017-2018 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Innovation Release