Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
minLevel3
outlinetrue
stylenone

 


Description

The if statement selects a statement for execution based on the value of a boolean expression.

...

Code Block
languagexml
themeEclipse
titleMultiple Operands
<if condition="/'[:$Macro.Argument.StopWid:]' != '' and '[:$Macro.Argument.StopTarget:]' != ''">
        <Log Message="I am in true block!"/>
        <if condition="/'[:$Macro.Argument.SiteCur:]' = '[:CONFIG.CompanyId:]' or
                       [:$ProcessData.$BTV.Worker.SlackCounter:] &gt;= [:CONFIG.RULES.MaxWorkerSlack:] or
                       [:$LocalData.Rand:] &gt; [:$ProcessData.$BTV.Worker.SlackTendency:]">
        <Log Message="I am in true, true block!"/>
        </if>
</if>

Examples of "if" Statements

Various examples of "if" statements

Code Block
languagexml
themeEmacs
titleExamples of IF Statements
<!-- Combining number comparsion with non number comparison -->
<!-- Note here: count is a XPath function. This menthod essentially find number of Result Elements  -->
<!-- Note that CPUUtilization and MemoryUtilitzation must return boolean -->
<If condition="[:/boolean('[:$LocalData.EventResponse.Find/count(Result) ne 0:]'  
                and ('[:$ProcessData.CPUUtilization:]' 
                lt '[:$ProcessData.MemoryUtilization:]')):]">
	<Then>
	</Then>
</If>