[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
Fri May 23 01:32:08 EDT 2014


1. The constraints are equivalent. $foo is bound to the Foo object, and
the getter does what the getter is supposed to do, and it's (probably)
visible - so why shouldn't it compile. Version 5.3 or maybe even 5.2 has
introduced general boolean expressions - are you using an older version?

I don't know what you mean by "being conditioned upon" - do you
understand the concept of "binding"?

2. Randomness should not matter.

3. Not seeing code that reproduces the issue, discussion is rather fruitless.

-W


On 22 May 2014 17:07, dec <roni.frantchi at gmail.com> wrote:
> Apologies,
> I had wanted to know:
> 1. Is it expected that this two rules would behave the same given the same
> input?
>     Not sure I understand how would it even compile and how would the var be
> conditioned upon before  being assigned .
>
> 2. The input was just some random string.
>
> 3. The results are unexpected as we are getting a hit on this row even
> though the field is populated with some string. BUT what is suspicious is
> that it would seem we very rarely get this sort of behaviour. We also
> suspect if it has something to do with concurrency or multiple sessions
> concurrently executing.
>
> Most importantly, I would like to understand 1) - how is this even possible
> to come up with such a pattern and is it expected to behave like the
> intended 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-tp4029647p4029654.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