Unit Test: Unable to evaluate expression for language 'JUEL'

Hi all,

I’m referencing a DMN Table in a Rule Task and I’d like to write a camunda-bpm-assert-scenario test for it.

Unfortunately if the DMN happens to use a Juel Expression I get the following exception:

org.camunda.bpm.dmn.engine.impl.DmnEvaluationException: DMN-01002 Unable to evaluate expression for language 'JUEL': '${propertyValueExtractor.getValue(document, 'DOSSIER_doc_type')}'
at org.camunda.bpm.dmn.engine.impl.DmnEngineLogger.unableToEvaluateExpression(DmnEngineLogger.java:38)
at org.camunda.bpm.dmn.engine.impl.evaluation.ExpressionEvaluationHandler.evaluateElExpression(ExpressionEvaluationHandler.java:125)
at org.camunda.bpm.dmn.engine.impl.evaluation.ExpressionEvaluationHandler.evaluateExpression(ExpressionEvaluationHandler.java:62)
at org.camunda.bpm.dmn.engine.impl.evaluation.DecisionTableEvaluationHandler.evaluateInputExpression(DecisionTableEvaluationHandler.java:193)

I tried in vain with the approach in https://docs.camunda.org/manual/7.7/user-guide/testing/#resolving-beans-without-spring-cdi

   Mocks.register("propertyValueExtractor", new PropertyValueExtractor());

Do you have any tip? Is something like that possible at all?

Thank you very much in advance

Can you upload the DMN table?

Hi @Niall

thank you for your proposal, but I found the bug…

My Process was ‘Async’, aftrer receiving the start event I configured it to go async…

I removed this setting and…it goes perfectly!
I believed that didn’t regard the tests…

Camunda is really never stopping to surprise me…:slight_smile:

Super Product!

1 Like