Handling Job Timeout in SAP Intelligent RPA Factory

There are two ways to change default timeouts for steps and scenarios:
  • Update them directly in scripts

  • Update them in the properties panel of a workflow

If you change timeout values in scripts, this change is taken into account during the debug mode.

However, when the bot will be launched from the Cloud Factory (either in attended or unattended modes), these new values will not be taken into account. The job will expire after the timeout indicated in the related workflow (generally 10 minutes after, as this is the default value).

The best practice is to always update timeout values from the Workflow section. If you udpate from this section, you also update scripts. New values are thus taken into account in both debug and production executions.

Remember that timeout in the code and timeout in the workflow are different:
  • Workflow timeout is the SAP Intelligent Robotic Process Automation Factory timeout

  • Scenario timeout is the Desktop Agent timeout (set in the code)

When you create the workflow for the first time and as long as you keep using the merging tool, the timeout may stay synchronized. Once you start modifying the code and especially the timeout, timeouts of the workflow (in the UI) and of the scenario (in the code) are desynchronized.

Modifications of the code never modify the workflow. So, this can lead to a possible desynchronization. If there is no merging tool, updates of the workflow timeout may not be considered. If the Agent (script) timeout is greater than the workflow timeout and if the effective time of the bot is greater that the workflow timeout, then the Factory decides that the job must expire. This also means that the Agent is out of range and won’t try to communicate with the Factory anymore. For the Factory, the Agent is disconnected.

The job may keep running on the Agent side, especially if:
  • Some synchronized code keeps running. This prevents the Agent from getting news from the Factory.

  • The Agent gets stuck and does not respond anymore. This prevents the Agent from getting news from the Factory.

To make sure that your workflow timeout is properly updated, you can also check in the key.xml of the exported version.