Here’s an annoyingly wierd one.
I have a workflow that does parsing to create a string for use in a powershell script.
This is what the script looks like:
//Prep Hardcoded Values for use in Powershell
def vCentersList = xpath:{/workflow/configuration/vCenters};
def vCenterCount = vCentersList.size();
def BackupPolicies = xpath:{/workflow/configuration/BackupPolicies};
def forCounter = 0;
// Convert vCenter List to vCenter String
StringBuilder strbul = new StringBuilder();
strbul.append("@(");
for(String str : vCentersList)
{
forCounter++;
strbul.append("'");
strbul.append(str.replaceAll("\\s",""));
strbul.append("'");
if (forCounter != vCenterCount){strbul.append(";");}
}
strbul.append(")");
String vCenters = strbul.toString();
workflow.setVariable("vCenters",vCenters);
return vCenters;
The input is a list of vCenter cliententities.. which looks something like this:
/“vCenter1”, “vCenter2”, “vCenter3”]
When I run the script in the debugger the script returns the following:
@('vCenter1';'vCenter2';'vCenter3')
When I run execute the script this is what the workflowengine.log shows:
@()
LOL,