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

drools executable-model fails with BigDecimal coercion for method arguments

XMLWordPrintable

    • 2
    • False
    • None
    • False
    • Release Notes
    • +
    • Hide
      $ unzip reproducer_bd_expr_1a.zip
      $ cd reproducer_bd_expr_1a
      $ ./run_mvn
      === generateModel=NO ===
         :
         :
      ***** start
      ***** Rule 1: $fact=com.example.reproducer.Fact{value1=10, value2=3}
      ***** end
         :
         :
      
      === generateModel=YES ===
         :
         :
      [ERROR] Failed to execute goal org.kie:kie-maven-plugin:7.67.0.Final-redhat-00024:generateModel (default-generateModel) on project reproducer_bd_expr_1a: Execution default-generateModel of goal org.kie:kie-maven-plugin:7.67.0.Final-redhat-00024:generateModel failed: [com/example/reproducer/P04/LambdaPredicate04923BD236F1F56F661BF3AB8CD50313.java (21:886) : The operator - is undefined for the argument type(s) BigDecimal, int] -> [Help 1]
         :
         :
      

      The same result as in non-executable model is expected in executable model, but actually build fails in executable model (generateModel=YES).

      Show
      $ unzip reproducer_bd_expr_1a.zip $ cd reproducer_bd_expr_1a $ ./run_mvn === generateModel=NO === : : ***** start ***** Rule 1: $fact=com.example.reproducer.Fact{value1=10, value2=3} ***** end : : === generateModel=YES === : : [ERROR] Failed to execute goal org.kie:kie-maven-plugin:7.67.0.Final-redhat-00024:generateModel (default-generateModel) on project reproducer_bd_expr_1a: Execution default-generateModel of goal org.kie:kie-maven-plugin:7.67.0.Final-redhat-00024:generateModel failed: [com/example/reproducer/P04/LambdaPredicate04923BD236F1F56F661BF3AB8CD50313.java (21:886) : The operator - is undefined for the argument type(s) BigDecimal, int] -> [Help 1] : : The same result as in non-executable model is expected in executable model, but actually build fails in executable model (generateModel=YES).
    • 2023 Week 36-38 (from Sep 4)

      executable-model fails with a rule like this:

          when
              $fact : Fact( intToString(value1 * (value2 - 1)) == "20" )
      

      where Fact.value1 and Fact.value2 are BigDecimal.

      [com/example/reproducer/PB4/LambdaPredicateB48355ACDCC9A5CBEE370F85B0101A1E.java (21:886) : The operator - is undefined for the argument type(s) BigDecimal, int] 
      

      non-executable model runs successfully.

              rhn-support-tkobayas Toshiya Kobayashi
              rhn-support-myoshida Masato Yoshida
              Daniel Rosa Daniel Rosa
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: