[rules-users] Suspicious behaviour when using a bound variable as a constraint in a pattern bound to the same var

dec roni.frantchi at gmail.com
Thu May 22 06:35:42 EDT 2014


Due to a bug we came up with the following rule:

/*
Rule "intriguing"
when
       $foo: Foo( $foo.getBar() == null )
then
       ...
*/

Our original intention was to actually generate the rule like so:

/*
Rule "intended"
when
       $foo: Foo( bar == null )
then
       ...
*/

In most cases the "intriguing" rule actually seem to behave much like the
"intended".
We are unsure way.
Moreover, we suspect that sometime we get wrong, or rather unexpected
results when firing up this rule.



--
View this message in context: http://drools.46999.n3.nabble.com/Suspicious-behaviour-when-using-a-bound-variable-as-a-constraint-in-a-pattern-bound-to-the-same-var-tp4029647.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list