-
Bug
-
Resolution: Done
-
Major
-
None
-
None
-
2020 Week 52-03 (from Dec 21)
-
-
Undefined
-
NEW
-
NEW
-
---
-
---
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)
- clones
-
RHDM-1549 The use of AND in source pattern of accumulate causes compilation error in executable model.
- Closed