Let the expansion tool work for you with tabular rules
- Last Updated: November 6, 2023
- 2 minute read
- Corticon
- Version 6.3
- Documentation
Business rules, especially those found in operational manuals or procedures, often take the form of tables. Take for example the following table that generates shipping charges between two geographic zones:
| Matrix to Calculate Shipping Charges per Kilogram | |||||
|---|---|---|---|---|---|
| From/To | Zone 1 | Zone 2 | Zone 3 | Zone 4 | Zone 5 |
| Zone 1 | $1.25 |
$2.35 |
$3.45 |
$4.55 |
$5.65 |
| Zone 2 | $2.35 |
$1.25 |
$2.35 |
$3.45 |
$4.55 |
| Zone 3 | $3.45 |
$2.35 |
$1.25 |
$2.35 |
$3.45 |
| Zone 4 | $4.55 |
$3.45 |
$2.35 |
$1.25 |
$2.35 |
| Zone 5 | $5.65 |
$4.55 |
$3.45 |
$2.35 |
$1.25 |
In the following figure, a simple Vocabulary with which to implement these rules was built. Because each cell in the table represents a single rule, the Rulesheet contains 25 columns (the Cross Product equals 5x5 or 25).
Rather than manually create all 25 combinations (and risk making a mistake), you can use the Expansion Tool to help you do it. This is a three-step process. Step 1 consists of entering the full range of values found in the table in the Conditions cells, as shown:
Now, use the Expansion Tool to expand column 1 into 25 non-overlapping columns. You now see the 25 subrules of column 1 (only the first ten sub-rules are shown in the following figure due to page width limitations in this document):
Each subrule represents a single cell in the original table. Now, select the
appropriate value of shipCharge in the Actions section of each subrule as shown:
In step 3, shown in the following figure, select to renumber the subrules to arrive at the final Rulesheet with 25 general rules, each of which can now be assigned a Rule Statement.
For more about this example, see the section How to optimize Rulesheets .