Flow control steps overview


The Break step, Condition step, Continue step, Halt step, Loop step, and Switch step are used to direct the flow of a project by controlling the conditional execution or repetition of steps. The Status step evaluates pass/fail conditions and also catches exceptions, including exceptions thrown by the Error step.

The Break step, Condition step, and Continue step evaluate a user-defined condition statement which compares a property to an accepted value or limit using a logical operator; a result of true or false is returned for the statement. The condition statement can link to another step's output or input properties, or can be the result of an advanced expression.

Each Flow Control step decides the subsequent flow of the project based on the result for the condition statement. The Condition step branches the project in to one of 2 distinct sequences of steps depending on the result for the condition statement. With the Break step, you can set a condition under which the project's flow will break away from the current loop. Alternatively, the Continue step allows you to set a condition under which the proceeding sequence of steps will be bypassed and the project will return to the first step in the current loop. See the Procedure for using the Break step, Condition step, and Continue step section later in this chapter.

The Switch step is similar to the above steps in that it evaluates an expression to determine which path to take. The Switch step differs in that it offers the possibility of multiple paths by allowing expressions that return a range of results, rather than only true or false. See the Procedure for using the Switch step section later in this chapter.

The Loop step allows you to repeat a sequence of steps until a specified condition is reached. Every project has one Loop step by default. Note that the Break step and Continue step should be used to control the flow of the execution of steps in the loop. See the Procedure for using the Loop step section later in this chapter.

The Halt step can be used to pause, stop, restart, or terminate your project. This gives the operator control over the execution of the project. See the Procedure for using the Halt step section later in this chapter.

The Status step has 2 main uses. You can add conditional expressions to a Status step that will be evaluated at each iteration. If all the conditions evaluate to true, then the step will have a passing output. The second use of the Status step is that it catches exceptions or errors that are thrown by other steps, including the Error step. See the Procedure for using the Status step and Error step section later in this chapter. In addition, Status step can be used by the Project Change Validator. For more information on validation, see the Project Change Validator overview section in Chapter 62: Project Change Validator.