Creating a Rule Set
  • 14 Mar 2024
  • 4 Minutes to read
  • Dark
    Light

Creating a Rule Set

  • Dark
    Light

Article summary

Overview

Rule Sets are a set of Rules and Flows that are targeted to work together for complex data evaluation. Conditional Rules provide the ability to create Rule Sets within a Rule Set. A Conditional Rule Set may evaluate conditions to determine if this Rule Set needs to be executed and may extend Rule Set input data.


Rule Set Configuration

  1. In the desired Designer Folder, click CREATE RULE on the Global Action Bar. Select Rule Set. In the Element Gallery, expand the Rule Set section and then select, name, and create a Rule Set.
  2. On the Rule Set action bar, click Setup. Below is an overview of each property. Once complete, click SAVE.

Setup

PropertyDescription

LogicalOutputs either a True or False boolean when the Rule Set completes.

DataReturnOutputs a Data object when the Rule Set completes. Used for data manipulation.

ScoringOutputs a numerical value when the Rule Set completes.  When this option is selected, a new option for Scoring Strategy becomes available.

Type

PropertyDescription

Template w/ InstancesUsed for creating a base set of Rules with specific subsets for different cases.

InstanceUsed for creating only a single set of the Rule set to be run.

ConditionalUsed for creating a Rule Set within a Rule Set. 

Allowed Rule Types

PropertyDescription
Action RulesEnables Rules that trigger different Rules or Flows to execute based on their outcome.
Rule TablesEnables Rule Tables to be created within a Rule Set.
Truth TablesEnables Truth Tables to be created within a Rule Set.
Matrix RulesEnables Matrix Rules to be created within a Rule Set.
Flows - EvaluationEnables Flows to be created to evaluate data within a Rule Set.
Flows - Evaluation/Data AdditionEnables Flows to be created to evaluate and add additional data within a Rule Set.
Flows - Transform DataEnables Flows to be created which manipulate existing data within a Rule Set.

Advanced

PropertyDescription
Show All True PathDisplays an All True outcome path when the Rule Set is used within a Flow.
Show All False PathDisplays an All False outcome path when the Rule Set is used within a Flow.
Path For No Rule ResultDetermines what path the Rule Set will travel if there is no result.
Defined Outcome PathsUsed to define additional outcome paths for the Rule Set.
Done Path NameUpdates the name for the Done outcome path.

Data Storage

Property
Result Data StorageDetermines what data will be stored within the Rule Set. By default, this value uses Header.
Result Extension TypeDetermines the Rule Set's Result extension type used to store executed data.
Store Not RunStores executed data for Rules that were not ran.

Lists

PropertyDescription

Output Error ListOutputs a list of errors that occurred when the Rule Set is ran.

Output False ListOutput a list of Rules that returned a False result.

Output No Result ListOutputs a list of Rules that returned no result.

Output Not Run ListOutputs a list of Rules that did not run when the Rule Set executed.

Output True ListOutputs a list of Rules that returned a True result.

Rule Set Data

PropertyDescription
InputsDefines the input datatypes used by the Ruleset.

Service Settings

PropertyDescription
Integration TypeSets the Integration Settings for the Rule Set, allowing the Rule Set to be accessed outside of Decisions. By default, this is set to None.

Creating a Rule Set

In this example, a Rule Set will be created and house a Conditional Rule Set. Then, a Flow will test the Conditional Rule SetBelow is a downloadable example that can be imported into Decisions.

  1. Input Data for the Rule Set will need to be defined. Select Setup Rule Set.
  2. Under RULE SET DATA > Inputs, click ADD.
  3. Define the Input Data. Location (String) and Amount (Double) are configured as inputs in this case.
  4. Under the SETUP, select Conditional for Type and Scoring for Return. Then, click SAVE to save changes and close the dialog window.
  5. Click Create Rule Set [Conditional] on the Rule Set action panel. When the dialog box appears, provide a name for the Rule Set and click CREATE.
  6. New Rules can be defined using the Add Evaluation Rule. To edit existing rules, click on the Pencil Icon.
  7. The Rule Designer will then open, where the Rule can be updated/defined.

Running a Rule Set in a Flow

  1. Create a new Flow.
  2. In the Toolbox, select and drag a Run Rule Set from the Designer Entities > Rules category onto the workspace.
  3. Click PICK under the RULE SET CONFIGURATION category on the Properties panel and select the created Rule Set.
  4. Define the inputs needed for the Rule Set.
  5. Since the Rule Set is a Conditional Rule Set, the Inclusion Rule Control input is available.
    This input sets the same execution Run Mode for all Evaluation and Intercept Rules, without the need to manually set the values. Below is an overview of the options available
OptionDescription
Run AllRuns all Rules within a Rule Set.
Stop on First TrueStops the Rule execution on the first True result.
Stop on First FalseStops the Rule execution on the first False result.

Debug

  1. Click Debug on the top action bar. When the Debugger window opens, click START DEBUGGING. 
  2. After the Flow runs, the debugger will display the Rule Set that was running, along with the results for each individual Rule, depending on the Run mode configuration.

Adding Additional Rules

On the Rule Set Designer Folder, click Add on the right side of the screen, then click CREATE.


Setting Execution Order

If multiple Rules exist within a Rule Set, the order in which they will execute can be configured. Within a Rule Set, click Setup, then check Sort by Order before Run.

To set the execution order: 

Edit the Rule. In the Properties panel of the Rule, check the SETTINGS category. Enter a numerical value in the Order field under the Rule Set sub-category.

When the Rule is run through the debugger as part of a Flow, the rules will execute in their configured order.

Enabling/Disabling Rules in Rule Set

On the Properties panel of a Rule in a Rule Set under SETTINGS in v8.5+, users can enable, disable, or partially enable the Rules. The status of the Rule is displayed next to Configure Integration. Unselecting Enabled will disable the Rule, and selecting Use Enable Rules will partially disable the Rule.


For further information on Rules, visit the Decisions Forum.

Was this article helpful?