I need help wrapping my head around how the while loop in Calm works. The documentation is unfortunately not helpful at all. :/
The first thing I can’t understand is why a while loop has a fixed number of iterations. This to me is a for loop. A while loop runs while a condition isn’t met.
The second thing that’s confusing is the exit condition that I can set to Success, Failure, or Don’t Care. I guess that Don’t Care turns the while loop into an actual for loop?
The Success or Failure condition is as far as I can tell completely out of my hands as this is based on the result of the execution of the task(s) within the loop and not a parameter I control. Do I have to fail a task on purpose to keep the loop going if I choose Success as my exit condition?
What happens if I have multiple tasks in the loop, do all tasks need to fail or succeed for the exit condition to trigger?
Is it possible at all to set a parameter in one of my scripts and then use that as an exit condition?
Best answer by SrinathGSView original