Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Redirected rule

Updated on January 14, 2022

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).

Note:
  • Redirection is possible only for single value circumstancing and not for template circumstancing.
  • The target of a redirected rule can be another redirected rule.
  • You cannot redirect a rule to itself. You should avoid creating a circular set of redirections (A to B and B to A), as doing so causes an exception at run time.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us