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

Wolfgang Laun wolfgang.laun at gmail.com
Thu May 22 09:54:14 EDT 2014


Please don't write any more posts like this.

You aren't asking a question, as far as I can see - so why do you post?

You write, darkly,  about suspicions of wrong or unexpected results
(which, to be sure, isn't the same thing). This is a big help.

-W


On 22/05/2014, dec <roni.frantchi at gmail.com> 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