-
Bug
-
Resolution: Done
-
Major
-
7.4.1.GA
-
None
-
-
-
-
-
-
CR1
-
+
-
-
2019 Week 41-43 (from Okt 7)
A rule containing a function call with a negative argument:
eval( functions.add($age, -1).compareTo(10) < 0)
fails to compile when using the executable model:
java.lang.RuntimeException: Unknown expression type: -1 at org.drools.modelcompiler.builder.generator.DrlxParseUtil.getExpressionType(DrlxParseUtil.java:245) at org.drools.modelcompiler.builder.generator.expressiontyper.ExpressionTyper.processFirstNode(ExpressionTyper.java:562) at org.drools.modelcompiler.builder.generator.expressiontyper.ExpressionTyper.toTypedExpressionFromMethodCallOrField(ExpressionTyper.java:380) at org.drools.modelcompiler.builder.generator.expressiontyper.ExpressionTyper.parseNodeArguments(ExpressionTyper.java:679) at org.drools.modelcompiler.builder.generator.expressiontyper.ExpressionTyper.parseMethodCallExpr(ExpressionTyper.java:647) at org.drools.modelcompiler.builder.generator.expressiontyper.ExpressionTyper.methodCallExpr(ExpressionTyper.java:635) at org.drools.modelcompiler.builder.generator.expressiontyper.ExpressionTyper.toTypedExpressionFromMethodCallOrField(ExpressionTyper.java:416) at org.drools.modelcompiler.builder.generator.expressiontyper.ExpressionTyper.toTypedExpressionRec(ExpressionTyper.java:191) at org.drools.modelcompiler.builder.generator.expressiontyper.ExpressionTyper.toTypedExpression(ExpressionTyper.java:121) at org.drools.modelcompiler.builder.generator.drlxparse.ConstraintParser.parseBinaryExpr(ConstraintParser.java:269) at org.drools.modelcompiler.builder.generator.drlxparse.ConstraintParser.getDrlxParseResult(ConstraintParser.java:89) at org.drools.modelcompiler.builder.generator.drlxparse.ConstraintParser.drlxParse(ConstraintParser.java:56) at org.drools.modelcompiler.builder.generator.drlxparse.ConstraintParser.drlxParse(ConstraintParser.java:51) at org.drools.modelcompiler.builder.generator.drlxparse.ConstraintParser.drlxParse(ConstraintParser.java:47) at org.drools.modelcompiler.builder.generator.visitor.EvalVisitor.visit(EvalVisitor.java:25) at org.drools.modelcompiler.builder.generator.visitor.ModelGeneratorVisitor.visit(ModelGeneratorVisitor.java:94) at org.drools.compiler.lang.descr.EvalDescr.accept(EvalDescr.java:97) at org.drools.modelcompiler.builder.generator.visitor.AndVisitor.visit(AndVisitor.java:29) at org.drools.modelcompiler.builder.generator.visitor.ModelGeneratorVisitor.visit(ModelGeneratorVisitor.java:69) at org.drools.modelcompiler.builder.generator.ModelGenerator.processRule(ModelGenerator.java:173) at org.drools.modelcompiler.builder.generator.ModelGenerator.generateModel(ModelGenerator.java:153) at org.drools.modelcompiler.builder.ModelBuilderImpl.compileKnowledgePackages(ModelBuilderImpl.java:169) at org.drools.modelcompiler.builder.ModelBuilderImpl.buildRules(ModelBuilderImpl.java:119) at org.drools.modelcompiler.builder.ModelBuilderImpl.buildPackages(ModelBuilderImpl.java:69) at org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl.build(CompositeKnowledgeBuilderImpl.java:108) at org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl.build(CompositeKnowledgeBuilderImpl.java:100) at org.drools.compiler.kie.builder.impl.AbstractKieProject.buildKnowledgePackages(AbstractKieProject.java:261) at org.drools.compiler.kie.builder.impl.AbstractKieProject.verify(AbstractKieProject.java:75) at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildKieProject(KieBuilderImpl.java:271) at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildAll(KieBuilderImpl.java:239) at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildAll(KieBuilderImpl.java:208) at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildAll(KieBuilderImpl.java:196) at org.drools.modelcompiler.BaseModelTest.createKieBuilder(BaseModelTest.java:144) at org.drools.modelcompiler.BaseModelTest.createKieBuilder(BaseModelTest.java:125) at org.drools.modelcompiler.BaseModelTest.getKieContainer(BaseModelTest.java:114) at org.drools.modelcompiler.BaseModelTest.getKieContainer(BaseModelTest.java:107) at org.drools.modelcompiler.BaseModelTest.getKieSession(BaseModelTest.java:103) at org.drools.modelcompiler.BaseModelTest.getKieSession(BaseModelTest.java:99) at org.drools.modelcompiler.CompilerTest.testEvalExprWithFunctionCall(CompilerTest.java:1997)
- clones
-
DROOLS-4532 Executable model compilation fails with java.lang.RuntimeException: Unknown expression type: -1
- Closed