Hi everyrone,
I’m facing an error running this very simple decision table with only a comparison beetwen two input dates, that are evaluated using feel:
Here’s the command for evaluation:
dmnEngine.evaluateDecision(dmnDecision, Variables.putValue(“event”, Spin.JSON(“{"processingDate": "2021-04-19T18:00:00.151", "remittanceDate": "2021-04-19T18:00:00.151"}”)));
The error is that the engine failed to evaluate expression ‘> processingDate’ because no variable found for name ‘processingDate’.
It looks like the variable ‘processingDate’ was not stored in context even if ‘Input variable’ is filled.
Here’s the full stacktrace:
org.camunda.bpm.dmn.feel.impl.FeelException: FEEL/SCALA-01008 Error while evaluating expression: failed to evaluate expression ‘> processingDate’: ValError(no variable found for name ‘processingDate’) is not comparable
at org.camunda.bpm.dmn.feel.impl.scala.ScalaFeelLogger.evaluationException(ScalaFeelLogger.java:77)
at org.camunda.bpm.dmn.feel.impl.scala.ScalaFeelEngine.evaluateSimpleUnaryTests(ScalaFeelEngine.java:117)
at org.camunda.bpm.dmn.engine.impl.evaluation.DecisionTableEvaluationHandler.evaluateFeelSimpleUnaryTests(DecisionTableEvaluationHandler.java:246)
at org.camunda.bpm.dmn.engine.impl.evaluation.DecisionTableEvaluationHandler.evaluateInputEntry(DecisionTableEvaluationHandler.java:203)
at org.camunda.bpm.dmn.engine.impl.evaluation.DecisionTableEvaluationHandler.isConditionApplicable(DecisionTableEvaluationHandler.java:145)
at org.camunda.bpm.dmn.engine.impl.evaluation.DecisionTableEvaluationHandler.evaluateInputForAvailableRules(DecisionTableEvaluationHandler.java:137)
at org.camunda.bpm.dmn.engine.impl.evaluation.DecisionTableEvaluationHandler.evaluateDecisionTable(DecisionTableEvaluationHandler.java:111)
at org.camunda.bpm.dmn.engine.impl.evaluation.DecisionTableEvaluationHandler.evaluate(DecisionTableEvaluationHandler.java:81)
at org.camunda.bpm.dmn.engine.impl.DefaultDmnDecisionContext.evaluateDecision(DefaultDmnDecisionContext.java:85)
at org.camunda.bpm.dmn.engine.impl.DefaultDmnEngine.evaluateDecision(DefaultDmnEngine.java:167)
at org.camunda.bpm.dmn.engine.impl.DefaultDmnEngine.evaluateDecision(DefaultDmnEngine.java:158)
Thanks Hassang for your quick answer. I can’t use pre evaluation using literal expressions because my real DRD is much bigger in reality and will become unreadable. Do you know why is there a such behavior with FEEL ? By the way I will switch to JUEL
Hi @hassang ,
We have considered this alternative but it has the disadvantages of degrading visibility and especially performance with duplicated path evaluations