cancel
Showing results for 
Search instead for 
Did you mean: 

How to detect long running error?

ChrisRider
Level 4

I am working on an automation that reads data from a CSV file and then fills in a form on a Win32 application.  The error message is not consistent and seemingly not repeatable.  As an example, the same resource/form can be filled in multiple times.  Then, randomly, the error will occur.

It probably does not matter to my problem, but I suspect the application is having a database lock issue.

My problem - I have not been able to figure out how to get Application Modeler to model this error.  I do have a few screenshots.  I was thinking I might be able to have Blue Prism detect if the image is visible (I do know where it occurs - so could check right after accessing that spot).  The error message has an OK button I will need to click.  (I also need to check with the people using the application - is ok correct or does the robot need to take additional action)

Am I on the right track?  

The frustrating part - my automation might run for 5 minutes before the error happens.  Or, it might take 30 minutes.  Using the same dataset, it happens in different rows from the csv file - ugh.  The joys of rpa.



------------------------------
Chris Rider
lead application analyst
E. W. Scripps
cincinnati OH
------------------------------
1 BEST ANSWER

Helpful Answers

Hi Chris,

Based on my understanding, the bot should be capable of capturing the error message using the image visible method you mentioned.

I assume you are implementing a loop mechanism to write each record from the CSV file into the Win32 application. In the event that the bot encounters the error image, you can designate the specific record as a system exception. Subsequently, you could terminate and restart the application (considering no more actions to be taken for the errored record) & then reconnect to the loop, allowing the bot to continue filling the form for the remaining records. Regardless of which record in the CSV file triggers the error, the bot should be able to successfully complete the automation without any disruptions. Therefore, there's no need to worry about timings. 



------------------------------
Athiban Mahamathi - https://www.linkedin.com/in/athiban-mahamathi-544a008b/
Technical Consultant,
SimplifyNext,
Singapore
------------------------------

View answer in original post

4 REPLIES 4

Hi Chris,

Based on my understanding, the bot should be capable of capturing the error message using the image visible method you mentioned.

I assume you are implementing a loop mechanism to write each record from the CSV file into the Win32 application. In the event that the bot encounters the error image, you can designate the specific record as a system exception. Subsequently, you could terminate and restart the application (considering no more actions to be taken for the errored record) & then reconnect to the loop, allowing the bot to continue filling the form for the remaining records. Regardless of which record in the CSV file triggers the error, the bot should be able to successfully complete the automation without any disruptions. Therefore, there's no need to worry about timings. 



------------------------------
Athiban Mahamathi - https://www.linkedin.com/in/athiban-mahamathi-544a008b/
Technical Consultant,
SimplifyNext,
Singapore
------------------------------

Hi Athiban - thank you for your reply.  I am going to work on adding the image visible method and try to figure out if I have to click the OK button or if I can have Blue Prism press the return key on the error.

It is indeed in a loop.  This happens right after it saves data and then starts on the next row.  That makes it easy for me to know where to add the check.



------------------------------
Chris Rider
lead application analyst
E. W. Scripps
cincinnati OH
------------------------------

In case this helps anyone in the future, I ended up doing the following (which might not be the best solution - but it works!):

-Every loop, I have Blue Prism capture a screenshot and save this to a bitmap on the file system.

-I read in the bitmap to a data item.  (Could probably have made the bitmap show up in a data item in step #1, but found it helpful to view the bitmap for debugging purposes).

-I then have an action item that uses Utility - Image and finds the sub image.  The sub image is a distinct portion of the error message that sometimes happens in my application.  This step takes about 10 seconds - kind of slow.

-If it detects the error, I then use global key sends events and have it type "alt-f4" to close the error message.  The error dialog shows an ok button, but there are no keyboard short cuts and I did not want to calculate the location of the button - so alt-f4 worked in my application.

I used a few samples other people shared on this message board.  One showed me how to capture/save the screen.  The other one showed me code to read in a bitmap to a data item.  



------------------------------
Chris Rider
lead application analyst
E. W. Scripps
cincinnati OH
------------------------------

Thanks for sharing your solution, Chris.



------------------------------
Athiban Mahamathi - https://www.linkedin.com/in/athiban-mahamathi-544a008b/
Technical Consultant,
SimplifyNext,
Singapore
------------------------------