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

BitMask is not generated for modify in named consequence with exec-model

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 7.56.0.Final
    • 7.54.0.Final
    • executable model
    • None
    • 2021 Week 22-24 (from May 31)
    • 2
    • Undefined
    • NEW
    • NEW

    Description

      When modify block exists in a named consequence,

      rule R1 when
          $a: Cheese ( type == "stilton" )
          if ( price < 10 ) break[t1]
          $b: Cheese ( type == "cheddar" )
      then
          results.add( $a.getType() );
      then[t1]
          modify( $a ) { setPrice(15) };
      end
      

      BitMask is not generated:

      public enum LambdaConsequenceF831478DB95C880D00DB51C33332CA20 implements org.drools.model.functions.Block2<org.drools.model.Drools, org.drools.modelcompiler.domain.Cheese>, org.drools.model.functions.HashedExpression {
      
          INSTANCE;
      
          public static final String EXPRESSION_HASH = "ACF00A35EB5323D8A7CCCA2BFF74DE72";
      
          public java.lang.String getExpressionHash() {
              return EXPRESSION_HASH;
          }
      
          @Override()
          public void execute(org.drools.model.Drools drools, org.drools.modelcompiler.domain.Cheese $a) throws java.lang.Exception {
              {
                  {
                      ($a).setPrice(15);
                  }
                  drools.update($a, mask_$a);
              }
          }
      }
      

      So fails with

      mask_$a cannot be resolved to a variable
      

      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: