-
Bug
-
Resolution: Done
-
Major
-
7.46.0.Final
-
None
-
2021 Week 04-06 (from Jan 25)
-
3
-
Undefined
-
NEW
-
NEW
-
---
-
---
- When a rule uses mvel dialect and refers to "kcontext" in RHS with exec-model,
dialect "mvel" when Integer() then result.add(kcontext.getRule().getName()); end
it cannot resolve "kcontext" hence compilation fails.
[ERROR] Failures: [ERROR] MvelDialectTest.testKcontext:921->BaseModelTest.getKieSession:105->BaseModelTest.getKieSession:109->BaseModelTest.getKieContainer:113->BaseModelTest.getKieContainer:120->BaseModelTest.createKieBuilder:131->BaseModelTest.createKieBuilder:158 [Message [id=1, level=ERROR, path=src/main/java/defaultpkg/PDF/LambdaConsequenceDF24FCC3F13686A61CE2DA9AF55C71CF.java, line=20, column=20 text=cannot find symbol symbol: variable kcontext location: class defaultpkg.PDF.LambdaConsequenceDF24FCC3F13686A61CE2DA9AF55C71CF], Message [id=2, level=ERROR, path=src/main/java/defaultpkg/PDF/LambdaConsequenceDF24FCC3F13686A61CE2DA9AF55C71CF.java, line=0, column=0 text=Java source of src/main/java/defaultpkg/PDF/LambdaConsequenceDF24FCC3F13686A61CE2DA9AF55C71CF.java in error: ... public enum LambdaConsequenceDF24FCC3F13686A61CE2DA9AF55C71CF implements org.drools.model.functions.Block1<java.util.List>, org.drools.model.functions.HashedExpression { ... @Override() public void execute(java.util.List result) throws java.lang.Exception { result.add(kcontext.getRule().getName()); } } ]]
Note: The same issue is found in org.drools.mvel.integrationtests.KnowledgeContextTest
- is related to
-
DROOLS-5729 Reorganize drools unit tests
- Coding In Progress