sdk
latest
false
UiPath logo, featuring letters U and I in white
Developer Guide
Last updated Oct 25, 2024

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

Type

Name

Remarks

string

ActivityId

The id of the activity related to the message.

string

ActivityDisplayName

The activity display name.

IMemberModel

SourceMember

Optional 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)

Type

Name

Remarks

string

counterName

The name as it appears in the Workflow Analyzer Settings window.

string

counterId

The 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)

Type

Name

Remarks

string

counterName

The name of the counter.

string

counterId

The Id of the counter must be unique.

Func<IReadOnlyCollection<T>, Counter, InspectionResult>

inspectionFunction

A 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

Type

Name

Remarks

string

Message

The message to display. Requires Studio 2019.10.3 or later.

InspectionResult

A result to an inspection.

Inheritance

IResult > InspectionResult

Properties

Type

Name

Remarks

bool

HasErrors

 

ICollection<string>

Messages

For more detailed messages, use InspectionMessage.

ICollection<InspectionMessage>

InspectionMessages

Better, scalable, and detailed messages. Specialized types are available (ActivityMessage). Requires Studio 2019.10.3 or later.

string

RecommendationMessage

The recommendation for this result.

TraceLevel

ErrorLevel

The error level of this result.

string

DocumentationLink

The documentation link of this result.

IParameter

Defines the look of a rule or counter parameter.

Inheritance

Properties

Type

Name

Remarks

string

Key

Unique key for this parameter in this rule.

string

LocalizedDisplayName

Current localized display name.

string

Value

A value from the user for this parameter.

string

ConstraintRegex

The constraint regex for the value. Requires Studio 2019.10.2 or later.

bool

DefaultValue

The default value for this parameter. Requires Studio 2019.10.2 or later.

Parameter

A simple implementation of IParameter.

Inheritance

IParameter > Parameter

Properties

Type

Name

Remarks

string

Key

Unique key for this parameter in this rule.

string

LocalizedDisplayName

Current localized display name.

string

Value

A value from the user for this parameter.

string

ConstraintRegex

The constraint regex for the value.

Requires Studio 2019.10.2 or later.

bool

DefaultValue

The 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

Type

Name

Remarks

IDependency

Dependency

Optional The dependency with error.

Rule

Interface for rule definition.

Inheritance

Constructors

public Rule(string ruleName, string ruleId)

Type

Name

Remarks

string

ruleName

The name as it appears in the Workflow Analyzer Settings window.

string

ruleId

The 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

AnalyzerInspector > Rule > Rule<T>

Generic Type T

An IInspectionObject that defines what this rule applies to.

Constructors

public Rule(string ruleName, string ruleId, Func<T, Rule, InspectionResult> inspectionFunction)

Type

Name

Remarks

string

ruleName

The name as it appears in the Workflow Analyzer Settings window.

string

ruleId

The Id of the rule must be unique.

Func<T, Rule, InspectionResult>

inspectionFunction

A 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

Type

Name

Remarks

string

DevelopmentRuleConstant

Represents a rule that applies to Studio.

string

BusinessRuleConstant

Represents a rule that applies to StudioX.

string

TestAutomationRuleConstant

Represents 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

Type

Name

Remarks

IMemberModel

SourceMember

Optional The source of the result.

string

DisplayName

Optional The display name of the activity that generated the message.

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.