Best way to pass variables or parameters to a sub-workflow?

Avatar

Avatar

vitor_d

Avatar

vitor_d

vitor_d

12-02-2021

I am attempting to create shared (sub) workflows which other users could reuse them to do common tasks. What would be the best/proper way to pass variables that would work as parameters to these sub-workflows?

 

Atm I am using instance variables, but I have a major issues with it. The following workflow, for example:

 

nlclient_C0kTDNBQBT.png

Both sub-workflows use the instance.vars.parameter. Internally, on my sub-workflow, I would build a logic that halts the execution if the variable/parameter is not properly set. But, if the user forgets to set it on the second fork path, it will use the same instance.vars.parameter value of the first fork path.

 

Does anyone have any suggestions on how to approach it?

Question workflow

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

wodnicki

MVP

Avatar

wodnicki

MVP

wodnicki
MVP

15-02-2021

Hi,

 

AFAIK it's just instance.vars available to sub-workflow, though can also use xtk:option with get/setOption().

Set a diff parameter for each path?

 

Thanks,

-Jon

Answers (0)