Flow Designer - Wait for all task to complete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2021 09:24 AM
Hi,
I am working in Flow Designer and I need to create a wait condition for all catalog task to be completed before closing the workflow. I know that we cannot use script in the wait for condition in Flow Designer. For all the catalog task that are created through Flow, I have selected the wait option, but I am more concerned about the catalog task that are created manually.
Is there a way to build something in Flow for wait for all task to complete? I thought of using workflow and then calling it in Flow, but I am not able to pull a workflow using Requested Item. I still think that may be the best approach or possibly creating a business rule.
Does anyone have any ideas or suggestions on how to approach this?
Any help would be appreciated.
- Labels:
-
Script Debugger
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2021 09:47 AM
I think you will need to build a subflow that uses a loop or a custom action that does something simmilar. In the loop find an open record and wait for it to close. Then loop around again to see if there is another open task and wait for that one to close. Keep looping until no open records are found. Just make sure you have a break out so if it looks more than X times it ends no matter what.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2021 12:08 PM
Thank you, I think the loop may not work for me because depending on the time it take for that catalog task to be completed and I don't want the ticket to close if it looks and X amount of time.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2021 01:00 PM
You don't want it looping for infinity so you only go thru the loop X amount of TIMES, not time. So loop no more than say 50 times or twice the average number of tasks you think will be added, manually or automatically. Since the loop will wait for the first one it finds eventually it will find the task that is open the longest so it should workout just fine.
The other option would be to do a loop and have it wait for each task but the issue with the is it will only query 1 time and if tasks are not all added at the same time it will not work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2022 07:23 PM
Probably too late for the initial query, but would you be able to keep a count of the catalog tasks that have to be completed before the flow is ended? If this task count is held in the request item record, accessible to every task, it could be updated by each individual task upon completion. The flow would just have a single wait condition for the task count to be back to 0.