I have an Automation Script that worked fine in TDP 3.0.1. I now have TDP 3.6 (and have also tried it in 3.5) but the WHILE LOOP in the Automation Script are not evaluating the condition correctly once it has gone through the loop. Here’s what I mean:
I have a variable that determines the status of a job in my application. I then have a WHILE LOOP to check the status, and to wait 15 minutes before checking again. So, for example, this works fine:
-
STATUS is set, and STATUS = 0 (which means the job has completed).
-
Script enters the WHILE LOOP, where the condition is #STATUS#=1
-
TDP correctly evaluates that #STATUS#= is FALSE, and exits the WHILE loop and continues as expected.
However, the following does NOT work: -
STATUS is set, and STATUS = 1 (which means the job is still running).
-
Script enters the WHILE LOOP, where the condition is #STATUS#=1
-
TDP correctly evaluates that #STATUS#=1 is TRUE, then pauses for 15 minutes, and then sets STATUS=0 before looping.
-
The log shows STATUS=0, but also shows that the WHILE condition (#STATUS#=1) is TRUE. When it is clearly telling me that it is 0.
-
The script continues to get a status of 0, but evaluate the condition to TRUE until the loop limit is reached, and the rest of my script fails.
Please help!! What am I doing wrong?!
Andrea