if

Description

This job implements an if/then/else logic. The completion state is the worst case of that of the child and the condition executed.

Properties

NameDescriptionRequired
name A name, can be any text. No.

Elements

child

Required: Yes.

The child job, on who's completion state the execution of the branches is decided.

then

Required: No.

Executed if the state of the child job is complete.

else

Required: No.

Executed if the state of the child job is not complete.

exception

Required: No.

Executed if the state of the child job is exception.

Example

 <if name="If A File Exists">
   <child>
      <exists file="some.txt"/>
   </child>
   <then>
      <echo text="File Exists"/>
   </then>
   <else>
      <echo text="File Doesn't Exist"/>
   </else>
   <exception>
      <echo text="Big Problem"/>
   </exception>
 </if>
 


(c) Rob Gordon 2005