sdk
latest
false
UiPath logo, featuring letters U and I in white

Developer guide

Last updated Mar 30, 2026

UiPath.Studio.Activities.Api.Analyzer.Rules

In this section you can find more information on how to build activities using UiPath.Studio.Activities.Api.Analyzer.Rules.

ActivityMessage

A message that indicates the activity that triggered a Workflow Analyzer error.

Inheritance

InspectionMessage > ActivityMessage

Properties

TypeNameRemarks
stringActivityIdThe id of the activity related to the message.
stringActivityDisplayNameThe activity display name.
IMemberModelSourceMemberOptional The source of the result, for example, a variable or a property.

AnalyzerInspector

Represents the base class for rules and counters.

Inheritance

Properties

Type

Name

Remarks

string

Name

The name of the rule/counter as it appears in the Workflow Analyzer Settings window.

string

Id

  • The Id of the rule/counter must be unique.
  • Use a notation similar to https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-messages/

IDictionary<string, IParameter>

Parameters

The collection of parameters that can be configured by the user.

bool

DefaultIsEnabled

If true , the rule is enabled by default. Requires Studio 2019.10.3 or later.

string

DocumentationLink

A link that can be clicked in the WFA settings window. Requires Studio 2019.10.3 or later.

List<string>

ApplicableScopes

The target configuration where this rule should apply. See RuleConstants for some examples. Requires Studio 2020.4 or later.

Counter

Interface for counter definition.

Inheritance

Constructors

public Counter(string counterName, string counterId)
TypeNameRemarks
stringcounterNameThe name as it appears in the Workflow Analyzer Settings window.
stringcounterIdThe Id of the counter must be unique.

Counter <T>

A counter that applies to a certain InspectionObject.

Inheritance

AnalyzerInspector > Counter > Counter<T>

Generic Type T

An IInspectionObject that defines what this counter applies to.

Constructors

public Rule(string ruleName, string ruleId, Func<T, Rule, InspectionResult> inspectionFunction)
TypeNameRemarks
stringcounterNameThe name of the counter.
stringcounterIdThe Id of the counter must be unique.
Func<IReadOnlyCollection<T>, Counter, InspectionResult>inspectionFunctionA function that receives the objects to be inspected and the counter as configured by the user and must return an InspectionResult.

InspectionMessage

A message in InspectionResult.InspectionMessages.

Properties

TypeNameRemarks
stringMessageThe message to display. Requires Studio 2019.10.3 or later.

InspectionResult

A result to an inspection.

Inheritance

IResult > InspectionResult

Properties

TypeNameRemarks
boolHasErrors
ICollection<string>MessagesFor more detailed messages, use InspectionMessage.
ICollection<InspectionMessage>InspectionMessagesBetter, scalable, and detailed messages. Specialized types are available (ActivityMessage). Requires Studio 2019.10.3 or later.
stringRecommendationMessageThe recommendation for this result.
TraceLevelErrorLevelThe error level of this result.
stringDocumentationLinkThe documentation link of this result.

IParameter

Defines the look of a rule or counter parameter.

Inheritance

Properties

TypeNameRemarks
stringKeyUnique key for this parameter in this rule.
stringLocalizedDisplayNameCurrent localized display name.
stringValueA value from the user for this parameter.
stringConstraintRegexThe constraint regex for the value. Requires Studio 2019.10.2 or later.
boolDefaultValueThe default value for this parameter. Requires Studio 2019.10.2 or later.

Parameter

A simple implementation of IParameter.

Inheritance

IParameter > Parameter

Properties

TypeNameRemarks
stringKeyUnique key for this parameter in this rule.
stringLocalizedDisplayNameCurrent localized display name.
stringValueA value from the user for this parameter.
stringConstraintRegexThe constraint regex for the value. Requires Studio 2019.10.2 or later.
boolDefaultValueThe default value for this parameter. Requires Studio 2019.10.2 or later.

ProjectMessage

Note:

This feature was introduced in UiPath.Studio.Activities.Api v20.4.

A package dependency that triggered a Workflow Analyzer error.

Inheritance

InspectionMessage > ProjectMessage

Properties

TypeNameRemarks
IDependencyDependencyOptional The dependency with error.

Rule

Interface for rule definition.

Inheritance

Constructors

public Rule(string ruleName, string ruleId)
TypeNameRemarks
stringruleNameThe name as it appears in the Workflow Analyzer Settings window.
stringruleIdThe Id of the rule must be unique.

Properties

Type

Name

Remarks

TraceLevel

ErrorLevel

  • The configurable error level for this rule.
  • Use only at runtime to read the effective error level. Do not set this when defining the rule. Use DefaultErrorLevel instead.

TraceLevel

DefaultErrorLevel

The default error level for this rule.

Requires Studio 2019.10.2 or later.

string

RecommendationMessage

The configurable recommendation message.

Rule <T>

A rule that applies to a certain InspectionObject.

Inheritance

Generic Type T

An IInspectionObject that defines what this rule applies to.

Constructors

public Rule(string ruleName, string ruleId, Func<T, Rule, InspectionResult> inspectionFunction)
TypeNameRemarks
stringruleNameThe name as it appears in the Workflow Analyzer Settings window.
stringruleIdThe Id of the rule must be unique.
Func<T, Rule, InspectionResult>inspectionFunctionA function that receives the objects to be inspected and the rule as configured by the user and must return an InspectionResult.

RuleConstants

Note:

This feature was introduced in UiPath.Studio.Activities.Api v20.4.

Defines the Studio profile to which a rule applies.

Constants

TypeNameRemarks
stringDevelopmentRuleConstantRepresents a rule that applies to Studio.
stringBusinessRuleConstantRepresents a rule that applies to StudioX.
stringTestAutomationRuleConstantRepresents a rule that applies to Studio Pro.

WorkflowMessage

Note:

This feature was introduced in UiPath.Studio.Activities.Api v20.4.

The message returned when a workflow is analyzed.

Inheritance

InspectionMessage > WorkflowMessage

Properties

TypeNameRemarks
IMemberModelSourceMemberOptional The source of the result.
stringDisplayNameOptional The display name of the activity that generated the message.

Was this page helpful?

Connect

Need help? Support

Want to learn? UiPath Academy

Have questions? UiPath Forum

Stay updated