DMN Result "List" Processing Best Practice

I am getting a result set back from the DMN table using a Collect hit policy (any policy that returns all Outputs, even they are not the same, would also be relevant). I know I’m getting results back as a simple test shows the returned JSON.

What I want to do is iterate through this result list using groovy script within a script task. I’m specific about groovy as I’m trying to get us to standardize on one scripting language and it appears to have the greatest functionality. What I am getting back is a list of URLs for which I want to run a check on the Camunda REST API (these would be on servers other than the one running the process). The order in which they’re processed doesn’t matter.

My thinking is that I’ll have to use an indexed list of some sort and as the activities to perform the check execute and iterate to the next server, change a process variable to indicate which server we’re on. When no more servers are available, the process loop exits to different activity.

Essentially what I’m asking for is to be “spoon fed” the Groovy script to extract the DMN results into an “array” (or whatever) that I can iterate through. I’m not even sure how to reference process variables in Groovy as I’ve only ever done it in JavaScript and Java. It should be obvious at this point that I’m a novice Groovy programmer.

Any help on configuration of the BPMN code to support the solution would also be appreciated.

I promise I’ve read the Camunda manual on what I think are the relevant sections. This question may go beyond the scope of what is appropriate to ask in this forum. Following is output from a decision:

[
    {
        "camundaRestApiUrl": {
            "type": "String",
            "value": "https://camunda_03.co.com:8443",
            "valueInfo": {}
        },
        "urlType": {
            "type": "String",
            "value": "single",
            "valueInfo": {}
        }
    },
    {
        "camundaRestApiUrl": {
            "type": "String",
            "value": "https://camunda_03.co.com:8443",
            "valueInfo": {}
        },
        "urlType": {
            "type": "String",
            "value": "single",
            "valueInfo": {}
        }
    },
    {
        "camundaRestApiUrl": {
            "type": "String",
            "value": "https://camunda_02.co.com:8443",
            "valueInfo": {}
        },
        "urlType": {
            "type": "String",
            "value": "single",
            "valueInfo": {}
        }
    },
    {
        "camundaRestApiUrl": {
            "type": "String",
            "value": "https://camunda_04.co.com:8443",
            "valueInfo": {}
        },
        "urlType": {
            "type": "String",
            "value": "single",
            "valueInfo": {}
        }
    }
]