Workflow analysis plays a central part in project development. The ability to perform an analysis on your code ensures higher quality and reliability.
The Workflow Analyzer is designed to use a set of rules to check for various inconsistencies in the project. The rules are based on Automation Best Practices.
It is available in the Design ribbon tab, the Analyze File and Analyze Project buttons. The first performs an analysis on the file currently focused in the Designer panel, while the second analyzes all files in the automation project.
Each rule has an ID, name, description, and recommendation. The ID contains the origin, category, and number. For example, Variables Naming Convention has the
The project or file is analyzed based on a set of rules available in the Project Settings window:
- In the Project panel, click the icon, then select Workflow Analyzer.
- In the ribbon, click the Analyze File button, then select Workflow Analyzer Settings from the dropdown.
Rules can be filtered by scope and action. Uncheck the box next to each rule to define a configuration specific to your project.
Each rule has a scope to which it applies:
- Activity: The rules are enforced at activity level, checking variables, arguments, properties. Variables Naming Convention is one such rule.
- Workflow: Rules perform checks in a single project file, for example Unused Variables.
- Project: Checks are performed at project level.
Rules have a number of actions that can be set:
- Error: Generates an error in the Error List panel.
- Warning: Generates a warning in the Error List panel.
- Info: Generates a message in the Error List panel.
- Verbose: Creates large log files.
Check the Logging Levels page to learn more about logging with Studio.
Validation of the file or project is performed whenever the Workflow Analyzer is triggered. Validation options are available in the Analyze File ribbon button, Validate File and Validate Project.
This action checks whether variables, arguments, expressions, and imports are properly configured. The Validate File action can be triggered using the F8 shortcut, while Validate Project using Shift + F8. Validation can be cancelled at any time.
The file(s) that contain errors are marked in the Project panel with a red dot, and the errors are shown in the Error List and Output panels.
Double-clicking an item in the Error List panel opens the
.xaml and highlights the activity which threw the error.
.xaml files are validated, the project cannot be debugged, executed or published.
When triggered, the Workflow Analyzer uses the configured ruleset to check the project or file, and logs the found errors in the Error List panel, in accordance with the rule action.
The Error List panel filters items by Errors, Warnings and Messages. The scope drop-down menu is useful for filtering errors by project, current file or a specific file in the automation. In addition, items can be filtered by rule ID.
Click a found warning or error to display the rule’s recommendation and a link to the documentation page for each rule.
UiPath.Studio.CommandLine.exe command-line user interface contains a set of parameters for checking files or projects against certain rules, even in CI/CD pipeline configurations.
UiPath.Studio.CommandLine.exe is available in the installation folder:
- For the Windows Installer (.msi) version of Studio, the default path is
C:\Program Files (x86)\UiPath\Studio\
- For Studio installed in User Mode (.exe), the default path is
By default, all Workflow Analyzer rules are enabled when installing Studio. Configure rules directly from Studio:
- From the Workflow Analyzer Settings window, enable or disable rules by clicking the checkbox next to each one of them,
- From the
%LocalAppData%\UiPath\Rules. Find a specific rule, modify its parameter, change the
falseto disable the rule.
Rules are organized according to their unique ID, visible in the Workflow Analyzer Settings also.
For example, in the image below only the Variables Naming Convention rule was enabled and received the
([A-Z]) Regex expression. This means that variable names must be uppercase. All the other rules were disabled in this example.
After configuring the rules, access the
UiPath.Studio.CommandLine.exe command-line user interface.
Workflow Analyzer commands are the following:
analyze- Analyzes the whole project. Requires the path to the
analyze-file- Analyzes a single file. Requires the path to the
In the example above, the following command
analyze -p "C:\Users\username\Documents\UiPath\BlankProcess\Main.xaml" checks if the variable names are uppercase in one
The output of the above command returns a
.json encoded dictionary with the following type of information:
ErrorCode: The rule ID.
ErrorSeverity: The value of the
DefaultActionparameter, which is the configured log message for each rule, either Warning, Error, Info or Verbose.
Description: The rule's description.
URL: The recommended changes for solving the issue, together with the documentation link with more information.
FilePath: The path to the analyzed file.
Please note that some of the entries may not be associated with a rule, but can be errors generated by the Workflow Analyzer. For example, in the case of an empty
.xaml` file, an error is displayed.
The Globally Unique Identifiers (GUID) used as prefixes for an entry are generated on each run and apply to the current result only.
Updated 29 days ago