I have the following function setup in a script :
JSONObject getVmwareApiOutput(String apiUrl, String vCenterSessionToken){
ExecuteSuperProcess getVmwareApi = new ExecuteSuperProcess();
getVmwareApi.processBlock = WorkflowElement.parse("<processBlock>pbGetVmwareApi</processBlock>");
getVmwareApi.inputs = WorkflowElement.parse("<inputs><url>" + apiUrl + "</url><vmware-api-session-id>" + vCenterSessionToken + "</vmware-api-session-id></inputs>");
getVmwareApi.execute(workflow);
JSONObject vmWareApiOutput = new JSONObject(xpath:{/workflow/variables/restCallOutPut}.replace(""","").replace("]",""));
return vmWareApiOutput;
}
This works fine the first time I call the script.
But subsequents calls result in the following:
9908 ExecuteSuperProcess : Search vCenters for Virtual Machines (scrSearchForVirtualMachine)] process block for super process id s9321], has already completed
9908 ExecuteSuperProcess : Search vCenters for Virtual Machines (scrSearchForVirtualMachine)] process block for super process id e9321], has already completed
9908 ExecuteSuperProcess : Search vCenters for Virtual Machines (scrSearchForVirtualMachine)] process block for super process id o9321], has already completed