Using auto-retry functionality for your failed work items in RPA Hub
Summarize
Summary of Using auto-retry functionality for your failed work items in RPA Hub
ServiceNow's RPA Hub offers an auto-retry functionality that automatically retries failed work items in your work queue based on specific criteria. This feature applies only to work items marked with anApplicationexception type and is controlled by settings such as maximum retry attempts and delay between retries. It helps ensure that transient failures are handled efficiently without manual intervention, improving the reliability and throughput of automated processes.
Show less
Key Configuration Parameters
- Maximum Attempts: Defines how many times a failed work item can be retried automatically.
- Attempt Delay (mins): Specifies the delay in minutes before a failed item is retried.
- Exception Type (Work Item form): Determines whether auto-retry applies. Only items with Application exceptions are eligible for retries; Business exceptions are not retried automatically.
- Attempts Count (Work Item form): Tracks how many retry attempts have been made for the work item.
- System Property snrpafdn.queue.maximumattemptsmaxvalue: Configures the maximum allowed value for retry attempts.
How Auto-Retry Works
The retry process depends on the work item's current status and exception type:
- In progress: If the exception type is Application and attempts count is less than maximum, the item remains in progress and is retried after the configured delay. If attempts reach the maximum, the status updates to Failed and no further retries occur. For Business exceptions, retries are not performed.
- Success: When a work item succeeds, its exception type is cleared and it is not retried.
- Failed: Application exceptions with remaining retry attempts are set back to In progress and retried after the delay. If maximum attempts are reached or if the exception is Business, the status remains Failed and retries stop.
The Deferred Till field (read-only on the work item form) can override the Attempt Delay, controlling when the next retry occurs.
Practical Benefits for ServiceNow Customers
- Minimizes manual intervention by automating retries for transient application errors.
- Allows customization of retry attempts and delay to suit process requirements and reduce unnecessary retries.
- Provides clear visibility on retry attempts and exception types for better monitoring and troubleshooting.
- Supports robust queue processing by ensuring that only eligible failures are retried, avoiding retry loops on business exceptions.
Next Steps
To implement auto-retry, configure the queue fields Maximum Attempts and Attempt Delay and ensure the system property for maximum attempts is set appropriately. Monitor the Exception Type and Attempts Count fields on work items to understand retry behavior. For detailed setup, refer to the Queue form and Work Item form documentation in RPA Hub.
You can use auto-retry functionality in RPA Hub to retry the failed items automatically in your work queue. The retry functionality is based on the Application exception type only.
Auto-retry overview
Usually, in an existing Robotic Process Automation (RPA) work queue, the items are processed by the criteria that you specified. The items in this type of work queue are picked by the robots for execution.
Let's consider a scenario where the first item in your work queue is processed successfully, and the status is updated to success. But, when the robot picks the second item in the work queue for execution, it isn't processed successfully and the status is updated to failure.
By using auto-retry functionality instead in this scenario, the work items are retried automatically based on the value in the Exception Type field on the Work Item form, and based on the values that you enter in the Maximum Attempts field and the Attempt Delay field on the Queue form.
There are two exception types: application and business.
In the Work Item form, if the value of the Exception Type field is Application, the value of the Maximum Attempts field is greater than 1, and the current value in the Attempts Count field is less than the value in the Maximum Attempts field, the failed item in the work queue is automatically retried.
Queue fields and system property configuration
To enable auto-retry functionality, you must define the values in the sn_rpa_fdn.queue.maximum_attempts_max_value system property. For more information about these values, see Configure RPA Hub properties.
- Maximum Attempts
- Attempt Delay (mins)
- Exception Type
- Attempts Count
Auto-retry workflow
- If the Exception Type field is Application, the Attempts Count field is incremented by 1, and the current value in the Attempts Count field is equal to the value in the Maximum Attempts field, the status of the work item is updated to Failed and the Exception Type field is updated to Application. The work item isn’t available for auto-retry.
- If the Exception Type field is Application, the Attempts Count field is incremented by 1, and the current value in the Attempts Count field is less than the value in the Maximum Attempts field, the status of the work item is updated to In progress and the Exception Type is updated to Application. The work item is available for auto-retry only after you set the duration (if any) in minutes in the Attempts Count field.
- If the Exception Type field is Business and the Attempts Count field is incremented by 1, the status of the work item is updated to Failed, and the Exception Type field is updated to Business. The work item isn’t available for auto-retry.
- When there’s no value in the Exception Type field and the Attempts Count field isn’t incremented by 1, the status of the work item is updated to In progress. The Exception Type isn’t updated. The work item is available for auto-retry only after you set the duration (if any) in minutes in the Attempts Count field.
| Exception Type | Attempts Count (Increment by 1) | Condition | Status updated to | Exception Type updated to |
|---|---|---|---|---|
| Application | Yes | If the current value in the Attempts Count field is equal to the value in the Maximum Attempts field. | Failed | Application |
| Application | Yes | If the current value in the Attempts Count field is less than the value in the Maximum Attempts field. | In progress | Application |
| Business | Yes | <No condition> | Failed | Business |
| <empty> | No | <No condition> | In progress | <No update> |
- If the Exception Type field is Application and the Attempts Count field is incremented by 1, the status of the work item is updated to Success and the Exception Type is updated to blank. The work item isn’t available for auto-retry.
- If the Exception Type field is Business and the Attempts Count field is incremented by 1, the status of the work item is updated to Success. The Exception Type is updated to blank, and the work item isn’t available for auto-retry.
- If there’s no value in the Exception Type field and the Attempts Count field is incremented by 1, the status of the work item is updated to Success. The Exception Type field is updated to blank, and the work item isn’t available for auto-retry.
| Exception Type | Attempts Count (Increment by 1) | Status updated to | Exception Type updated to |
|---|---|---|---|
| Application | Yes | Success | <blank> |
| Business | Yes | Success | <blank> |
| <blank> | Yes | Success | <blank> |
- If the Exception Type is Application, the Attempts Count field is incremented by 1, and the current value in the Attempts Count field is less than the value in the Maximum Attempts field, the status of the work item is updated to In progress. The Exception Type field is updated to Application, and the work item is available for auto-retry only after the duration that you set in the Attempts Count field.
- If the Exception Type field is Application, the Attempts Count field is increment by 1, and the current value in the Attempts Count field is equal to the value in the Maximum Attempts field, the status of the work item is updated to Failed. The Exception Type field is updated to Application, and the work item isn’t available for auto-retry.
- If the Exception Type is Business, the Attempts Count field is incremented by 1, the status of the work item is updated to Failed. The Exception Type field is updated to Business, and the work item isn’t available for auto-retry.
- If there’s no Exception Type field and the Attempts Count field is incremented by 1, the status of the work item is updated as Failed. The Exception Type field isn’t updated, and the work item isn’t available for auto-retry.
| Exception Type | Attempts Count (Increment by 1) | Condition | Status updated to | Exception Type updated to |
|---|---|---|---|---|
| Application | Yes | If the current value in the Attempts Count field is less than the value in the Maximum Attempts field. | In progress | Application |
| Application | Yes | If the current value in the Attempts Count field is equal to the value in the Maximum Attempts field. | Failed | Application |
| Business | Yes | <No condition> | Failed | Business |
| <empty> | Yes | <No condition> | Failed | <No update> |