Why does my robot start slowly when using the AllProjectsStarted event?
The robot registration process starts when Robot Runtime starts and ends after all projects within the automation package are up and running. This includes starting any applications that are set to start when the project starts. Additionally, automations that use synchronous threads that are triggered from events like the ProjectStarted, AllProjectsStarted, and adapter.Started, must complete before the robot finishes registering and starts heartbeating. If the robot does not finish registering within the expected PackageLoad time, then Robot Manager considers this a timeout and might turn off the robot. Use these events carefully to ensure that the registration process completes within the expected time period.
Using automations that are triggered from events on startup
When you use an AllProjectsStarted, ProjectStarted or an adapter.Started event to start automations, the robot status, as displayed in Robot Manager, can make it appear that the robot is stuck “starting” until the automations complete.
When an unattended robot starts automations using a synchronous link that emanates from these events, there is a step in the registration process that is not completed until the automations triggered by the events are completed.
The best practice is to use synchronous links to start automations from the these events. This method allows the system to ensure that applications are started, logged in, or navigated properly before work assignments begin.
Using synchronous links
If you use synchronous links to start automations from an AllProjectsStarted, ProjectStarted or an adapter.Started event, and if those automations take a long time to complete, then the robot status in Robot Manager can appear as shown below. This is your indication that the system is finishing the automations.
If the runtime startup sequence, which includes the AllProjectsStarted, ProjectStarted or an adapter.Started automations, exceeds the default package load time interval of 60 seconds, you can lengthen the time interval on the Work group screen (package widget), as shown in this example:
If the default package load time is exceeded, then you see this message on the audit log for the robot. After the AllProjectsStarted, ProjectStarted or an adapter.Started automations finish processing, the robot successfully registers.
Using asynchronous links
While it is possible to use asynchronous links to start automations from an AllProjectsStarted, ProjectStarted or an adapter.Started event, this is not the recommended method. If you follow this method, then after that asynchronous link is passed within the automation execution flow, the AllProjectsStarted, ProjectStarted or an adapter.Started event is considered complete, the Activate command is sent to Robot Manager, and the heartbeating begins.
Using asynchronous links to start automations from an AllProjectsStarted, ProjectStarted or an adapter.Started event allows the robot to finish the registration process sooner. However, there is no validation that all applications are started, logged in, or navigated properly before the Activate command is sent and heartbeating begins.
Previous topic Updating UI Connector files in Robotic Automation Next topic Verifying the version of Agile Desktop and the package that is running