How to add custom activity in Workflow Analyzer Rule ST-USG-026

I have created a custom activity and converted to a library successfully.
I wanted to add in workflow rule ST-USG-026 as a required activity of allowed activities
and Enforce analyzer to error when activity is not in the project.

But during run, other activity restrictions are showing that is also needed.
I did not add the custom activity in my project and wanted to see if it errors and it did not.

How can I make sure that the activity errors during run when custom activity is not in the project?


Hi @MaeHU,

Can you please share screenshots on how you have defined the list in the rule?

Also please make sure that you are specifying the name of the activity properly in the rule like all other activities?

May be to cross check this, you can include that package in your project first and then see how does it appear in your project.Json file and then accordingly provide the same details in the analyzer rule and see?


ST-USG-026 maybe is not enforsing the usage.
Have a look on combine it with
ST-USG-027 to your package
ST-USG-010 for detecting the missing usage

Hi Sonali,

Below are the screenshots. I have added the activities in “Allowed Activities” below settings. Thank you.



HI @MaeHU,

Seems like some confusion, let’s get requirements clear first:

  1. You want to ensure that activity that you have created should be there in your project, right? And if it is not there, then analyzer should throw error, right?

If answer is Yes to above question, then please note that the rule ST-USG-026
will throw error only when you are trying to use activities that are not allowed but if there are any activities that are allowed and are not part of the project, there wont be any errors.

To ensure the presence of required packages in your project, you need to use another rule ST-USG-027 which does a check on all required packages/activities and if those are not there in the project, an error will be thrown.
As an example, if I add below to the list of required packages and if I have not added this package in my project or even if it is added in the project but version is <20.10.8, then an error will be thrown. I believe this is your requirement(to ensure the presence of your custom package in the project), right?



Hi Sonali,

Yes I have added nuget package in ST-USG-027 as part of the dependency and works successfully.

In your question 1, yes that is the behavior I wanted to enforce using ST-USG-026.

In ST-USG-026, I have added the custom activity and other uipath packages but only accepts one at a time.


In workflow analyzer, I added this but did not error when I removed the activity coming from “Custom_Activity”.


Is there a rule to require an activity in the project?




Hi @MaeHU,

This behavior can be enforced using ST-USG-027 itself which ensure if activity is not there, error is thrown.

Please note, when you are mentioning activity , you are referring to the custom package itself that you have created. I think its just a different terminology you are using here.

After adding this custom activity/package details in rule ST-USG-027, you will notice if you don’t add this dependency in your project, you are being thrown error.

ST-USG-026 is not about ensuring what is required in the project but about what is allowed and what is not allowed to be in the project. And if anything is being used what is not allowed, then only error will be thrown. You wont see an error thrown if some activity is allowed but you have not used it.


Hi Sonali,

I understand that the package is enforced if ST-USG-027 is chosen.

I have successful behavior using this. ST-USG-027 only requires the package in the project.

Now, assuming the custom package is already in project dependencies and in the list of activities, if I did not use the activity in my project, I wanted to flag an error that the activity is not chosen/added/used. Is there a rule to require activity in the project?

this was the idea about using ST-USG-010 in combination

Thank you, I will try this combination


Yes in that case, you would already be getting warning message when no activity is used from a particular dependency.

You can consider changing action from warning to error for rule St-USG-010 and analyzer should show you that dependency was not used.


1 Like

Thank you, I will try to use S-USG-010 and see how it goes.



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