How to pass variable values from workflow to Flow designer and subflow

anvitha ash
Tera Contributor

Hello community 

 

I have workflow and flow designer flow and subflow, all three are related to a catalog item. Main flow is workflow 

 

1. I want to pass variable values from workflow to Flow and subflow in flow designer. Is there any way where using which we can pass variable values from workflow to Flow? 

2.How to invoke flow and subflow using the workflow?

 

Thanks in advance 😃 

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@anvitha ash 

you can invoke flow, subflow using run script activity in workflow and pass the inputs to subflow

Scripting with Flows, Subflows, and Actions 

How to call Flows using Scripts 

Also you can open your subflow and use Create code snippet and it will tell you how to invoke it

AnkurBawiskar_0-1737098410940.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

9 REPLIES 9

Ankur Bawiskar
Tera Patron
Tera Patron

@anvitha ash 

you can invoke flow, subflow using run script activity in workflow and pass the inputs to subflow

Scripting with Flows, Subflows, and Actions 

How to call Flows using Scripts 

Also you can open your subflow and use Create code snippet and it will tell you how to invoke it

AnkurBawiskar_0-1737098410940.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Ankur Bawiskar 

 

  • I have gone through the links which you have provided. I am still not clear on how we can pass ritm variable values from workflow to flow or subflow 

@anvitha ash 

You know these 2 things

1) you can call flow via script of workflow run script

2) you can pass inputs to subflow via script

what's the challenge in sending the ritm variable to subflow?

I didn't get. please share what you tried and what debugging have you done so far?

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Ankur Bawiskar 

 

I have 2 variable values which i have stored in 

Var1 = abc, var2 = xyz

Now when I invoke a flow from a workflow I also want the variables var1 and var2 to be passed in the flow and there I want to use these var1, var2 and run the flow according 

How to pass these var1, var2 in flow from workflow. Need help with syntax