Table of Contents minLevel 3 outline true style none
Description
The if statement selects a statement for execution based on the value of a boolean expression.
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<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:] >= [:CONFIG.RULES.MaxWorkerSlack:] or [:$LocalData.Rand:] > [:$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 | ||||||
---|---|---|---|---|---|---|
| ||||||
<!-- 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> |