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
-
2020 Week 31-33 (from Jul 27)
-
-
NEW
-
NEW
Description
Given the example rule below (based on the drools example rule)
global java.util.Set controlSet; declare A x: String end declare B a: A end function String dummyFunction(B b) { return "test"; } rule "will execute per each Measurement having ID color" no-loop when Measurement( id == "color", $colorVal : val ) $b: B() $val: String() from dummyFunction($b.a) then controlSet.add($colorVal); end
When compiling the rule with kie-maven-plugin it fails with :
...target/generated-sources/drools-model-compiler/main/java/rules/Rules5937a2896da74f01bfa36d294bcf0858RuleMethods0.java:[32,107] cannot find symbol [ERROR] symbol: variable $b [ERROR] location: class rules.Rules5937a2896da74f01bfa36d294bcf0858RuleMethods0
It transpiles and compiles fine with:
$val: String() from dummyFunction($b)
This can probably be reproduced on all version.
It works when the rules are not pre-compiled.
Attachments
Issue Links
- duplicates
-
DROOLS-5549 Drools model compilation fails when using object builders within method calls
- Resolved
- relates to
-
DROOLS-5542 org.apache.maven.plugins:maven-compiler-plugin fails on the generated model
- Closed