I’ve got a workflow that runs a process in a guest OS, then loops until I get an exit code and I want to pass that exit code back out but it’s not working.
Basically my code looks like:
for (i=0; i < res.length; i++)
{
if (res[i].pid==pid)
{
if (res[i].exitCode >= "0" || res[i].exitCode < "0") //not null, checking for null wasn’t working back when I tried
{
processComplete=true;
exitCode=res[i].exitCode;
}
}
}
System.log(exitCode)
Works great, I log the exit code
Problem is the output never seems to make it out of the workflow.
I have a couple more elements in my workflow and just before the end, I added a scriptable task, added the output exitCode in order to access it and then went:
System.log(exitCode)
vRO logs “null”
I can’t figure out why everything seems to be ok within one scriptable task then not ok in the next and I lose access to my exit code.