N1 Service Provisioning System 4.1 Reference Guide

if Step

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.

if Step Child Elements

Name 

How Many? 

Description 

condition 

The condition to evaluate 

then 

The steps to execute if condition is true 

else 

0 or 1 

The steps to execute if condition is not true 

if Step Example

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> 

condition Element

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.

then Element

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.

else Element

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.