Redirected rule
A redirected rule is a circumstance rule that is configured to reference another circumstance rule for the same base rule. Redirection is available for Decision Tables ( Rule-Declare-DecisionTable).
At run time, if rule resolution initially selects a redirected rule, the system accesses the target of the redirection, and that second rule runs. (If the target is not found, the base rule runs.) The system ignores all fields on the redirected rule form, except for the redirection details and the rule name.
Benefits
Redirection can simplify maintenance of a set of circumstance rules. For example, an application might include a decision table named SalesTax that computes state sales taxes for a state and is circumstanced by state code, such as VA for Virginia.
Your application needs one base rule and 50 circumstance-qualified rules, one for each state code. However, if the tax structure of several states (such as Alaska, Delaware, Florida, Montana, and New Hampshire) is identical, you can:
- Create a circumstance rule for Alaska (with AK as the circumstance value) that defines the Alaska state sales tax.
- Create circumstance rules for Delaware, Florida, Montana, and New Hampshire which are marked to redirect to the AK rule.
Redirection does not reduce the number of circumstance rules you need to create, but it can reduce your maintenance effort when several of them operate alike (that is, are functionally equivalent).
Creating a redirected rule
To create redirected rules, which are circumstance rules that are configured to reference other circumstance rules for the same base rules, complete the following tasks.
- Create a base rule for the decision table.
- Using the Save As toolbar operation, create each circumstanced rule that provides distinct results.
- Create additional circumstance rules for other values of the rule.
- Open the circumstance rule that you want to redirect to another circumstanced rule.
- On the Results tab of the circumstance version of the decision table that you want to redirect to the target rule, select the Redirect this Rule field.
- From the Circumstance Value list, select the circumstance value of the target rule.
Previous topic Controlling the order of circumstance definitions Next topic Base rules