Rulesheet analysis and optimization
- Last Updated: June 9, 2021
- 2 minute read
- Corticon
- Version 7.2
- Documentation
Analysis and optimization is the process of examining and correcting or improving the logical construction of Rulesheets, without using test data. As with testing, the analysis process verifies that the rules are functioning correctly. Testing, however, does nothing to inform the rule builder about the execution efficiency of the Rulesheets. Optimization of the rules ensures they execute most efficiently, and provide the best performance when deployed in production.
The following example illustrates the point:
Two rules are implemented to profile life insurance policy applicants into two categories: high risk and low risk. These categories might be used later in a business process to determine policy premiums.
To test these rules, create a new scenario in a Ruletest, as shown:
In this scenario, a single example of Person, a non-smoker aged 45 is created. Based on the rules just created, the
expectation is that the Condition in Rule 1 will be satisfied (People
aged 55 or younger…) and that the person's riskRating will be assigned the value of low.
To confirm the expectations, run the Ruletest:
As you can see in the figure, the expectations are confirmed: Rule 1 fires
and riskRating is assigned the value of low. Furthermore, the .post
command displays the appropriate rule statement. Based on this single scenario, can we say
conclusively that these rules will operate properly for other possible scenarios; that is,
for all instances of Person? How do we answer this
critical question?