Flow Designer - how to manage incomplete parallel tasks when tasks may or may not be created

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2023 04:09 PM - edited 01-10-2023 04:20 PM
I struggled with this a great deal and had difficulty finding an answer in the community so thought I'd share my solution.
Problem Statement: Flow designer tasks are created conditionally in parallel and you want to mark the request closed incomplete only if ALL tasks are closed incomplete. If all tasks are created it is easy to manage closed incomplete but say only 2 of 3 tasks are created, then how do you know if ALL tasks that were created are closed incomplete.
Step 1 - Create a flow with tasks created in parallel that are only created when condition is true
Step 2 - Query all tasks created for the Requested Item
Step 3 - Query all tasks created for the Requested Item that have a state of "Closed Incomplete"
Step 4 - Create if statement that compares the count of each query
Step 5 - If Count of all = count of Closed incomplete -- then update your request item stage/state to reflect the request has been cancelled/closed incomplete
NOTE: I also ended my flow there so as not to overwrite the cancelled value with closed complete which is my final flow step.
Examples:
- If all 3 tasks are create and only 1 is closed incomplete the count query will show 1 = 3 and will close the request as complete
- If 2 tasks are created and both are closed incomplete the count query will show 2 = 2 and will close the request as cancelled
Hope this helps!
- 1,432 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2023 10:32 AM
I was actually looking for this exact use case. Thanks