Passing information back to main flow from subflow

STRNow
Tera Contributor

Hello,

 

Most of the information I'm finding here seems a little dated and I feel this is a pretty popular question but I'm not having any luck finding it.

 

We have a list of "projects" with multiple managers for each project. I have a catalog item where if their project is mentioned I needed to ask for individual approvals for each project mentioned. I found out that Flow Designer kept hanging as there is no wait bypass avaible for approval processes for these tasks so I created a subflow to create the tasks instead. This worked. I'm able to see each project get its own task created and all managers beinged askes for approval.

 

 Main flow:

Screenshot 2023-12-21 at 5.51.15 PM.png

 

Sub flow:

Screenshot 2023-12-21 at 5.52.01 PM.png

 

The problem now is that I have I want to be able to wait for all those tasks to be completed before continuing with my main flow, but I have no idea how to reference those tasks created back in my mainflow. How can I do that?

I've attached my diagrams for reference.

1 ACCEPTED SOLUTION

Saurabh Gupta
Kilo Patron
Kilo Patron

Hi,
If I understood the problem correctly, what you need to do is to create a custom field on RITM table say "All tasks completed" and wait for this flag to be true in main flow.
You can check this flag after closure of each task with a onAfter BR and check if within the parent RITM all tasks got closed if yes mark this flag as true.



Thanks and Regards,

Saurabh Gupta

View solution in original post

9 REPLIES 9

Hi @STRNow I just tried with do in Parallel, works fine in my PDI

 

Catalog task 1

Ask for approval

catalog task 2

 

Catalog task 2 triggered though approval is not approved yet

 

HarishKM_0-1703213004398.png

HarishKM_1-1703213020512.png

 

Regards
Harish

STRNow
Tera Contributor

Hey Harish,

 

the problem is the way my tasks are created are based on the For each statement which I need for tasks to be created for each sys ID selected in my catalog item.

 

the above method works if it was a static task created.

 

i can’t loop a do in parallel for my for each statement. 

Saurabh Gupta
Kilo Patron
Kilo Patron

Hi,
If I understood the problem correctly, what you need to do is to create a custom field on RITM table say "All tasks completed" and wait for this flag to be true in main flow.
You can check this flag after closure of each task with a onAfter BR and check if within the parent RITM all tasks got closed if yes mark this flag as true.



Thanks and Regards,

Saurabh Gupta

@STRNow 



Thanks and Regards,

Saurabh Gupta

Giving this a shot to see if it works.