How to - Json Parse DMN Output

I am using a DMN with 2 outputs and it is returning a java.util.ArrayList. How can I interact with the Key : value returned using JavaScript?

I changed the type of the task to connector and the output now is one Json with the following result:
[{“statusAprovacao”:{“type”:“String”,“value”:“Pre aprovado”,“valueInfo”:{}},“analisar”:{“type”:“Boolean”,“value”:true,“valueInfo”:{}}}]

When I try to get the variables returned by the task, I used the following script:
var json = S(response);
var statusAprovacaoCredito = json.prop(“analisar”);
var status = statusAprovacaoCredito;

But the result I received is:
The process could not be started. :
SPIN/JACKSON-JSON-01004 Unable to find

Hi @Rudson_Rodrigues,

can you provide your DMN + BPMN as a failing test case?

How do you evaluate the DMN decision table? (Business Rule Task, via REST API, …)

Best regards,

Use a Business Rule Task Listeners end:Script in JavaScript like this:

var analisarResultado = execution.getVariable("analisarResultado");
var json = S(analisarResultado, 'application/json');
execution.setVariable("jsonVar", json);
1 Like