Code quality check in RPA Desktop Design Studio

  • Release version: Yokohama
  • Updated January 30, 2025
  • 2 minutes to read
  • Summarize
    Summarized using AI
    This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.

    Summary of Code Quality Check in RPA Desktop Design Studio

    ServiceNow's RPA Desktop Design Studio includes aCode Quality Checkfeature that helps you proactively identify and resolve issues within an automation activity or an entire automation project. This feature runs automatically when you publish a project, helping reduce errors and prevent potential automation failures.

    Show full answer Show less

    The Code Quality Check operates based on a pre-defined set of rules configured in the connected RPA Hub instance. You must connect your Design Studio to an RPA Hub instance that has Code Quality Check enabled to use this functionality effectively.

    Key Features

    • Integration with RPA Hub: Code quality rules are managed in RPA Hub, and you can view active or inactive rules and filter them by severity within the Design Studio.
    • Results Display: After running a code quality check on an activity or project, results appear in the Code Quality Check Results window. Entries include details about each issue found.
    • Navigation and Highlighting: You can double-click result entries to navigate to and highlight the affected components, whether they reside in the current or other activities.
    • Automatic Checks on Publish: Publishing an automation project triggers an automatic code quality check. If issues are found, the results window displays them before completion.
    • Publishing Restrictions: You can control whether projects with errors or warnings can be published by configuring the snrpafdn.restrictpackagebyseverity property in RPA Hub.

    Practical Benefits

    By leveraging the Code Quality Check feature, you can:

    • Identify and fix automation issues early in the development lifecycle.
    • Ensure compliance with defined coding standards and quality rules.
    • Navigate directly to problematic components to streamline debugging and corrections.
    • Maintain higher automation reliability by preventing deployments of flawed packages unless explicitly allowed.

    Next Steps

    To maximize the benefits:

    • Ensure your RPA Desktop Design Studio is connected to an RPA Hub instance with the Code Quality Check configured.
    • Familiarize yourself with the code quality rules and severity filters available in the View Rules window.
    • Use the Code Quality Check Results window actively during development and before publishing projects to resolve issues promptly.

    You can use code quality check in RPA Desktop Design Studio to proactively find the issues in an automation activity or the complete automation project. When you publish an automation project, an in-built code quality check is also performed. Code quality check enables you to reduce the number of errors and prevent potential issues that may hinder your automation.

    Code quality check overview

    Code quality check in RPA Desktop Design Studio is based on the pre-defined set of rules that are enabled from the RPA Hub instance. You must connect to the instance that has Code quality check to RPA Desktop Design Studio before you start using Code quality check. For more information on how to configure Code quality check from RPA Hub, see Code quality check in RPA Hub RPA Desktop Design Studio. For more information on the pre-defined set of rules, see Code quality rules list in RPA Hub.

    When you check an activity or the complete automation project by using Code quality check, the issue results and details are displayed as a list of entries in the Code Quality Check Results window. The following example shows the window.

    Figure 1. Code Quality Check Results window
    Code Quality Check Results window where you can see the results of the check.
    You can double-click the result entries for components in the Code Quality Check Results window for the following scenarios:
    • If an affected component is in the current activity, it’s highlighted in the current activity.
    • If the affected component is in a different activity, you can navigate to the activity. The component gets highlighted. See the following example to see the component highlight in RPA Desktop Design Studio.
    Figure 2. Component highlight in RPA Desktop Design Studio
    Component highlighted in RPA Desktop Design Studio after the result entry is double-clicked from the Code Quality Check Results window.

    Code quality check in publishing an automation project

    Code quality check is automatically performed when you publish the automation project. If your project has code quality check issues, the Code Quality Check Results window is displayed with the result entries. For more information on how to publish an automation project, see Publish an automation project in RPA Desktop Design Studio in RPA Desktop Design Studio.

    Note:
    You can publish a package with errors or a combination of errors and warnings only if the property sn_rpa_fdn.restrict_package_by_severity is set as No restriction in RPA Hub. For more information on this property, see Configure RPA Hub properties. For more information on the compliance rules that the Code Quality Check feature follows if a package is published from RPA Desktop Design Studio, see Code quality check compliance for RPA Desktop Design Studio in RPA Desktop Design Studio.

    You can view the list of active and inactive rules from the View Rules window. You can filter the rules by their severity level from this window.