- 09 Jan 2025
- 5 Minutes to read
- Print
- DarkLight
Creating a Rule Set
- Updated on 09 Jan 2025
- 5 Minutes to read
- Print
- DarkLight
Overview
Rule Sets are a set of Rules and Flows that are targeted to work together for complex data evaluation. They can produce more nuanced results than are possible with other kinds of Rules alone. For instance, a Rule Set could be made of a series of Evaluation Rules and then a Matrix Rule.
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. Data that meets certain conditions can be sent to be reviewed by different groups of Rules.
Rules that make up a Rule Set need to be created manually within the Rule Set. It is not possible to add existing Rules or use Templates
Rule Set Configuration
- 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.
- On the next screen is a list of various setting. Below is an overview of each property. Once complete, click SAVE.
Setup
Property | Description | |
---|---|---|
Logical | Outputs either a True or False boolean when the Rule Set completes. | |
DataReturn | Outputs a Data object when the Rule Set completes. Used for data manipulation. | |
Scoring | Outputs a numerical value when the Rule Set completes. When this option is selected, a new option for Scoring Strategy becomes available. |
Type
Property | Description | |
---|---|---|
Template w/ Instances | Used for creating a base set of Rules with specific subsets for different cases. | |
Instance | Used for creating only a single set of the Rule set to be run. | |
Conditional | Used for creating a Rule Set within a Rule Set. |
Allowed Rule Types
Rule Sets only allow Evaluation Rules (similar to a Statement Rule) by default. Additional types of Rules have to be enabled before they can be added to the Rule Set.
Property | Description |
---|---|
Action Rules | Enables Rules that trigger different Rules or Flows to execute based on their outcome. |
Rule Tables | Enables Rule Tables to be created within a Rule Set. |
Truth Tables | Enables Truth Tables to be created within a Rule Set. |
Matrix Rules | Enables Matrix Rules to be created within a Rule Set. |
Flows - Evaluation | Enables Flows to be created to evaluate data within a Rule Set. |
Flows - Evaluation/Data Addition | Enables Flows to be created to evaluate and add additional data within a Rule Set. |
Flows - Transform Data | Enables Flows to be created which manipulate existing data within a Rule Set. |
Advanced
Property | Description |
---|---|
Show All True Path | Displays an All True outcome path when the Rule Set is used within a Flow. |
Show All False Path | Displays an All False outcome path when the Rule Set is used within a Flow. |
Path For No Rule Result | Determines what path the Rule Set will travel if there is no result. |
Defined Outcome Paths | Used to define additional outcome paths for the Rule Set. |
Done Path Name | Updates the name for the Done outcome path. |
Data Storage
Property | Description |
---|---|
Result Data Storage | Determines what data will be stored within the Rule Set. By default, this value uses Header. |
Result Extension Type | Determines the Rule Set's Result extension type used to store executed data. |
Store Not Run | Stores executed data for Rules that were not ran. |
Lists
Property | Description | |
---|---|---|
Output Error List | Outputs a list of errors that occurred when the Rule Set is ran. | |
Output False List | Output a list of Rules that returned a False result. | |
Output No Result List | Outputs a list of Rules that returned no result. | |
Output Not Run List | Outputs a list of Rules that did not run when the Rule Set executed. | |
Output True List | Outputs a list of Rules that returned a True result. |
Rule Set Data
Property | Description |
---|---|
Inputs | Defines the input datatypes used by the Ruleset. |
Service Settings
Property | Description |
---|---|
Integration Type | Sets 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 Set. Below is a downloadable example that can be imported into Decisions.
- Input Data for the Rule Set will need to be defined. Select Setup Rule Set.
- Under RULE SET DATA > Inputs, click ADD.
- Define the Input Data. Location (String) and Amount (Double) are configured as inputs in this case.
- Under the SETUP, select Conditional for Type and Scoring for Return. Then, click SAVE to save changes and close the dialog window.
- 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.
- New Rules can be defined using the Add Evaluation Rule. To edit existing rules, click on the Pencil Icon.
- The Rule Designer will then open, where the Rule can be updated/defined.
Running a Rule Set in a Flow
- Create a new Flow.
- In the Toolbox, select and drag a Run Rule Set from the Designer Entities > Rules category onto the workspace.
- Click PICK under the RULE SET CONFIGURATION category on the Properties panel and select the created Rule Set.
- Define the inputs needed for the Rule Set.
- 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.
Option | Description |
---|---|
Run All | Runs all Rules within a Rule Set. |
Stop on First True | Stops the Rule execution on the first True result. |
Stop on First False | Stops the Rule execution on the first False result. |
Debug
- Click Debug on the top action bar. When the Debugger window opens, click START DEBUGGING.
- 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.
Enabling/Disabling Rules in Rule Set
On the Properties panel of a Rule in a Rule Set under SETTINGS, 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.
Rule Sets and Upgrading
For Rule Sets created in v8.16 or below, if using either (or both) a user defined type or a data return, the Rule Set will have issues when being imported into a version below v9.4. Starting in v9.4 a setting called "Use Unique Namespace for Output Type" will appear under the Return section in the Setup Rule Set dialog menu. This setting by default is set to true. The setting can be set to False for users with a prior ruleset in a Flow that was using the old name space. This will allow it compile and the Flow using the Rule Set to work properly.
The "Use Unique Namespace for Output Type" setting will not appear for Rule Sets that were created in v8.17 or above, or any v9.