Rulestore
Create and store business rules that govern the digital processes.
Last updated
Was this helpful?
Create and store business rules that govern the digital processes.
Last updated
Was this helpful?
The Rulestore is a repository for creating and managing static business rules to be used in digital processes. They are not active until referenced by a digital process. The business rules can be reused multiple times, in different digital processes. Business rules can be changed without changing the digital process that references it, they are completely independent. Business rules can be created by users with the OE Rule Editor and OE Admin roles.
You can filter the rules by the ID and name. Additionally, you ca also see which digital processes are actively referencing each rule.
If you choose the Go to Digital Process button, it opens the digital process in a separate tab. Business rules cannot be deleted if there's any digital process using the rule.
There are two options when creating a business rule, simple and advanced mode:
Simple - this is a wizard interface that lets you create rules without needing any technical understanding of the underlying expression language
Advanced - lets you create a rule using a comprehensive expression language called JsonLogic
It's possible to add and edit the same rule in both modes as long as the expression can be represented in the simple mode. If you create a more complex, advanced expression, it cannot be viewed in the simple mode.
In the Management Dashboard, go to OE -> Rulestore.
Choose the Create Rule button. Simple mode opens by default.
First, the Name block gets activated in the wizard. Enter the name for the rule in the Rule Name field. You can see it displayed in the block. This name is important because it is used as the variable name, when referenced by a digital process.
Add a Description for the rule. Use this to help you select the correct rule to reference in your digital process.
Choose a Unit for the rule. Units can be of different formats - boolean, string, number, date or list.
Enter the rule Expression. You can choose from a list of the predefined expressions depending on the selected unit. For instance, to decide whether the value of a number should be less, greater or equal to the specified value.
In the Management Dashboard, go to OE -> Rulestore.
Choose the Create Rule button.
Go to Advanced mode and enter a name for the new rule.
Add a Description for the rule. Use this to help you select the correct rule to make sure it reflects the rule behavior, not to mistake it with a different rule when you reference it in your digital process.
Enter a rule expression. The rule should be created in a JsonLogic format.
A JsonLogic expression for the above order rule:
If you add a JsonLogic expression to create a rule, a syntax validation takes place. If the expression is not a valid JsonLogic format, you get an error message and the rule cannot be created.
You can define a variety of different rules for your business purposes, they can include dealing with orders, work processes, effectiveness and many others.
As an example, you can define a rule that works as a condition that filters return reasons. In this rule, the only reasons to approve a return are a damaged product, wrong price, or a wrong product.
You can set up a rule that will work for products delivered only after a specified date and time.
To learn how the rules can be added to a digital process in OE, see the section in documentation.