Passing complex objects via REST to evaluate decision


I asked about using complex objects in decision evaluation quiote some while ago:!topic/camunda-bpm-users/jZ6jLvRupCY. Sebastian Menski answered with this working example: I finally had some time to investiagte, as I needed this again today :slight_smile:

I found the difference: I want to do the same WITHOUT using a BPMN process instance.

I used tis request with the example from Sebastian:

POST http://localhost:8080/engine-rest/decision-definition/key/testDecision/evaluate
    "variables": {
        "claim": {
            "type": "Object", 
            "value": "{\"type\":\"Unfall\"}", 
            "valueInfo": {
                "objectTypeName": "org.camunda.bpm.example.Claim", 
                "serializationDataFormat": "application/json"

This does not work

Caused by: java.lang.IllegalStateException: Object is not deserialized.
        at org.camunda.bpm.engine.variable.impl.value.ObjectValueImpl.getValue(
        at org.camunda.bpm.engine.impl.el.VariableContextElResolver.unpack(
        at org.camunda.bpm.engine.impl.el.VariableContextElResolver.getValue(
        at org.camunda.bpm.engine.impl.javax.el.CompositeELResolver.getValue(
        at org.camunda.bpm.engine.impl.juel.AstIdentifier.eval(
        at org.camunda.bpm.engine.impl.juel.AstProperty.eval(
        at org.camunda.bpm.engine.impl.juel.AstEval.eval(
        at org.camunda.bpm.engine.impl.juel.AstNode.getValue(
        at org.camunda.bpm.engine.impl.juel.TreeValueExpression.getValue(
        at org.camunda.bpm.engine.impl.dmn.el.ProcessEngineElExpression.getValue(
        at org.camunda.bpm.dmn.engine.impl.evaluation.ExpressionEvaluationHandler.evaluateElExpression(
        ... 89 more

I tried to hand in some JSON comparable to How can pass multiple values to input variable in request body - but this seems not to be possible without adjusting my personal DMN where JUEL is used to access a Java object.

Might be that we are missing a context switch when evaluting DMN?


Hi Bernd,

it seems to be a bug, I created the issue CAM-7004. I also debugged into this and there is a context switch. Nevertheless the variable is never deserialized, not sure why.



You are right - I thought about this tonight as my daugther couldn’t sleep: I could reproduce it on Spring Boot where i definitely have the class in the classpath. So yes - seems to be a bug. Thanks for creating it!


I think this is a different problem. Could you open a separate thread please?


we are running into the same error, trying to send a complex data object via REST to the DMN for evaluation. We are using Camunda 7.10.0, is the bug still in this version?



The issue is unresolved in JIRA, and as you also see the issue I would say it still exists :frowning:


Yes, I’m getting the same error when attempting to pass in a complex data object via REST for evaluation in a DMN