Gotcha with boolean variables

Not applicable

When writing conditions for steps based on executed policies it often looks as though variables store boolean values but often times they aren't.

A good example of this is using the cache.

<Step>
    <Name>LookupCache</Name>
</Step>
<Step>
    <Name>KeyValueGet</Name>
    <Condition>
        lookupcache.LookupCache.cachehit = "false"
    </Condition>
</Step>
<Step>
    <Name>PopulateCache</Name>
    <Condition>
        lookupcache.LookupCache.cachehit = "false" and \
        myvariable != null
    </Condition>
</Step>

The above fails if the false isn't in quotes. This is confusing.

1 0 276
0 REPLIES 0