[Solved] Decision activity return JSon variable unusable in script activity


I have designed a process which includes a decision activity (based on a decision table). I set hit policy to “order output”, so I get multiple matches. The result is stored in a variable which type is json.

My question is how to use valuse in this variable in others activies, all my attempts to access value return null ?

here it is my variable :
“name”: “reqNotFunSelRes”,
“type”: “json”,
“value”: [
“priority”: “1”,
“resolution”: “script2”
“priority”: “2”,
“resolution”: “script1”
“priority”: “10”,
“resolution”: “secours”
“scope”: “local”

How I tried to access :

var resolution = execution.getVariable(“reqNotFunSelRes”);
resolution[0].resolution -> return null

Can you check if resolution actually exists as a variable (through the api / database). And if so, what its value is?

Via API, it is not defined.

If I want to define I must use execution.setVariable

I solved my issue by switching my script from javascript to groovy. Javascript doesn’t allow to use json object in script activity, but groovy does.