While loop not exiting as expected

Hi There,
I have used a While loop to work on certain steps with “time” whenever it encounters a particular time then loop should stop.

This application logs out when some constraints are met but it does not come out of while loop.
Please check and suggest.

Thanks …!

Hi @asalimath what value do you have in variable ${var_stoptime}? Is it a DateTime type of variable?

Hi ashapina,

here I am getting the current date and converting it to HH:mm using Dateformat and storing it in output variable of type string( var_stop time)

Do you have an action inside the While loop that updates the value of ${var_stoptime}?

No…I have not defined any action inside the While loop that updates the value of ${var_stoptime}

Then it creates an infinite loop.
If the value of ${var_stoptime} never updates, the loop will never stop.
At the very end of the loop, you need to have the same 2 actions that will update the time stored in the variable.

Thanks ashapkina …!

1 Like