I want to create something similar to a while-loop. Check 5 times if the call has the status “completed”. If the call is not completed then sleep for the maximum duration of 300s and check again.
What is the problem?
If the call is completed I want to exit the loop. The top flow should be executed only once.
you can try something like this. Basically you want to throw an error on the top route so it breaks the scenario and do the rest inside the error handler route. And if it doesnt go on the top route it will keep repeating until it does or you run out of repeats.
If it gets to 5 retries without hitting completed, then the repeater just exits automatically and passes through with the last status. Then you can add any another condition.
This other method allows you to check multiple times at shorter intervals, because you “throw” an error to break from the repeater and end the scenario when successful/completed.