The Workflow Analyzer tool, which is part of versions 2019.10.x and later of UiPath Studio, is used to catch errors and warnings within an automation. As of version 2020.10.x of Studio, the IDE does not have the ability to export the results of the Workflow Analyzer, but the product instead provides an executable to run the analysis via the command line, in which the results can be piped to file
The Workflow Analyzer CLI Script is a PowerShell script used to run Studio's Command Line Executable to analyze an automation and pipe the results to a JSON file. This script can be easily integrated into an automated error/warning check within a DevOps pipeline, without the hassle of opening the Studio application in its entirety
-ProjectFilePath: The path to the project.json or individual workflow (XAML) file to analyze. By default, this value is set to ".\project.json"
-ExecutableFilePath: The path to Studio's Command Line Executable. By default, this value is set to "C:\'Program Files (x86)'\UiPath\Studio\UiPath.Studio.CommandLine.exe", which is the executable's location if Studio was installed in Service Mode. The value should instead be pointed to "%LocalAppData%\UiPath\[Studio_version]\UiPath.Studio.CommandLine.exe" if Studio was installed in User Mode, replacing [Studio_version] with the actual name of the version folder in that path
-OutputFilePath: The path where the results of Workflow Analyzer should be piped. By default, this value is set to ".\$(Get-Date -Format 'yyyy-MM-dd-HH-mm-ss')-Workflow-Analysis.json"
1) Open a PowerShell session as Administrator
2) Optionally run the following to allow the current session to run scripts not digitally signed:
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
3) For example, running the following from the same directory where Workflow-Analyzer-CLI-Script.ps1 is will analyze C:\Date-Reminder\src\project.json, point to the default location for a Service Mode Studio's Command Line Executable, and pipe the results to .\Workflow-Analysis.json:
-ProjectFilePath "C:\Date-Reminder\src\project.json" `
-ExecutableFilePath "C:\'Program Files (x86)'\UiPath\Studio\UiPath.Studio.CommandLine.exe" `