Development Architecture and Invocation Flow of UiPath Workflow Analyzer Rules - rpapub/WatchfulAnvil GitHub Wiki

UiPath Workflow Analyzer & Activity Creator: Step-by-step Tutorial

Source

UiPath YouTube Channel 📅 Published: May 19, 2020
🔗 Watch the video
📺 Views: 12,231 (as of capture 2025-05-20)
👥 Subscribers: 65.2K (at time of publish)

Description

This webinar presents a step-by-step tutorial on:

  • Building custom Workflow Analyzer rules in UiPath Studio.
  • Creating custom activities using the UiPath Activity Creator extension in Visual Studio.

Led by UiPath product experts, it covers core architecture, rule deployment, analyzer extensibility, and activity packaging.

Speakers

  • Bogdan Tomoru – Senior Lead Developer, UiPath Studio (Workflow Analyzer architecture)
  • Mădălin Mihuț – Product Lead, UiPath (Introduction, moderation)
  • Dean Gregorek – Engineering Lead, UiPath (Activity Creator demo)

Topics Covered

  • Architecture of Workflow Analyzer
  • Custom rule implementation in C#
  • Rule deployment methods
  • Performance & scope model (Activity, Workflow, Project)
  • Activity Creator walkthrough (Visual Studio 2019+)
  • Packaging and publishing custom activities
  • Community and documentation links

Tags

#UiPath #WorkflowAnalyzer #ActivityCreator #RPA #Automation #CustomActivities #DevOps #StaticCodeAnalysis


Architecture of the Workflow Analyzer – Key Facts

Static Code Analysis Framework

  • Workflow Analyzer in UiPath Studio is built as a static code analysis engine, similar to traditional programming environments.
  • It runs on workflows to detect violations of best practices, conventions, or performance issues.

Rule-Based System

  • It uses rules, each with a unique ID, which define what to check (e.g., display name duplication, unused dependencies).

  • Rules can generate suggestions, warnings, or errors.

  • Rules are grouped by scope

    • Activity-level
    • Workflow-level
    • Project-level

Execution Entry Points

  • Analyzer is triggered via:

    • “Analyze File” for current file.
    • “Analyze Project” for entire project.

Extensibility – Custom Rules

  • Developers can define custom rules via:

    • A Visual Studio class library.
    • Target framework: .NET Framework 4.6.1 or higher.
  • Implements the interface: IRegisterAnalyzerConfiguration.

Deployment Methods

  • Local deployment Place the rule’s DLL in the rules folder under the UiPath Studio install directory.
  • Future support (planned) Via NuGet packages for global or per-project deployment.

Analyzer Engine Versioning

  • Rules check analyzer engine version (v4 at time of talk) before execution using HasFeature method for compatibility.

Performance Considerations

  • Activity-level rules must be lightweight — they run for each activity in the workflow.
  • Workflow-level and project-level rules can perform heavier analysis since they're called less frequently.

Workflow Representation

  • Studio represents workflows with:

    • ActivityModel: contains type info, variables, properties, children, etc.
    • This abstraction is used for analysis without referencing actual runtime types.

Parameterization of Rules

  • Rules can have parameters, configured by the user or set with defaults.
  • Example: a string to check for in variable names.

InspectionResult Object

  • Returned by rules with:

    • A list of messages (violations).
    • Recommendation text.
    • Severity (error/warning/info), configurable by the user.

Governance Integration

  • Rule configurations can be centrally pushed across organizations using UiPath’s governance files.

Rule Metadata

  • Rules have:
    • Name (human-readable)
    • ID (unique and descriptive, e.g., “DEMO.USG.001”)
    • Error level
    • Parameter definitions

Diagnostics

  • Uses System.Diagnostics.TraceLevel (standard .NET) for logging.

Deployment Directory

  • Rules must be placed in:

    • C:\Program Files path for MSI installations (Enterprise).
    • %LocalAppData% for Community Edition.

Invocation

When a custom rules library (DLL) is brought into the Workflow Analyzer process, UiPath calls a specific function inside it to register the rules. This is done by implementing the IRegisterAnalyzerConfiguration interface, which contains a method that gets invoked automatically by Studio.

That method acts as the entry point for rule registration. Within it, you’re given a WorkflowAnalyzerConfigurationServices object, which you use to:

  • Add custom rules.
  • Add counters.
  • Check for feature support using HasFeature(...).

This means when UiPath Studio loads the DLL, it:

  • Locates the implementation of IRegisterAnalyzerConfiguration.
  • Calls its Initialize method.
  • Injects the configuration service into it.
  • Executes your rule registration logic.