Send variables to a subworkflow
Is there a way to send variables to a subworkflow?
Like for example, I generate a variable a = 1 in a workflow, then call a subworkflow that takes A value and adds 5 to it. Is it possible? How can I do it?
Is there a way to send variables to a subworkflow?
Like for example, I generate a variable a = 1 in a workflow, then call a subworkflow that takes A value and adds 5 to it. Is it possible? How can I do it?
Hello @campaignerforlife
In your main wf define the variable like this:
vars.mainWFVar=1;
Master WF:

Then in the Sub-workflow you can use the same variables to add values to it:
vars.varfromMainWF = vars.mainWFVar + 5;
logInfo(vars.varfromMainWF)
Sub-workflow

And if you start the mast WF you see the updated added in the logs:

Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.