Hi there,
[Details: vro 6.0.2 build: 2700137 ]
I have this below code to save the launched worflow parameters.
var wfToken = workflowToLaunch.execute(workflowParameters);
Following are the outputs of launched workflow:
1. dbUpdated (boolean)
2. errorOutput (string)
3. uuid (string)
I am trying to get the values from wfToken variable using following code:
var outputs = wfToken.getOutputParameters();
The issue is that only dbUpdated and uuid are showing up where as errorOutput is null. I can see in the launched workflow logs that the errorOutput has a value but it shows null when I try to get it using below method. Please help.
System.log ("+++++++++++++++++++++++" + outputs.get("uuid"))
System.log ("+++++++++++++++++++++++" + outputs.get("errorOutput"))
System.log ("+++++++++++++++++++++++" + outputs.get("dbUpdated"))
Thank you,
Ritu
Hi,
Please check the following:
Here is some sample code:
var wfToken = workflowToLaunch.execute(workflowParameters, user, password);
while (wfToken.state == "running") {
System.log("still running, wait for 1 sec...");
System.sleep(1000);
}
System.log("state -> " + wfToken.state);
var outputs = wfToken.getOutputParameters();
// proceed with fetching output parameter values
Hi IIian!
Thanks much for replying. I did check both the things you mentioned. The binding looks fine (I can see in wf run variables the errorOuput being populated and status is complete before accessing the values) . Here is the log:
[2016-03-03 10:17:39.773] [I] Waiting for State = running
[2016-03-03 10:18:39.780] [I] Workflow completed. Status = completed
[2016-03-03 10:18:39.786] [I] +++++++++++++++++++++++null
[2016-03-03 10:18:39.786] [I] +++++++++++++++++++++++false
[2016-03-03 10:18:39.786] [I] +++++++++++++++++++++++null
Could it be because vRO wftoken only supports one output ? In my original post I was incorrect that I saw both uuid and dbupdated populated in the same run.
vRO supports multiple outputs per a workflow token.
I did a quick test in my environment, and it worked fine. Could you export your 2 workflows (as .workflow files) and send them to me to take a look (either attach them here, or send them in a private message)?
Hey IIian!
Found the issue. Wasnt using the right if condition. Sorry for wasting your time
while(wfToken.state!="completed" && wfToken.state!="failed"){
System.sleep(60000)
}