Custom Workflow Analyzer Rule does not Appear in StudioX but does in Studio

Dear Community,

I’ve created a custom rule, that ensures our developers have included a Time Savings Metric into robots they’ve created. This rule should apply to robots created in Studio, or Studio X.

In this screen shot you can see my custom rule, which is enforced by a governance policy. In this instance UiPath is in the “Studio” profile.

However, when I swap over to the “Studio X” profile, the rule is not displayed.

I’ve checked the uipath.pollices.config file and I can see that each of the profile types, Studio, Studio Pro, and Studio X have a list of Workflow Analyzer rules that are enforced.

For instance, here are the rules that are enforced for Studio:

"Profiles": {
"Development": {
   ...
   "Analyzer": {
        "AllowEdit": false,
        "ReferencedRulesConfigFile": null,
        "EmbeddedRulesConfig": {
          "Rules": [
            {
              "Id": "CP-ANA-100",
              "IsEnabled": true,
              "Parameters": [],
              "ErrorLevel": "Error"
            },

This is my custom rule. However, when I look at the rules for the “Business” (Studio X) profile. My custom rule does not appear.

 "Business": {
     ...
 "Analyzer": {
    "AllowEdit": false,
    "ReferencedRulesConfigFile": null,
    "EmbeddedRulesConfig": {
      "Rules": [
        {
          "Id": "ST-USG-014",
...

My custom rule does not appear. I don’t know why exactly. I’ve even attempted to add the JSON definition of the rule as it appears in the “Development” profile to the “Business” profile to no avail.

Does anyone one know why a custom rule may appear in the Studio profile, but not the Studio X profile?

Thanks!

In order for a custom rule to appear in StudioX there is an additional property that must be set on on the rule. A new property called “ApplicableScopes” must contain “BusinessRule”. For e.g.

var rule = new Rule(Strings.ORG_USG_001_Name, RuleId, Inspect)
{
RecommendationMessage = Strings.ORG_USG_001_Recommendation,
ErrorLevel = TraceLevel.Error,
//Must contain “BusinessRule” to appear in StudioX, rules always appear in Studio
ApplicableScopes = new List { RuleConstants.BusinessRule }
};

We’ll get the documentation fixed.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.