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

Davide Sottara dsotty at gmail.com
Thu May 22 09:38:15 EDT 2014


Could you please elaborate on what you mean by "suspect that sometime we
get wrong, unexpected results"?
We'd need to know at least the inputs to reproduce the possible issue
Thanks
Davide


On 05/22/2014 05:35 AM, dec wrote:
> 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.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>



More information about the rules-users mailing list