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

The use of BigDecimal literal causes a build failure in executable model.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 7.10.0.GA
    • 7.9.0.GA
    • BRE
    • RHDM 7.9.0.

    • False
    • False
    • Release Notes
    • CR1
    • +
    • Undefined
    • Hide
      $ unzip reproducer_02801729_3c.zip 
      $ cd reproducer_02801729_3c
      $ mvn clean compile exec:exec -DgenerateModel=YES
          :
          :
      [INFO] --- kie-maven-plugin:7.44.0.Final-redhat-00003:generateModel (default-generateModel) @ reproducer_02801729_3c ---
          :
          :
      [ERROR] Unable to build KieBaseModel:rules
      CompilationProblemErrorResult: org.drools.mvelcompiler.MvelCompilerException: RHS doesn't have a type
      
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time:  2.846 s
      [INFO] Finished at: 2020-12-04T11:44:08+09:00
      [INFO] ------------------------------------------------------------------------
          :
          :
      
      Show
      $ unzip reproducer_02801729_3c.zip $ cd reproducer_02801729_3c $ mvn clean compile exec:exec -DgenerateModel=YES : : [INFO] --- kie-maven-plugin:7.44.0.Final-redhat-00003:generateModel (default-generateModel) @ reproducer_02801729_3c --- : : [ERROR] Unable to build KieBaseModel:rules CompilationProblemErrorResult: org.drools.mvelcompiler.MvelCompilerException: RHS doesn't have a type [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2.846 s [INFO] Finished at: 2020-12-04T11:44:08+09:00 [INFO] ------------------------------------------------------------------------ : :
    • 2020 Week 49-51 (from Nov 30)

    Description

      Compiling a rule like (*1) which is described in MVEL dialect and uses BigDecimal literal (number literal + suffix 'B') with executable rule models enabled, an error like (*2) occurs.

      (*1)

      package com.example.reproducer
      
      import com.example.reproducer.Bus
      
      dialect "mvel"
      
      rule "bus3c"
          when
              $bus : Bus()
          then
              modify($bus) {
                  weight = 13000B
              }
              System.out.println("***** " + $bus + ", weight = " + $bus.weight);
      end
      

      $bus.weight is a BigDecimal type property.

      (*2)

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

      Attachments

        Issue Links

          Activity

            People

              lmolteni@redhat.com Luca Molteni
              rhn-support-myoshida Masato Yoshida
              Daniel Rosa Daniel Rosa
              Daniel Rosa Daniel Rosa
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: