Uploaded image for project: 'Red Hat Decision Manager'
  1. Red Hat Decision Manager
  2. RHDM-1713

Null assignment to a property in RHS causes a model generation error in executable model.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.11.1.GA
    • 7.10.1.GA
    • BRE
    • False
    • False
    • CR1
    • +
    • Undefined
    • Hide
      $ unzip reproducer_mc_null_assignment.zip 
      $ cd reproducer_mc_null_assignment
      $ ./run_mvn   # mvn clean compile exec:exec -DgenerateModel=YES
          :
          :
      [INFO] --- kie-maven-plugin:7.48.0.Final-redhat-00006:generateModel (default-generateModel) @ reproducer_mc_null_assignment ---
          :
          :
      [ERROR] Unable to build KieBaseModel:kbase-rules
      CompilationProblemErrorResult: org.drools.mvelcompiler.MvelCompilerException: RHS doesn't have a type
      
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time:  3.807 s
      [INFO] Finished at: 2021-04-23T14:02:26+09:00
      [INFO] ------------------------------------------------------------------------
          :
          :
      
      Show
      $ unzip reproducer_mc_null_assignment.zip $ cd reproducer_mc_null_assignment $ ./run_mvn # mvn clean compile exec:exec -DgenerateModel=YES : : [INFO] --- kie-maven-plugin:7.48.0.Final-redhat-00006:generateModel (default-generateModel) @ reproducer_mc_null_assignment --- : : [ERROR] Unable to build KieBaseModel:kbase-rules CompilationProblemErrorResult: org.drools.mvelcompiler.MvelCompilerException: RHS doesn't have a type [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 3.807 s [INFO] Finished at: 2021-04-23T14:02:26+09:00 [INFO] ------------------------------------------------------------------------ : :
    • 2021 Week 22-24 (from May 31)

      Building a rule like (*1) which is described in MVEL dialect and contains null assignment to a property of the fact (*1-1) in the action part with executable rule models enabled, a model generation error like (*2) occurs.

      (*1)

      dialect "mvel"
      
      rule "rule_null_assignment"
          when
              $fact : Fact()
          then
              System.out.println("***** Action of rule_null_assignment: $fact = " + $fact);
              modify($fact) {
                  phoneNum = null    // ..... (*1-1)
              }
      end
      // phoneNum is a String-type property of Fact class.
      

      (*2)

      [ERROR] Unable to build KieBaseModel:kbase-rules
      CompilationProblemErrorResult: org.drools.mvelcompiler.MvelCompilerException: RHS doesn't have a type
      

              lmolteni@redhat.com Luca Molteni
              rhn-support-myoshida Masato Yoshida
              Paolo Bizzarri Paolo Bizzarri
              Paolo Bizzarri Paolo Bizzarri
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: