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

litchick10
Tera Guru

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

litchick10_0-1673395419421.png

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

litchick10_1-1673395576569.png

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 REPLY 1

Brian107
Tera Contributor

I was actually looking for this exact use case. Thanks