FEEL/SCALA-01008 Error while evaluating expression: failed to parse expression

Hello, i am using dependency camunda-engine-dmn 7.17.0 in java client,
on an input context “event” which contains a list of “EventItems” and a list of “memberAttributes”, I’m trying to get the solution result as another context, like so:
{"actionType":"Accrual", "value": get value(event.eventItems[ id = processingItem.eventItemId ][1], "originalPrice") * 0.05, "pointType":"T1Bonus"}
but I always get an exception:

org.camunda.bpm.dmn.feel.impl.FeelException: FEEL/SCALA-01008 Error while evaluating expression: failed to parse expression '{"actionType":"Accrual", "value": get value(event.eventItems[ id = processingItem.eventItemId ][1], "originalPrice") * 0.04, "pointType":"T1Bonus"}': Expected (expressionWithContinuation | functionDefinition | forExpression | ifExpression | quantifiedExpression | expression2):1:1, found "{\"actionTy"
	at org.camunda.bpm.dmn.feel.impl.scala.ScalaFeelLogger.evaluationException(ScalaFeelLogger.java:77)
	at org.camunda.bpm.dmn.feel.impl.scala.ScalaFeelEngine.evaluateSimpleExpression(ScalaFeelEngine.java:84)

I can evaluate the expression get value(event.eventItems[ id = processingItem.eventItemId ][1], "originalPrice") * 0.05 in an I/O block, but if I try to create an output context with that expression, I get an error.
What am I doing wrong? How can I get the filtered value from the context’s list and use it in the output context?

Please see dmn attached bellow.
cashback.dmn (4.4 KB)

Hi @ayakovlev ,

thank you for reporting. :+1:

It is a known issue in the FEEL engine that is fixed since version 1.14.0.

This version of the FEEL engine will be shipped with Camunda Platform version 7.18.0.

Until then, you could change the version of the FEEL engine but it depends on how you use the Camunda Platform (i.e. embedded, run, etc.). If you embed the engine then it should be possible to change the version by depending on a newer version of the FEEL engine (see the pom ).

Best regards,
Philipp

2 Likes

Thanks Philipp, after changing the version of the feel-engine dependency, the dmn context expression started working without errors.