I have an approval process flow that handles approval responses from multiple groups at once.
An Apply to Each loop, which executes in parallel, handles approval creation and wait for each response group. The Wait action has a timeout of 2 weeks. If no responses are received (Checked using Dataverse) by these two weeks and the Wait action results in a timeout, the flow enters a Do While loop within the For Loop. In this Do While loop, a Wait action for one day is executed. Responses are checked again. If no response was received, a reminder email is sent. And the Do Loop executes again. The Do Loop will execute for 13 more days. After which, the Do Loop and Apply to Each loops are exited, so that the flow can evaluate which of the Approval requests groups received responses and how to proceed.
The Apply to Each and Do Loops function as expected; I use Configure Run After to check for timeout on the Await connector, and all actions within the loops execute as intended in the case of successful response or timeout.
The issue is at the end of the Apply to Each loop. For some reason, despite the fact that only a timeout condition occurs and is handed with Configure Run After, and all actions within the loops execute as expected, the Apply to Each loop returns a state of Failure. The rest of the flow doesn't execute because the rest of the flow relies on a status of either succeed or timeout.
I cannot simply change the rest of the flow to run regardless of status of the Apply to Each Loop (Failure, timeout, succeeded) this is poor practice and when tested led to extensive issues. I also tried testing the source of this behavior with a smaller flow, but my test resulted in expected behavior; the Apply to Each loop result was Success. So why is my larger flow resulting in an error? How do I fix my actual flow?