A step used conditionally execute a block of steps. It has no attributes, and children consist of a <condition>, <then>, and <else> element.
If the content of the <condition> element evaluates to true, then the steps of the <then> block are executed, otherwise the steps of the <else> block are executed, if present.
Name |
How Many? |
Description |
condition |
1 |
The condition to evaluate |
then |
1 |
The steps to execute if condition is true |
else |
0 or 1 |
The steps to execute if condition is not true |
The following is an example of an <if> step used to conditionally restart.
<if> <condition><istrue value=":[restart]"/></condition> <then> <call blockName="restart"/> </then> </if> |
A child element of the <if> step that specifies a boolean expression. It has no attributes, and must contain exactly one boolean operator child element. See the Boolean Operators section for details of the permitted boolean operators.
A child element of the <if> step that specifies the steps to execute if the associated condition is true. It may contain any number of steps that are permitted within the scope of the block containing the <if> step.
A child element of the <if> step that specifies the steps to execute if the associated condition is not true. It may contain any number of steps that are permitted within the scope of the block containing the <if> step.