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)