How to get output from subflow

GBS
Tera Contributor

I have created a subflow and given input as requested item and in the actions I have created two catalog tasks and given the wait for condition and now I was unable to get the output of the subflow to the mainflow where I want to close the ritm in the mainflow. Any idea how to get the task state from the wait for condition? If I use assign subflow outputs the flow gets an error content not found

GBS_0-1741354133440.png

 

12 REPLIES 12

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @GBS 

 

https://developer.servicenow.com/dev.do#!/learn/learning-plans/xanadu/servicenow_application_develop...

 

https://www.servicenow.com/community/developer-forum/flow-designer-how-to-use-subflow-outputs-in-flo...

 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Ankur Bawiskar
Tera Patron
Tera Patron

@GBS 

you can define Output variables for your subflow and then assign it.

Then you can access those in main flow

Adding Subflow Outputs 

flow designer - How to use subflow outputs in flow script 

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

GBS
Tera Contributor

@Ankur Bawiskar @Dr Atul G- LNG Thanks for the response, but if I use the Assign Subflow Output and give the data in subflow I'm getting an error(Your subflow cannot be found. Subflow sys_id:An) and I was unable to open the flow.

@GBS 

are you sure subflow is published?

try adding the published subflow again in your main flow.

Please share some screenshots

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