JSON to evaluate DMN

Hello guys.

I have a question to evaluate a decision definition.

When I use the API: “/decision-definition/key/{key}/evaluate”, can I send a input JSON variable? And return a JSON variable?

// Input Evaluate
{
“variables”:{
“bankAccount”:{
“value”:"{“accountNumber”:“137000319524”,“routingNumber”:“000000000”,“currentBalance”:5000,“availableBalance”:5000}",
“type”:“Json”
}
}
}

// Response Evaluate
{
“close-audit-check”: {
“type”: “String”,
“value”: “FAIL”,
“valueInfo”: {}
},
“all-investors-accredited”: {
“type”: “String”,
“value”: “FAIL”,
“valueInfo”: {}
}
}

Regards,

Hi @brunovasquesf typically you need to pass in an escaped and properly formatted string in order for it to be properly interpreted as JSON like

“value”:"{\“accountNumber\”:\“137000319524\”,\“routingNumber\”:\“000000000\”,\“currentBalance\”:5000,\“availableBalance\”:5000}"
1 Like