Support Portal

for ProcessRobot and WinAutomation

Start a new topic
Answered

Wait For File - what if it is never created

What would happen if you try to download a file from the internet, you know the filename and so use a 'Wait for File' action and set it to 'Be Created' However, the file never finishes downloading for some reason, therefore it is never created!


Would WinAutomation get stuck in an infinite loop waiting forever for a file to never appear? 


As I am not sure what would happen, at the moment I have used the 'Continue Anyway' tick box and as the filesize is quite small I have set it to 300 seconds (5 mins) then I use a 'If File Exists' action and set it to 'does not exist; - if the file downloaded and exists it jumps out of the if block.


If it doesn't exist, then I use a 'Add Item To List' action and add "file not downloaded" to an exception list variable:.%ExceptionList%. and then call a function I use to exit the robot - which counts the number of exceptions in the list, if it is > 0 then it will safely close all applications and send an email with the exception details.


Anyone else got any other suggestions?


Best Answer

Hello Andrew,


The logic you are using in your process is sound. In case we want to wait for more than 600 seconds which is the max, we need to use a combination of conditionals and flow control actions as shown below.



That seems like a decent way to do it.


Wait for Window and others have Fail on Timeout options. Not sure why this one does not...

ADMIN
Answer

Hello Andrew,


The logic you are using in your process is sound. In case we want to wait for more than 600 seconds which is the max, we need to use a combination of conditionals and flow control actions as shown below.


Login or Signup to post a comment