Passing a JSON through DMN


I have a simple decision table that looks like this:

The input use for the decision table is a json object, sent with postman:

{“customer” : {“value”:"{\ "age\ “:24}”, “type” : “json”}

In my table I enter the following FEEL expression to evaluate variable from my JSON:

The problem is that I can only output objects of type string,boolean..., but not json and I would like to re-use my DMN JSON input and forward it directly as a JSON without touching it. In other words,
how to pass an input to an output in the DMN?

Best, Ch.

Hi @ChrisB,

the output is not limited to the primitive types. In the Camunda modeler, you can just write some type in the field (e.g. json) instead of selecting one from the list. See more details in the docs.

So, in the output, you can reference your JSON variable directly or providing an expression.

Does this help you?

Best regards,

Hi @Philipp_Ossler,

Thanks for your reply, great to see that it’s possible to define another type in the table. However, I don’t know how to clearly reference my input variable as an output in the table, I tried:

But I receive the following message in Postman:
"message": "Cannot instantiate process definition process_test:2:41ce1cf7-f63f-11e9-92e3-50eb7136ed6c: Cannot serialize object in variable 'decisionResult': org.camunda.spin.impl.json.jackson.JacksonJsonNode"

Any idea how to properly reference my JSON variable?

Best, Ch.

What happen if you just call the variable by name customer?

This what I get when I just put customer in the cell:

“type”: “RestException”,
“message”: “Cannot instantiate process definition process_test:3:b2452da8-f652-11e9-92e3-50eb7136ed6c: Cannot serialize object in variable ‘decisionResult’: org.camunda.spin.impl.json.jackson.JacksonJsonNode”

Any idea @Philipp_Ossler?

were you able to find the way to do this (referencing input variables in output )