I have a while loop which will be executing for 3 minutes. I have 3 elements to be checked and if neither of the elements are found, then the while loop will exit throwing a exception. Below is my code. While loop is not getting stopped after 3 min. Someone please check and let me know what wrong i have made
It is behaving as infinite loop. I need to stop loop after one hr[if none of the elements found] or whenevr one of the three elements are found. For testing purpose i gave 3 min and checked.
@Sirisha_Siri change the type of your variable time to “System.DateTime”, comparison will be like:
Datetime.now.addMinutes(6) < time (Dont use .ToString to make it string)
my while loop has to execute for 6 minutes. I need to give condition in while loop to compare current time with time after 6 minutes. while loop will check 3 elements using element exists activity. if neither of the elements found within 6 minutes, it has to come out of the loop. But in my code loop is executing continously irrespective of time
i have used assign activity and assigned time before while loop. even though condition is not becoming false. while loop is getting executed continously. Please help @postwick
So in that 6 minutes , is your process perform some other actions or just keeps on looping??
If that is the case you can use a delay activity and get the value to another variable and then use a if condition to compare the dates insitead of a loop.
He doesn’t want a X minute delay. He wants it to loop for X minutes, repeatedly checking for the elements.
And in your scenario there’s no reason for Parallel. Parallel doesn’t execute activities at the same time. The Do While would execute, then the delay, then the assign.