Hi folks,
I tried to read the current input params and values of the current root workflow, but I failed.
I can only retrieve the input params of the current (sub) workflow, but it does not work for the main (root) workflow.
Here is an example (works only for current workflow token, not for the rootWorkflow):
https://www.funkycloudmedina.com/2018/02/enumerate-vro-workflow-inputs-into-a-json-object/
There is an attribute "parameterInfos" (see vRO API Explorer by Dr Ruurd and Flores of ITQ ), but it's undefined or not filled accordingly.
Does somebody have some hints?
Thx.
Cheers
Roland
You should be able to get this info from the attributes stack of the workflow execution.
Here is some code that dumps the whole attributes stack:
var stack = workflow.attributesStack;
for each (var stackEntry in stack) {
System.log(">>> stack entry begin");
for each (var p in stackEntry) {
System.log(" Param: " + p.name + " = " + p.value);
}
System.log("<<< stack entry end");
}
Hi,
Please provide more information - how do your root/dub workflows look like (ideally, export and attach them there so the problem can be reproduced), how do you call the sub workflow, what parameters are there are which of them are bound to the sub workflow, what exactly is not working?
The thing is: Is there an easy way to find out the current input values of the root workflow (implemented in a sub-workflow)?
I am using vRO 7.5.
I have 2 workflows:
* main
* sub
var params = workflow.getInputParameters();
for (var property in params) {
System.log(property + ": " + params.get(property));
}
includes only the sub workflow.
But the workflow run only prints the input params of the sub-workflow and not of the calling main/root workflow.
var params = workflow.rootWorkflow.getInputParameters();
for (var property in params) {
System.log(property + ": " + params.get(property));
}
You should be able to get this info from the attributes stack of the workflow execution.
Here is some code that dumps the whole attributes stack:
var stack = workflow.attributesStack;
for each (var stackEntry in stack) {
System.log(">>> stack entry begin");
for each (var p in stackEntry) {
System.log(" Param: " + p.name + " = " + p.value);
}
System.log("<<< stack entry end");
}
Illian, you are my hero!