2017-09-19 12:11:47,026 ERROR [org.camunda.bpm.engine.context] (default task-6) ENGINE-16004 Exception while closing command context: Unknown method used in expression: ${urls.elements()}. Cause: Cannot find method elements with 0 parameters in class java.util.ArrayList: org.camunda.bpm.engine.ProcessEngineException: Unknown method used in expression: ${urls.elements()}. Cause: Cannot find method elements with 0 parameters in class java.util.ArrayList
The configuration of the multi-instance activity is not entirely correct. The “element variable” property is the name of the variable that each element of the loop collection is assigned to. So if you loop over urls, url would be a good element variable name. Then, in the connector configuration, use the element variable for the url parameter, i.e. the script would become ${url}.
Note that you set a variable of type java.util.ArrayList. This class has no method #elements, so you got the exception you posted.#elements is a method of the class SpinJsonNode, which is a wrapper for native JSON variables, i.e. where you don’t have a direct Java object representation of the value.