Within a plan or a component, you can use the <if> element to conditionally perform a block of steps. Similar to traditional programming if-then-else constructs, the statement within the <if> element is evaluated. If that statement is true, then the steps of the <then> element are performed. Otherwise, the steps of the <else> element are performed. If no <else> element exists, then no action is taken.
The following example uses the <if> element to allow users to decide at deployment time whether to take a snapshot.
<if> <condition> <istrue value=:[createSnapshot]"></istrue> </condition> <then> <createSnapshot blockName="default"></createSnapshot> </then> </if>