Hi I am new to Camunda and DMN.
I have a use case below.
Input column in DMN table is activities_to_perform.
Row 1 has values (Activity_1, Activity_2 , Activity_3, Activity_4).
Row 2 has values (Activity_3, Activity_5, Activity_6, Activity_7)
In request body i want to send activities : [Activity_3, Activity_7 ]
In the DMN Engine it has to pass with Row2
Hence the condition should be “For all the values in the request body variable (activities) array” should be subset of the input values array. i.e, inputValues.containAll(requestbody variable array).
Can you also help me with the request body format as for the same?
like
{
“variables” : {
“activity” : {“value” : [“Activity_3”,“Activity_7”] , “type” : “String”}
}
}
I get the following error while executing the rest api.
Caused by: org.camunda.bpm.dmn.feel.impl.juel.FeelSyntaxException: FEEL-01010 Syntax error in expression ‘every package in packages satisfies list contains([“Lunch”, “Dinner”,“Drink”], package)’
at org.camunda.bpm.dmn.feel.impl.juel.FeelEngineLogger.syntaxException(FeelEngineLogger.java:27)
at org.camunda.bpm.dmn.feel.impl.juel.FeelEngineLogger.invalidExpression(FeelEngineLogger.java:113)
at org.camunda.bpm.dmn.feel.impl.juel.FeelEngineImpl.transformSimpleUnaryTests(FeelEngineImpl.java:92)
at org.camunda.bpm.dmn.feel.impl.juel.FeelEngineImpl.evaluateSimpleUnaryTests(FeelEngineImpl.java:53)
at org.camunda.bpm.dmn.engine.impl.evaluation.DecisionTableEvaluationHandler.evaluateFeelSimpleUnaryTests(DecisionTableEvaluationHandler.java:245)
at org.camunda.bpm.dmn.engine.impl.evaluation.DecisionTableEvaluationHandler.evaluateInputEntry(DecisionTableEvaluationHandler.java:202)
at org.camunda.bpm.dmn.engine.impl.evaluation.DecisionTableEvaluationHandler.isConditionApplicable(DecisionTableEvaluationHandler.java:144)
at org.camunda.bpm.dmn.engine.impl.evaluation.DecisionTableEvaluationHandler.evaluateInputForAvailableRules(DecisionTableEvaluationHandler.java:136)
at org.camunda.bpm.dmn.engine.impl.evaluation.DecisionTableEvaluationHandler.evaluateDecisionTable(DecisionTableEvaluationHandler.java:110)
at org.camunda.bpm.dmn.engine.impl.evaluation.DecisionTableEvaluationHandler.evaluate(DecisionTableEvaluationHandler.java:80)
at org.camunda.bpm.dmn.engine.impl.DefaultDmnDecisionContext.evaluateDecision(DefaultDmnDecisionContext.java:84)
at org.camunda.bpm.dmn.engine.impl.DefaultDmnEngine.evaluateDecision(DefaultDmnEngine.java:166)
at org.camunda.bpm.engine.impl.dmn.invocation.DecisionInvocation.invoke(DecisionInvocation.java:56)
at org.camunda.bpm.engine.impl.delegate.DelegateInvocation.proceed(DelegateInvocation.java:57)
at org.camunda.bpm.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocationInContext(DefaultDelegateInterceptor.java:90)
at org.camunda.bpm.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocation(DefaultDelegateInterceptor.java:62)
at org.camunda.bpm.engine.impl.util.DecisionEvaluationUtil.invoke(DecisionEvaluationUtil.java:99)
at org.camunda.bpm.engine.impl.util.DecisionEvaluationUtil.evaluateDecision(DecisionEvaluationUtil.java:86)
at org.camunda.bpm.engine.impl.dmn.cmd.EvaluateDecisionCmd.doEvaluateDecision(EvaluateDecisionCmd.java:72)
Hello Satya, @Philipp_Ossler
can we use containsAll(“LUNCH”,“DRINK”,“DINNER”) in case we want the condition to be - input json contains all of the row values.
I want the match to happen only if we have all the strings in both the json and the row.
appreciate your help.
I am using the below expression:
every x in [“Lunch”,“Dinner”] satisfies list contains(packages, x)
it solves the problem except below scenario :
-where the input list contains something extra that isn’t in the specified list.
packages: {Lunch, Dinner} ----works
packages: {Lunch, Dinner, breakfast} ---- doesn’t match even though it has lunch and dinner.
not sure if i am missing something.
Appreciate your help.