Skip to main content

This content has been archived and is no longer being updated.

Links may not function; however, this content may be relevant to outdated versions of the product.

Circumstance a rule with different properties or templates

Suggest edit Updated on July 3, 2019

By specializing, or circumstancing, a business rule, you can create conditional variants of the rule that address more specific business cases. These conditions or circumstance options can be a date, property, or template.

Pega 7.2 and earlier versions do not support the circumstancing a rule by a different property when it is already circumstanced by another property. This restriction was intended to prevent conflicts, but made it difficult to address closely related business cases where the same rule needed to be circumstanced by two different properties, date properties, or templates. For example, a section that was circumstanced in a particular framework was required to be circumstanced in another framework with a different property.

In Pega 7.2.1, these restrictions have been relaxed to address business cases that require multiple property circumstancing of a rule. You can:

  • Circumstance a base rule that is already circumstanced with a different property. Multiple property circumstancing in this way is possible only when the circumstanced rules are in different rulesets or Applies To classes. For example, a MortgageRate rule that is circumstanced by the PropertyType property can be circumstanced again by the CustomerSegment property.

Base rule circumstanced by more than one property

  • Circumstance a rule by a different property in the same ruleset by withdrawing the existing circumstanced versions. The circumstanced version in this case must be in the same or higher ruleset version. For example, a MortgageRate rule that was circumstanced by the PropertyType property can be circumstanced again by a different property, CustomerSegment, in the same or a higher ruleset version after the rule MortgageRate(PropertyType) is withdrawn.

Base rule circumstanced again with a different property in higher ruleset

In Pega 7.2.1 to Pega 7.3, if you withdraw a circumstanced rule in a ruleset version, you cannot specialize the base rule again in that ruleset version. The circumstanced version in this case must be in the higher ruleset version.

The following table summarizes the extended functionality of circumstance options in the latest version.

Version

Specialize by same property in same ruleset or applies to class

Specialize by different property in different ruleset or Applies To class

Specialize by same property in same ruleset or Applies To class after the circumstanced version is withdrawn

Specialize by different property in a higher ruleset version after the circumstanced version is withdrawn

Specialize by different property in the same ruleset version after the circumstanced version is withdrawnSpecialize by a combination of property and template

Pega 7.2 and earlier versions

Yes

No

Yes

No

NoNo

7.2.1 - 7.3

Yes

Yes

Yes

Yes

NoYes
7.3.1YesYesYesYesYesYes

Rule resolution of circumstanced rules

When several circumstanced versions of the base rule are available, the rule resolution algorithm selects a rule based on the availability of rules in the higher ruleset versions as shown in the following table. Depending on whether the conditions in the header row evaluate to true (T) or false (F), the result will be different.

Circumstanced rule in higher rulesetCircumstanced rule in lower rulesetBase rule in higher rulesetResult
TTTCircumstanced rule in higher ruleset version is resolved.
TFTCircumstanced rule in higher ruleset version is resolved.
FTTBase rule in higher ruleset version is resolved.
FFTBase rule in higher ruleset version is resolved.

Consider a mortgage bank that uses a MortgageRate collection that calculates the lending rate for all its mortgage products. This base rule belongs to the LendingProducts class and is in the MP: 04-09-08 ruleset.

Assume that this collection returns a rate of 11% for an average customer, based on eligibility criteria such as age, credit score, income, and so on.

MortgageRate (base) = 11.5%

To offer differential pricing for vacation homes, the bank decides to circumstance the base rule by the PropertyType property. The circumstanced rule, MortgageRate(PropertyType), calculates the rate based on the mandatory qualifications and other terms as decided by the organization. This rule is saved in the LendingProductsOther class and in the MP:05-02-07 ruleset.

Assume that this collection returns a rate of 13% for an average customer with a typical profile.

MortgageRate(PropertyType="VacationHome")= 13%

In the near future, the bank responds to a market opportunity to attract high net worth individuals at a lucrative rate to grow its outreach in a consumer segment. It circumstances the base rate by the CustomerSegment propertybased on the usual criteria and competitive discounts, arriving at an attractive rate of 9% for a typical high net worth customer. This rule belongs to the PremiumProducts class and the HP: 03-20-2 ruleset.

MortgageRate(CustomerSegment="HNI")= 9%

A snapshot of the application rule base in an ascending hierarchy can be represented as shown in the following table:

Rule

Circumstance option 1

Class

Ruleset

MortgageRate

NA

LendingProducts

MP: 04-09-08

MortgageRate(VacationHome)

VacationHome

LendingProductsOther

MP:05-02-07

MortgageRate(CustomerSegment)

CustomerSegment

PremiumProducts

HP: 03-20-2

The following scenarios describe rule resolution at run time.

  • Scenario 1: When the application encounters different circumstanced versions of the same rule, MortgageRate, it executes the .Mortgage(CustomerSegment) rule because it is in the higher ruleset, resulting in a rate of 9%.
  • Scenario 2: When the application encounters different circumstanced versions of the same rule, MortgageRate, and .MortgageRate(CustomerSegment) is unavailable in a lower ruleset, the application executes the base rule, which results in a rate of 11.5%.
  • Scenario 3: When the application encounters different circumstanced versions of the same rule, MortgageRate, that are unavailable, the application executes the base rule, .MortgageRate, which results in a rate of 11.5%.
Did you find this content helpful? YesNo

62% found this useful

Have a question? Get answers now.

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

Ready to crush complexity?

Experience the benefits of Pega Community when you log in.

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