Inside eval() you write plain java code, where == is the identity
operator. When you write constraints, you are using DRL language where ==
calls .equals() method behind the scenes.
2009/8/3 Shah, Malay <Malay.Shah(a)morganstanley.com>
Minor correction in the rule:
The eval block is:
eval(lastCapacity *=**=* null && entityOid == parentOid && msgType ==
eval(lastCapacity *!**= *null && entityOid == parentOid && msgType ==
Any help is much appreciated.
*From:* Shah, Malay (IDEAS)
*Sent:* Monday, August 03, 2009 4:18 PM
*Subject:* Question on eval block
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:
* eval(lastCapacity * *!**= null && entityOid == parentOid && msgType
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:
eo: ExecutionOrder(entityOid:*entityOid == parentOid*, *msgType == "8"
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?
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.
rules-users mailing list
JBoss Drools Core Development
JBoss by Red Hat @ www.jboss.com