Setting Up Rule Set
- 19 Jul 2022
- 4 Minutes to read
- Print
- DarkLight
This documentation version is deprecated, please click here for the latest version.
Setting Up Rule Set
- Updated on 19 Jul 2022
- 4 Minutes to read
- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
Overview
Rule Set is a set of Rules and Flows in Decisions that are targeted to work together in a process of complex data evaluation. Rule Sets give the best flexibility in data validation.
In order to use Rule Sets and Interceptor Rules, the FlowSets Module should be installed. To learn how to install a module, see Installing Modules in Decisions.
Example
This example will demonstrate how to create a Rule Set and use a simple Rule Set to evaluate if a person is over 21 and is in the state of VA. Below is a downloadable example to import into Decisions.
To learn more about importing, see Import/Export Overview.
- In a Designer Project, click CREATE DATATYPES/INTEGRATIONS. Select Flow Structure and click CREATE.
- In the Flow Structure definition window, provide a Structure Type Name and add four Data Members: FirstName, LastName, State, and Age. When finished, click SAVE to save and continue.
- In the Designer Project click CREATE RULE and select Rule Set. Then, click CREATE. Name the Rule Set and click CREATE.
> - The system creates a Rule/Flow Set Base Folder. On the Rule/Flow Set View of this Folder see Rule/Flow Set Settings on the left-hand side and Rules and Flows in Set on the right-hand side of the Page. To edit the Rule Set Settings select Setup on Folder Actions Panel.The Setup Rule Set dialog window has multiple sections for configuring the Rule Set. Below are the sections and the options available
Setup Section
Usage OptionDescriptionLogicalApply the logical check to data. Best used for validations and data checkData ReturnUsed for data manipulationsScoringUsed for statistical purposes when need to do manipulations on the rule results countRun Mode OptionDescriptionRun AllRun all Rules/Flows in the SetStop On First TrueTerminates Set execution on first Rule evaluating as TrueStop On First FalseTerminates Set execution on first Rule evaluating as FaseRule Set Type OptionDescriptionTemplate w/ InstancesUsed to create a base set of Rules and then create specific sub-sets of RulesInstanceUsed to create just a Set of Rules without specific sub-sets.ConditionalRule Set Type that allows users to create Rule Sets within this Rule Set. In the Conditional Rule Set, we can use Flows to Extend Data Inputs for Flows/Rules based on the designed conditions or create Run Set Rule controls to determine if we need to run the Set based on designed conditions.Rule Types Section
Rule Type OptionDescriptionFlows – EvaluationBuild a custom Flow that evaluates data and outputs ResultDataFlows – Evaluation/Data AdditionBuild a custom Flow that evaluates data and outputs ResultData and Rule Set Input Data.Flows – Transform DataBuild a custom Flow for editing Rule Set Input DataAction RulesUse Rules that trigger different Flows based on the designed conditionsTruth TablesUse Truth Tables for more complex data validationsInterceptor RulesAllow Interceptor Rules: to build Rules that intercept and stop invalid data from being processed.
Intercepted Flow: to build handlers for intercepted data.
Outcome Options Section
Outcome OptionsDescriptionShow All Truth PathCreating an outcome path that the Flow takes if all Rules in the Set evaluated TrueShow All False PathCreating an outcome path that the Flow takes if all Rules in the Set evaluated FalsePath For No Rule ResultDefault outcome Path that is used when Rule Set execution is completedDefined Outcome PathsCustom outcome Paths that may be used to continue Flow Execution on the desirable Flow Branch based on the Rule Set ResultDone Path NameCustomize the default ‘Done’ outcome nameListsOutputs the following Lists: Error, False, No Result, Not Run, TrueData Storage Section
Data Storage options: None, Header, HeaderWithAllTrue, HeaderWillAllFalse, AllIf using Interceptor Rules, all intercepted data will be stored even if no Data Storage options are setIn the API section set Allow REST API Calls or Create Web Service for this Rule Set.
- Select Add New to add new Rule Set Input Data.
- In the Add Inputs definition dialog, name the Input Data and pick the Flow Structure Type that was created previously in this tutorial. Click OK to save and continue.
- Click SAVE to close the Setup Rule Set window.
- Click Add Evaluation Rule on the Folder Actions panel. Name the Rule and click CREATE RULE to proceed to the Rule Designer.
- Click Select Data Element. Click ApplicationData and select Age. Click NEXT.
- Select Greater Than and click NEXT on the Verb definition dialog.
- Enter "21" in the value2 field and click DONE.
- Click Save to save changes to the Rule.
- Add another Evaluation Rule that evaluates as ApplicationData.State is VA.If using multiple Rules, the order in which they will execute can be configured individually. On the Properties panel of the Rule under the SETTINGS category, enter a numerical value in the Order field under Rule Set.
- Navigate to the Designer Project and click CREATE FLOW. Select Default and click CREATE. Name the Flow and click CREATE.
- Click the Done path on the Start step. Select Create Data and click ADD.
- With the step selected, click Show Editor. Enter "Application" under the Name field and change the Type to Application.
- Click Edit under Input. Click the ellipses icon under Value and enter values for the data member input fields. Click OK and close the Data Definitions dialog window to save.
- Click the Done path on the Create Data step and add a Run Rule Set step by navigating to Flows, Rules, Forms, and Reports > Rules.
- Under Rule Set Configuration, click Pick and choose the Rule Set.
- Select Unknown next to the Application Data field under Inputs and click Select From Flow. Select Application and click DONE.
- Connect the outcome path to the End step. Click Save to save changes.
Debug
- Select Debug on the top panel of the Flow Designer to test the results of the Rule Set.
- After the debugger runs, select the Run Rule step, click Execution 1, and choose View Input/Output Data.
The first Rule evaluates true because the age was older than 21. The second Rule evaluated as false because the state was not VA.
Was this article helpful?