Rule steps (simple)Last Updated: 06/18/2018 Introduced in Version: 2.0
You can easily create new rules to be used in Decisions by creating public methods in a class file project. This article will show you how to accomplish this.
*Note custom codes are located here: C:\Program Files\Decisions\Decisions Services Manager\Instances\Control\CustomReferences
Visual Studio 2017 is being used in this example. Create a new Class Library project is Visual Studio. To add the Decisions SDK, in the Project Solution window, right click your project and go to Manage NuGet Packages. Under the browse tab search for DecisionsSDK.
Decorate your class with the following attribute: [AutoRegisterMethodsAsRuleSteps(true, "Date Rules")]
Create a public method in your class that performs the checks you want to returns a bool. This method will become a rule in Decisions. The name of your method will be the name of your rule. Also the inputs of your method will become the inputs of your rule. See the following code for an example method in a class that we will use to create a rule inside of Decisions.
[AutoRegisterMethodsAsRuleSteps(true, "Date Rules")]
public class SampleRules
public bool SelectedDayEqualsCurrentDay(DateTime dateToCheck)
return (dateToCheck.DayOfWeek == DateTime.Now.DayOfWeek);
After you have written your method build, your project and follow the steps here: Deploying server side extensions
After deploying your code log into the Decisions portal and create a new rule. You will see the methods from your class in the list of available rule conditions.
NOTE: classes tagged as rule steps can also be tagged to show up as flow steps. For more on how to tag classes to show up as flow steps see Flow steps (simple)