Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-6420

property reactivity reacts to all rules when a public field is modified in exec-model

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 7.56.0.Final
    • 7.55.0.Final
    • executable model
    • None
    • 2021 Week 22-24 (from May 31), 2021 Week 25-27 (from Jun 21)
    • 2
    • Undefined
    • NEW
    • NEW

    Description

      When Cell class has a public field 'hidden'

          public class Cell {
              public boolean hidden;
      

      , this rule:

      rule R1 when
         $c : Cell()
      then
         modify( $c ) { hidden = true };
      end
      

      generates AllSetButLastBitMask:

          public static org.drools.model.Rule rule_R1() {
              final org.drools.model.Variable<org.drools.mvel.integrationtests.PropertySpecificTest.Cell> var_$c = D.declarationOf(org.drools.mvel.integrationtests.PropertySpecificTest.Cell.class,
                                                                                                                                   DomainClassesMetadataD9F7CD5C48703AD1633D71F5F77FBBDA.org_drools_mvel_integrationtests_PropertySpecificTest_Cell_Metadata_INSTANCE,
                                                                                                                                   "$c");
              final org.drools.model.BitMask mask_$c = org.drools.model.bitmask.AllSetButLastBitMask.get();
              org.drools.model.Rule rule = D.rule("org.drools.mvel.integrationtests",
                                                  "R1").build(D.pattern(var_$c),
                                                              D.on(var_$c).execute(org.drools.mvel.integrationtests.PB5.LambdaConsequenceB58DB4790356C484B2FC931B685AD2B1.INSTANCE));
              return rule;
          }
      

      so reacts to all rules which have Cell pattern.

      Attachments

        Issue Links

          Activity

            People

              rhn-support-tkobayas Toshiya Kobayashi
              rhn-support-tkobayas Toshiya Kobayashi
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: