Details
-
Bug
-
Resolution: Done
-
Major
-
None
-
7.31.0.Final, 7.32.0.Final, 7.33.0.Final, 7.34.0.Final, 7.35.0.Final, 7.36.0.Final, 7.37.0.Final, 7.38.0.Final, 7.39.0.Final, 7.40.0.Final
-
None
-
None
-
2020 Week 31-33 (from Jul 27)
-
-
NEW
-
NEW
Description
Given the example rule below:
import org.example.drools.model.*; import java.util.Map; global java.util.Set controlSet; function String dummyFunction(Map m) { return "test"; } rule "will execute per each Measurement having ID color" no-loop when Measurement( id == "color", $colorVal : val ) $val: String() from dummyFunction(Map.of($colorVal, "something")))) then controlSet.add($colorVal); end
compiling the rule with kie-maven-plugin, it throws the error:
...target/generated-sources/drools-model-compiler/main/java/rules/Rules57a04348fad44377b9eacd9bb5741999RuleMethods0.java:[30,117] cannot find symbol
[ERROR] symbol: variable $colorVal
[ERROR] location: class rules.Rules57a04348fad44377b9eacd9bb5741999RuleMethods0
Same rule when not pre-compiled runs fine.
Attachments
Issue Links
- is duplicated by
-
DROOLS-5548 Model compiler cannot generate declaration from a function call
- Closed