Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

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

Avatar

Avatar
Validate 1
Level 1
vitor_d
Level 1

Likes

0 likes

Total Posts

6 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
vitor_d
Level 1

Likes

0 likes

Total Posts

6 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
vitor_d
Level 1

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
Establish
MVP
wodnicki
MVP

Likes

961 likes

Total Posts

1,090 posts

Correct Reply

509 solutions
Top badges earned
Establish
Affirm 500
Contributor
Shape 1
Give Back 100
View profile

Avatar
Establish
MVP
wodnicki
MVP

Likes

961 likes

Total Posts

1,090 posts

Correct Reply

509 solutions
Top badges earned
Establish
Affirm 500
Contributor
Shape 1
Give Back 100
View profile
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)