Evaluate decisions with Object inputs

Im looking to evaluate DMN decisions in postman - specifically with objects as the field input.

I have the following decision working.



So next im looking to use an object dinnerDto

However when I try to avaluate teh decision with an object it does not work anymore?

Tried with the following Post inputs

http://localhost:8088/rest/decision-definition/key/dish/evaluate

{
  "variables" : {
    "dinnerDto" : { "value" : {  "season": "SPRING" } , "type" : "Object" }
  }
}


{
  "variables" : {
    "dinnerDto" : { "value" : "{  \"season\": \"SPRING\" }" , "type" : "Object" }
  }
}

However cannot get it working. Errors its returning back are

{
    "type": "RestException",
    "message": "Cannot evaluate decision dish:1:d3f2e43f-d7a0-11e8-ac21-029a327f680e: Exception while evaluating decision with key 'null'"
}
Caused by: java.lang.IllegalStateException: Object is not deserialized

Hi @Rob_Davidson,

if you want to pass a complex object via Rest API then the object must be serialized, for example using JSON. Please have a look at the docs.

{
    "variables": {
        "dinnerDto": {
            "type": "Object", 
            "value": "{  \"season\": \"SPRING\" }", 
            "valueInfo": {
                "objectTypeName": "example.DinnerDto", 
                "serializationDataFormat": "application/json"
            }
        }
    }
}

Best regards,
Philipp