Hi,
 
I am trying to use eval block in one of the rules and am a bit confused about it. The rule is something like this:
 

rule "LastCapacity"
when
    e: Execution(lastCapacity:lastCapacity,parentOid:parentOid)
    eo: ExecutionOrder(entityOid:entityOid,msgType:msgType,execType:execType)
    eval(lastCapacity != null && entityOid == parentOid && msgType == "8")
then

..................
end

where Execution and ExecutionOrder are 2 objects that are linked by an ID. I expect eval to return true for certain sets of objects that I send. But, the above rule exits without running the consequence. On the other hand, when I write the rule as:

 rule "LastCapacity"
when
    e: Execution(lastCapacity:lastCapacity==null,parentOid:parentOid)
    eo: ExecutionOrder(entityOid:entityOid == parentOid, msgType == "8")
then

.............................
end

the rule triggers the consequence for same set of objects. I thought that if the expression in eval block comes out to be true, the consequence will be triggered. Am I missing something obvious here?
 
Thanks
 
Malay Shah

NOTICE: If received in error, please destroy, and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error. We may monitor and store emails to the extent permitted by applicable law.