[rules-users] activation dependent of rule order in drl file in 5.2.0.Final?

Wolfgang Laun wolfgang.laun at gmail.com
Wed Jun 29 05:42:28 EDT 2011


Hi Florian,

this appears to be a bug in 5.2.0 - I was able to reproduce it. First
experiments suggest
that this is due to an indirect field access in combination with a
comparison to true or false,
such as

   Wrapper( this.product.boolean4 == true )

If you simply use

   Wrapper( this.product.boolean4 )

it is OK - the latter being possible only in 5.2.0.

Simple field accesses and comparisons to true/false are OK, as in
  Product( bool6 == true )

-W


2011/6/28 Florian Beckmann <florian.beckmann at camunda.com>

> Hi,
>
> because of https://issues.jboss.org/browse/JBRULES-2942 i just migrated
> our
> (maven) project to 5.2.0.Final - we depend on salience in some of our
> rules.
>
> However, after the salience issue was gone I'm facing a new problem in
> several
> test cases:
> Rules in previously (drools 5.1.1) working rule files don't get activated
> anymore when I insert facts - none at all.
> When moving the rule expected to fire (see "rule 4" in attached file)  to
> the
> first position in the drl file then suddenly several rules get activated
> and the
> expected rule fires.
>
> This shouldn't be the case, shouldn't it? Or do I miss something obvious
> here?
>
> Could a corrupt file somehow cause this?
>
> I attachached the rule file which causes the problem (I needed to obfuscate
> some names, sry). It is quite simple.
>
> I experienced a similar issue (again since 5.2.0.Final) with rules
> generated
> from templates, where I had to change the constraints order in the
> templates'
> LHS for then generated rules to get activated at all.
>
> First I would like to know if my statement that the rule position in the
> drl
> file shouldn't influence the activation (I don't mean firing or order of
> activations) of a rule at all, is correct.
> I don't use agenda groups.
>
> And second if someone experienced similar issues.
>
> I will try to build a test case which hopefully can reproduce this as soon
> as
> possible.
>
>
> Florian
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110629/6dbb201a/attachment.html 


More information about the rules-users mailing list