Custom Rule Not Showing In Workflow Analyzer Settings

What is the resolution when Custom Rule does not show up in Workflow Analyzer?

Troubleshooting:

  1. Try changing the Custom Workflow Analyzer rules location in the Studio settings to a custom location and then place the .dll files for the rules in the folder that was specified.

![](upload://sH82vm6sdo2WBSCBBoePViZta44.html)

  1. After following the step above, restart Studio and open a project.
  2. After opening a project, open the Workflow Analyzer Settings and see if the new custom rules are listed.
  3. If they still are not, proceed to Approach #1
  4. If they are visible after following the steps above, implies that the .dll files are placed in the wrong location/ folder. To find the folder where the files should belong please proceed to Approach #2

Approach #1: Open the custom activity C# project in Visual Studio for the Custom Workflow Analyzer Rule, make sure the project contains the Registration Interface Method. Review the documentation at the link provided for additional information.

Example: Note in this example the project name is MyCustomRule. The project name/ namespace may be different.

  1. Add the following Regiestration Interface Method to the project via a separate file called RuleRegistration.cs.

using UiPath.Studio.Activities.Api;

using UiPath.Studio.Activities.Api.Analyzer;

namespace MyCustomRule

{

public class RuleRegistration : IRegisterAnalyzerConfiguration

{

//Registers the rules with Workflow Analyzer

public void Initialize(IAnalyzerConfigurationService workflowAnalyzerConfigService)

{

workflowAnalyzerConfigService.AddRule(PropertySettingsRule.Get());

}

}

}

  1. Rebuild the project and copy the MyCustomRule.dll file from the C# project
  2. Add the copied MyCustomRule.dll file to Studio\Rules folder. (See instructions at Solution #2 below on where to find the correct Rules folder)
  3. Open up a Studio project and open the Workflow Analyzer Rule Settings. The rule should be visible in the Studio Workflow Analyzer Settings.

Approach #2

  1. How to Find Your Default Studio Rules Folder
  2. To validate where your "default" Rules folder is located, you can type the following command in Command Prompt: where /r c: *UiPath.Studio.exe
  • Replace "c" above for your drive letter where Studio is installed if it is something other than the C Drive.

  1. Copy the path given without including the UiPath.Studio.exe file name

Example1: C:\Users\<username>\AppData\Local\Programs\UiPath\Studio\

Example2: C:\Program Files\UiPath\Studio\

  1. In File Explorer, navigate to the path given (without the UiPath.Studio.exe file name) and click on the Rules folder. This is the default folder where the .dll files should be placed unless otherwise specified.
Read more on the Building Custom Roles .