-
Bug
-
Resolution: Done
-
Major
-
7.1.0.GA, 7.9.0.GA
-
This issue occurs on all releases from RHDM 7.1.0 to 7.9.0.
-
False
-
False
-
Release Notes
-
-
-
-
-
-
CR1
-
+
-
Undefined
-
-
-
2021 Week 07-09 (from Feb 15)
Building a rule written in MVEL dialect like (*1) using AND in source pattern of accumulate like (*1-1) in executable rule model, a compilation error (*2) occurs. This issue does not occur when we build the rule with executable model disabled.
(*1)
package com.example.reproducer import java.math.BigDecimal dialect "mvel" rule "rule7a2" when $total : BigDecimal() from accumulate( $car : Car( discontinued == true ) and Order( item == $car, $price : price ), // ..... (*1-1) init( BigDecimal total = BigDecimal.ZERO; ), action( total += $price; ), reverse( total -= $price; ), result( total ) ) then System.out.println("***** Action of rule7a2 -- $total = " + $total); end
(*2)
[ERROR] /work2/testdir/reproducer_model_compiler_7a/target/generated-sources/drools-model-compiler/main/java/com/example/reproducer/Rulese69ee9f6a2a84acaa675792cae099156RuleMethods0.java:[28,63] method accumulate in class org.drools.model.DSL cannot be applied to given types; required: org.drools.model.view.ViewItem<?>,org.drools.model.functions.accumulate.AccumulateFunction,org.drools.model.functions.accumulate.AccumulateFunction[] found: org.drools.model.view.ViewItem reason: cannot infer type-variable(s) T (actual and formal argument lists differ in length)
- is cloned by
-
DROOLS-5928 The use of AND in source pattern of accumulate causes compilation error in executable model.
- Closed