Connect HomeMarketplaceComponentsWorkflow Analyzer CLI Script

Workflow Analyzer CLI Script

Developer Tool

Developer Tool

Updated: November 16th, 2020

Published: September 6th, 2020

Downloads: 2

Industry: cross-industry

Community Support

Workflow Analyzer CLI Script

Developer Tool

Summary: 

Run UiPath Studio's Workflow Analyzer via command line and pipe results to file

Overview

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

Script Parameters

-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"

Running the Script

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:
.\Workflow-Analyzer-CLI-Script.ps1 ` -ProjectFilePath "C:\Date-Reminder\src\project.json" ` -ExecutableFilePath "C:\'Program Files (x86)'\UiPath\Studio\UiPath.Studio.CommandLine.exe" ` -OutputFilePath .\Workflow-Analysis.json

Details

Benefits

This PowerShell 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

Compatibility

UiPath Studio v2019.10 and later

Dependencies

PowerShell, Studio

Licensing

By clicking download you agree to the following license.