I am working on a billing project in which sometimes it requires to wait for about 2 hours(though it is rare), to retrieve data from the remote database server and process the bill through Task Manager. We are automating this task. I want to know if there is any maximum limit for the wait statement or other synchronizing functions.
Wow, it made my WR crash when trying this statement:
According to the help the maximum is 32767 seconds.
If you need longer times, you could do something like that:
</font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">startTime = get_time()
while((startTime+(2*60*60)) > get_time())
;</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">This waits for 2 hours.
And if you wait two hours and retrieval isn't complete, then you have another two-hour problem on your hands.
I would look in the upstream process for some trigger event - something that tells you the retrieval is complete. Have your WinRunner script loop around this trigger until it has the complete indicator. This way you have a synchronous method.