Passing a JSON to a DMN table as input

Hello,

I have a process that receives the below JSON object as an input:

{ “variables”: {
“data”: {
“value”: “{\r\n “check”:{\r\n “id”:“62fa9904-e7ab-41cd-b1d2-d938160f0295”,\r\n “session”:“d3ac5e36-52fe-4844-990d-b9fc0557bfeb”}}”,
“type”: “Json”, “valueInfo”: {“objectTypeName”: “test”, “serializationDataFormat”: “application/json” }
},

Could you please help me to use it as an input in a DMN table from this process?

I tried with the following FEEL expression: JSON(data).prop(“check”).prop(“id”).stringValue() and set the type as String but I got the below error message:

{

"type": "FeelException",

"message": "FEEL/SCALA-01008 Error while evaluating expression: failed to parse expression 'JSON(data).prop(\"check\").prop(\"id\").stringValue()': Expected (StringIn(\"<=\", \">=\", \"<\", \">\", \"!=\", \"=\") | \"between\" | \"in\" | \"and\" | \"or\" | end-of-input):1:16, found \"(\\\"check\\\").\""

}

Thank you in advance for your help!
Bests,
Diana

Hi @DianaArti :wave:

Try to use the following FEEL expression:

data.check.id

In FEEL, you can access the JSON properties directly instead of using the Camunda Spin API.

Does this help you?

Best regards,
Philipp

1 Like

Hi Philipp!
Thank you for your help! It worked like a charm :slight_smile: I didn’t imagine the expression can be so straightforward and simple.

Bests,
Diana

1 Like