







Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The document contains learning notes related to UiPath work analyzer
Typology: Study notes
1 / 13
This page cannot be seen from the preview
Don't miss anything!








Work Analyzer Guide and Settings ..................................................................................................................... 1
1. Work Analyzer ............................................................................................................................................. 2 1.1. Introduction ......................................................................................................................................... 2 1.2. Before Analyzing Code ........................................................................................................................ 3 1.3. When to Run the Analyzer Tool .......................................................................................................... 3 1.4. Running Analyzer and Error List Panel Details ................................................................................... 4 1.5. Default Work Analyzer Setting and Rules Overwrite Suggestions .................................................... 5 1.5.1. Rules Overview ............................................................................................................................ 5 1.5.2. Rule Overwrite Suggestions ........................................................................................................ 7 1.6. Adding Custom Rule to the Work Analyzer Setting ........................................................................... 8 1.7. Sharing Work Analyzer Setting Among the Developers .................................................................... 8 1.8. Automation Error Types and Reducing Errors by Following the Best Practices Defined in the Work Analyzer Rules ................................................................................................................................................. 8 1.8.1. Compile Error ............................................................................................................................... 9 1.8.2. Runtime Error .............................................................................................................................. 9 1.8.3. Logical Error ............................................................................................................................... 10 1. Work Analyzer
The UiPath Studio has integrated the Analyzer workflow tool for making sure our project follows best practices, maintainability, readability, performance, reusability, reliability, and security requirements. Workflow analysis plays a central part in project development. The ability to perform an analysis on your project ensures high quality and reliability. You can Analyze either a single XAML file or a complete project. The workflow Analyzer performs two types of checks:
I suggest using the “Enforce Analyzer before Run” default setting for our development. I do not like much this setting. Some developer will find useful to fix mistakes as they go. I think it is useful to have enabled these settings:
When you run the Analyze project tool errors, warnings and information will be displayed on the Error list panel. The Analyze file or Analyze project always calls the Validation. Validation errors need to be fixed first and then you need to run again Analyze project to detect other inconsistencies. Below is the Error list screenshot panel with details:
1.5.1. Rules Overview Workflow Analyzer tool contains a set of rules to cross-check the best practices rules suggested by UiPath of an Automation Project and the default rules can be customized as per your needs. Currently, within the Analyzer tool, there are eight rules’ categories available. Great documentation is provided on the UiPath website. Below is the rule category list with the UiPath documentation URLs: Rule Category Category Code Part URL of the UiPath Documentation Naming Rules NMG Naming Rules (uipath.com) Best Practices DBP Design Best Practices (uipath.com) Project Anatomy Rules ANA Project Anatomy Rules (uipath.com) Maintainability and Readability Rules MRD Maintainability and Readability Rules (uipath.com) Usage Rules USG Usage Rules (uipath.com) Performance and Reusability Rules PRR Performance and Reusability Rules (uipath.com) Reliability Rules REL Reliability Rules (uipath.com) Security Rules SEC Security Rules (uipath.com) Navigate to the Design ribbon tab, then to the Analyze File, and select the Workflow Analyzer Setting menu item to launch the default work analyzer rule list. https://cpubproddsstorage.blob.core.windows.net/files/component_resources/c9a935f9-d58c-49f0- 950 e-d435ba90dd1f.pdf
You can enable or disable rules by clicking the checkbox next to each of them. In addition, directly from the Work Analyzer rule interfaces you can directly override some rule settings and change Default Action settings (Error, Warning, Info… ) Rule Id Rule Name Default Rule Setting Overwrite Suggestion ST-NMG- 001 Variables Naming Convention ^(dt_)?([A-Z]|[a-z])+([0-9])$^ ^(dt_)?([A-Z]|[a-z])+$ ST-NMG- 002 Arguments Naming Convention RegEx In: ^in_(dt_)?([A-Z]|[a-z])+([0-9])$ Out: ^out_(dt_)?([A-Z]|[a-z])+([0-9])$ InOut : ^io_(dt_)?([A-Z]|[a-z])+([0- 9])$ Action: Warning RegEx In: ^in_(dt_)?([A-Z]|[a-z])+$ Out: ^out_(dt_)?([A-Z]|[a-z])+$ InOut : ^io_(dt_)?([A-Z]|[a-z])+$ ST-NMG- 009 Prefix Datatable Variables This rule is enabled. Default Recommendation: DataTable Variable should start with a dt_ prefix Action: Warning No particular recommendation for this one. ST-NMG- 011 Prefix Datatable Arguments* The default rule is enabled: Default Recommendation: Datatel Argument should start with a dt_prefix Action: Warning Disable the rule. ST-NMG- 012 Argument Default Values Default Recommendation: Use default values for arguments either for testing individual workflow files, or, in the case of reusable components, for using a default configuration Action: Warning Need more analysis. I am against using default values. We might need to keep it for the development setting but for deployment, we can change the Action set to: Action: Error ST-NMG- 016 Argument Length Exceeded Default Recommendation: Argument name length should not be above 30 characters Action: Warning Need more analysis. We can reduce it to 25. ST-DBP- 002 High Arguments Count Default Recommendation: Minimize the number of arguments for workflow The default setting is 20 Action: Error I suggest reducing the setting to 15 for now. We need to analyze code in our processes and check what is max arguments setting is. ST-DBP- 021 Hardcoded Timeout Timeout properties should not contain hardcoded values. Use defaults, settings, or dynamic values. Action: Warning Need more analysis. I am against using default values. We might need to keep it for the development setting but for deployment, we can change the Action set to: Action: Error
Note: All rues are not included in the list. Currently, I do not have any suggestions but when we gain working experience, we might review them again.
Check the work Analyzer rules on the UiPath marketplace. We might not need to invent something if already exist. Search Custom Rules on the UiPath Marketplace: Download RPA Components - RPA Snippets, Workflows, Connectors | UiPath Marketplace Learn to build custom rules: Building Custom Rules (uipath.com)
Everyone in the ESDC RPA team must have the same settings to makes sure that we are following the same standards and policies. Check the UiPath Configure Rule documentation
According to the UiPath documentation, the analyzer does not identify errors in execution or compilation. From my UiPath training experience, I found that running an analyzer helped me to detect code inconsistency, and fixing it helps me to reduce compile and some runtime errors. Three error types can be encountered during the development process: Compile, Runtime, and Logic errors. Depending on what type of error occurs - a developer should code the automation to handle the exception and react accordingly. There are three main error types:
It is better to fix errors early than later in the automation process.
Usually, the most difficult error to encounter is the logical error. It is related to a bug in automation that causes it to operate incorrectly, but not to terminate abnormally (or crash). Usually, the business rules need to be added or fix the code to avoid this type of errors. This error cannot be detected with the Analyze project tool and therefore developer needs to review code logic to make sure that automation is working as expected. Do the following:
https://docs.uipath.com/studio/docs/building-custom-rules?u=nerlichman#section-add-rules-to-studio