Hey guys.
I do a POST to http://localhost:8080/engine-rest/engine/default/decision-definition/key/notwendigeKompetenz/evaluate according to https://docs.camunda.org/manual/7.4/reference/rest/decision-definition/post-evaluate/
I want to hand over a Java Object to rule evaluation. So I do the same I would do when starting a process instance:
{
"variables": {
"claim": {
"value": "{\"type\":\"Unfall KFZ\",\"expenditure\":\"100\"}",
"type": "Object",
"valueInfo": {
"serializationDataFormat": "application/json",
"objectTypeName": "com.camunda.demo.dmntraining.taskrouting.Claim"
}
}
}
}
But it seems that in this case Spin is not used to deserialize the JSON to a Java Object?
I get this stack trace:
10:48:11,172 WARNING [ExceptionHandler] (default task-27) org.camunda.bpm.engine.rest.exception.RestException: Cannot evaluate decision notwendigeKompetenz:1:d6
at org.camunda.bpm.engine.rest.sub.repository.impl.DecisionDefinitionResourceImpl.evaluateDecision(DecisionDefinitionResourceImpl.java:150)
…
Caused by: org.camunda.bpm.engine.ProcessEngineException: Exception while evaluating decision with id 'notwendigeKompetenz:1:d68b39e4-bc1d-11e5-a86f-984920524153'
at org.camunda.bpm.engine.impl.dmn.cmd.EvaluateDecisionByIdCmd.doEvaluateDecision(EvaluateDecisionByIdCmd.java:70)
at org.camunda.bpm.engine.impl.dmn.cmd.EvaluateDecisionByIdCmd.execute(EvaluateDecisionByIdCmd.java:61)
at org.camunda.bpm.engine.impl.dmn.cmd.EvaluateDecisionByIdCmd.execute(EvaluateDecisionByIdCmd.java:38)
at org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)
at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:95)
at org.camunda.bpm.engine.impl.interceptor.JtaTransactionInterceptor.execute(JtaTransactionInterceptor.java:58)
at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:30)
at org.camunda.bpm.engine.impl.DecisionServiceImpl.evaluateDecisionTable(DecisionServiceImpl.java:47)
at org.camunda.bpm.engine.impl.DecisionServiceImpl.evaluateDecisionTableById(DecisionServiceImpl.java:34)
at org.camunda.bpm.engine.rest.sub.repository.impl.DecisionDefinitionResourceImpl.evaluateDecision(DecisionDefinitionResourceImpl.java:133)
... 48 more
Caused by: org.camunda.bpm.dmn.engine.impl.DmnEvaluationException: DMN-01002 Unable to evaluate expression for language 'juel': '${claim.type}'
at org.camunda.bpm.dmn.engine.impl.DmnEngineLogger.unableToEvaluateExpression(DmnEngineLogger.java:32)
at org.camunda.bpm.dmn.engine.impl.DefaultDmnDecisionContext.evaluateElExpression(DefaultDmnDecisionContext.java:329)
at org.camunda.bpm.dmn.engine.impl.DefaultDmnDecisionContext.evaluateExpression(DefaultDmnDecisionContext.java:297)
at org.camunda.bpm.dmn.engine.impl.DefaultDmnDecisionContext.evaluateInputExpression(DefaultDmnDecisionContext.java:217)
at org.camunda.bpm.dmn.engine.impl.DefaultDmnDecisionContext.evaluateInput(DefaultDmnDecisionContext.java:112)
at org.camunda.bpm.dmn.engine.impl.DefaultDmnDecisionContext.evaluateDecisionTable(DefaultDmnDecisionContext.java:93)
at org.camunda.bpm.dmn.engine.impl.DefaultDmnEngine.evaluateDecisionTable(DefaultDmnEngine.java:95)
at org.camunda.bpm.engine.impl.dmn.invocation.DecisionTableInvocation.invoke(DecisionTableInvocation.java:52)
at org.camunda.bpm.engine.impl.delegate.DelegateInvocation.proceed(DelegateInvocation.java:54)
at org.camunda.bpm.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocationInContext(DefaultDelegateInterceptor.java:86)
at org.camunda.bpm.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocation(DefaultDelegateInterceptor.java:58)
at org.camunda.bpm.engine.impl.delegate.DefaultDelegateInterceptor$1.call(DefaultDelegateInterceptor.java:52)
at org.camunda.bpm.engine.impl.delegate.DefaultDelegateInterceptor$1.call(DefaultDelegateInterceptor.java:49)
at org.camunda.bpm.engine.impl.context.ProcessApplicationClassloaderInterceptor.call(ProcessApplicationClassloaderInterceptor.java:44)
at org.camunda.bpm.application.AbstractProcessApplication.execute(AbstractProcessApplication.java:109)
at org.camunda.bpm.engine.impl.context.Context.executeWithinProcessApplication(Context.java:186)
at org.camunda.bpm.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocation(DefaultDelegateInterceptor.java:49)
at org.camunda.bpm.engine.impl.util.DecisionTableUtil.invoke(DecisionTableUtil.java:86)
at org.camunda.bpm.engine.impl.util.DecisionTableUtil.evaluateDecisionTable(DecisionTableUtil.java:81)
at org.camunda.bpm.engine.impl.dmn.cmd.EvaluateDecisionByIdCmd.doEvaluateDecision(EvaluateDecisionByIdCmd.java:67)
... 57 more
Caused by: java.lang.IllegalStateException: Object is not deserialized.
at org.camunda.bpm.engine.variable.impl.value.ObjectValueImpl.getValue(ObjectValueImpl.java:86)
at org.camunda.bpm.engine.impl.el.VariableContextElResolver.unpack(VariableContextElResolver.java:73)
at org.camunda.bpm.engine.impl.el.VariableContextElResolver.getValue(VariableContextElResolver.java:42)
at org.camunda.bpm.engine.impl.javax.el.CompositeELResolver.getValue(CompositeELResolver.java:231)
at org.camunda.bpm.engine.impl.juel.AstIdentifier.eval(AstIdentifier.java:81)
at org.camunda.bpm.engine.impl.juel.AstProperty.eval(AstProperty.java:52)
at org.camunda.bpm.engine.impl.juel.AstEval.eval(AstEval.java:50)
at org.camunda.bpm.engine.impl.juel.AstNode.getValue(AstNode.java:26)
at org.camunda.bpm.engine.impl.juel.TreeValueExpression.getValue(TreeValueExpression.java:114)
at org.camunda.bpm.engine.impl.dmn.el.ProcessEngineElExpression.getValue(ProcessEngineElExpression.java:43)
at org.camunda.bpm.dmn.engine.impl.DefaultDmnDecisionContext.evaluateElExpression(DefaultDmnDecisionContext.java:325)
... 75 more
My fault? Bug? Missing Feature?
Thanks and cheers
Bernd
Anybody?
--
You received this message because you are subscribed to the Google Groups "camunda BPM users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
camunda-bpm-us...@googlegroups.com.
To post to this group, send email to
camunda-...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/camunda-bpm-users/DB5PR06MB0966F727B78520A9F904D90AE8CE0%40DB5PR06MB0966.eurprd06.prod.outlook.com.
For more options, visit https://groups.google.com/d/optout.
POST /engine-rest/process-definition/key/testProcess/start HTTP/1.1Great – thanks!
So I take this as „should work” and will investigate further. Thanks a lot! I basically wasn’t sure if it is supported and should work or not…
--
You received this message because you are subscribed to the Google Groups "camunda BPM users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
camunda-bpm-us...@googlegroups.com.
To post to this group, send email to
camunda-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/camunda-bpm-users/5cba4a73-0e64-43be-9e4d-adce48dd6bc4%40googlegroups.com.