- 10 Jul 2023
- 2 Minutes to read
- Print
- DarkLight
Rules
- Updated on 10 Jul 2023
- 2 Minutes to read
- Print
- DarkLight
A Rule is a Designer Element used to evaluate data against a set of pre-configured conditions. Rules can be used to:
- Output resulting data to a Flow or as a response to an API call.
- Show/Hide Form controls.
- Filtering a Report/Page.
Rules are created within the Rule Designer, which provides a visual workspace to view and define the logic. Rules also have varying types, ranging from simple statement Rules to complex Truth Tables.
The user sets the conditions that are being evaluated, the meaning of a True result, and the meaning of a False result.
The Rules engine is one of the most powerful features in Decisions and mastering it is the best way to unlock the platform's full potential.
How to Interpret Rule Logic
Rules are made of logical statements that by default return a Boolean value of True or False. Usually this comes in the form of If/Then statements.
There are two types of Boolean logical statements: If/And as well as Either/Or.
If/And requires multiple conditions to be true for the Rule to output true. The below example shows a two part If/And, but any number of conditions are allowable.
Either/Or is less constraining than If/And, merely requiring that one condition in a series be true for the Rule to output true. The example below uses two conditions, but any number of conditions are possible.
Types of Rules
Name | Description |
Statement Rules | If/Then statements |
Truth Table | If/And statements in a table format. Produces a list of results. |
Sequential Rules | Flow behavior that allows several rules to connect together. |
Expression Rules | Uses an algorithm to determine the result. |
Matrix Rules | Uses a table to allow different inputs to trigger user set outputs other than True or False. |
Rule Sets | A grouping of Rules or Flows based on a common connection consolidated in a Flow. |
Interceptor Rules | Catch invalid data in the workflow process. |
Tree Rule | Similar to Matrix Rules, but with branching paths. |
Rule Chain | Uses a special designer tool to create a path of rules that can branch depending on the rule results. Often used in questionnaires. |
Rule Table | Allows complex And statements that can return Data like a Matrix Rule. |
External Truth Table | A Truth Table that uses external sources to create rows. |
How to Run a Rule
There are three methods for running a rule. These are Workflow, Scheduled Job, and API.
Within a Flow there are steps to run rules. Many simple Rules are already configured and can be dragged from the Toolbox onto the Canvass just like Steps. For more, view the Default Rule page.
Scheduled Jobs can also be configured to run Rules at set times.
Rules can also be run via API. External systems can submit data through Integrations in JSON or XML format into Decisions, trigger a Rule, and then export out the results in JSON or XML.
Rule Results
As discussed above the default Rule results are True or False. However there are other types of results that can be generated.
Specific data can be returned based on the result of a Rule. This is seen in Matrix Rules.
Results can be used to trigger other actions. A False result could be used to cause another designer element to activate, such as another Step.