How RPA handles application timeouts and unavailability
Introduction
Robotic Process Automation is robust enough to handle system lag time.
While the specifics may differ for individual tools, the general concepts are as follows:
- You could specify a fixed wait/delay time period (say ten seconds). This works if the system lag time is known and consistent.
- You could specify a variable wait/delay period. The robot will execute the next activity only when it detects certain triggers (for example, image, text, element, etc).
- You can retry the current activity until you get the required system response.
- You can skip to the next activity (if current one is not critical).
- You can set this as an exception and trigger another robot to handle this (maybe later if the system lag is unexpected)
Assuming the system lag time is beyond your control, your key consideration should be to minimize the waiting period of the robot. This makes the robot unproductive and has a real impact on the return on investment for your RPA project.
Alternatively, try to schedule the robots to perform concurrent activities to minimize unproductive robot time.
You Always Have Options
There are different reasons why you may encounter system lags e.g server downtime, slow web page control rendering, slow database updates, unresponsive controls e.g buttons etc. The system lags definition may differ from system to system but RPA handles this fairly well to an extent. As a developer you have to code against this obstacles by doing any of the following
- Using Intelligent Wait stages: A wait is simply a time frame you can wait for something before you call it timeout. For instance, if I’m updating files, directories or doing any file management operation on my local windows machine using RPA script, I will experiment between 2 -10 seconds for such update based on my experience. If the case was updating a network share drive, I may have to wait longer. The idea behind this is things going over the network complicate things and at no point can you guarantee a system’s availability. Today, my website is fine, up and running and tomorrow by 7AM when I check a HTTP 500 error was present but upon refreshing the 15th time everything was back to normal. You will have to experiment with wait and determine what an intelligent wait time is. There are different strategies to using waits. You can wait on a window to be fully loaded before performing a task and in general this is good practice. Depending on your experimentation, this timing can span between 1 -120 seconds. You can't keep your bot waiting for 100 years for a screen to show up mind you, so your timing should be fairly accurate. The way better approach is to use Explicit Waits approach, which RPA tools provide - with it framework can expect certain condition to happen in order to terminate wait of execution.
- System Retries: just like a human who do when a system isn't available. Close it and open it to try again. Determine a maximum number of trials by experimentation method. For a web system, you can close and relaunch it to see if everything is back to normal. Let's say web system is functional 95% of the time - automation will always work if there was connection lost or other factors that will prevent the system availability.
- Defer further tasks on the work item: This has to do with some logic on your side as a developer. Defer the item by some minutes, hours or days depending on your business case
- Mark the item as an exception: let's say you have tried all the above and the system lag still persist. Classify the particular work item as requiring human intervention. Meaning someone else who have to do it. You may design separate Process to process such exceptional transactions automatically again. Or design Process so human will handle such failed transactions.