Code quality check in RPA Hub
Summarize
Summary of Code quality check in RPA Hub
The code quality check in RPA Hub is a critical process that evaluates automation files or scripts against established coding standards and best practices. This ensures that RPA automations are robust, efficient, maintainable, and free from common errors that could cause issues later in their lifecycle.
Show less
RPA release managers or admins select predefined code quality rules within the RPA Hub instance. The RPA Desktop Design Studio then performs these checks either automatically before publishing or proactively when developers inspect specific activities or entire projects. Results of these checks, including errors and warnings, are shown in a dedicated results window, enabling developers to troubleshoot issues before publishing.
Key Features
- Predefined Code Quality Rules: Administrators manage and configure rules that guide the quality checks.
- Integration with RPA Desktop Design Studio: Enables automatic or manual code quality assessment prior to package publication.
- Severity-Based Publishing Control: System properties allow configuration to restrict publishing of packages or bot processes based on the severity of detected errors or warnings.
- Detailed Issue Reporting: Users can view specific components causing errors or warnings and address them accordingly.
- Configurability: System properties such as
snrpafdn.enablecodequalitycheck,snrpafdn.restrictpackagebyseverity, andsnrpafdn.codequalitychecktimeoutallow enabling the feature, defining publishing restrictions, and setting timeouts for checks. - Editable Rule Parameters: Release managers and admins can adjust rule severity, patterns, activation status, and threshold values via the code quality rule form.
Practical Benefits for ServiceNow Customers
By leveraging code quality checks in RPA Hub, ServiceNow customers can:
- Ensure automation projects meet quality standards before deployment, reducing errors and maintenance costs.
- Control releases by blocking packages with critical errors or warnings, maintaining operational stability.
- Gain visibility into specific code issues through easy-to-navigate results, accelerating troubleshooting and remediation.
- Customize quality enforcement policies to align with organizational requirements through configurable system properties and rule management.
Enabling and configuring these checks helps maintain high-quality RPA deployments, improving reliability and user confidence in automation processes.
A code quality check refers to the process of evaluating the automation file or script to assess its adherence to coding standards, best practices, maintainability, and overall quality.
Code quality check overview
Code quality checks are essential in RPA development life cycle, to ensure that the automation file is robust, efficient, and free from common issues that could lead to errors or difficulties in the future.
RPA release managers or RPA admins select code quality check rules from a pre-defined set of rules in the RPA Hub instance.
Then, the RPA Desktop Design Studio performs an in-built code quality check before publishing a package. RPA developers can also perform pro-active code quality check on a package in the RPA Desktop Design Studio by inspecting an activity or a complete automation project for any issues, using the Code Quality Check feature.
The issues and their details are displayed in the Code Quality Check Results window. Double-click an individual entry to view the component that has displayed an error or a warning. Troubleshoot the issues before you publish the automation project to RPA Hub. For more information on how to perform Code Quality Check in RPA Desktop Design Studio, see Code quality check in RPA Desktop Design Studio.
If an error or a warning occurs in the automation, a decision is derived if the package can be published successfully or not, based on the system property [sn_rpa_fdn.restrict_package_by_severity] configuration (error, warning, or no restrictions). For more information about compliance rules for RPA Desktop Design Studio, see Code quality check compliance for RPA Desktop Design Studio.
If a package version is marked with code quality result as error or warning, a decision is derived if the bot process can be published successfully or not, based on the system property [sn_rpa_fdn.restrict_package_by_severity] configuration (error, warning, or no restrictions). For more information about compliance rules for RPA Hub, see Code quality check compliance for RPA Hub.
View a list of the pre-defined code quality rules in the RPA Hub instance. For more information, see Code quality rules list in RPA Hub.
View a code quality rule form along with the type and description. For more information, see Code quality rule form in RPA Hub.
In the code quality rule form, RPA release managers and admins can edit the Severity, Regular Expression, Active, and Value fields.
View the result of the code quality check, in the Code Quality Result field of an associated package version in RPA Hub. For more information, see Package Version form in RPA Hub.
Configuration
To enable the code quality check at the instance level, ensure that you mark the new system property sn_rpa_fdn.enable_code_quality_check as true.
- sn_rpa_fdn.restrict_package_by_severity - To set a restriction on publishing a package from RPA Desktop Design Studio and publishing a bot process in RPA Hub.
- sn_rpa_fdn.code_quality_check_timeout - To enter a maximum duration, in minutes, for the completion of the code quality check.