Skip to main content
Verify the version tags to ensure you are consuming the intended content or, complete the latest version.

Rule reuse through inheritance

Inheritance methods

Inheritance allows your application to reuse existing rules for other cases or applications. Rule reuse reduces development and testing time without sacrificing application quality.

Pega Platform™ provides two methods for rule inheritance: pattern inheritance and directed inheritance.

Pattern inheritance

Pattern inheritance is automatic. Pattern inheritance uses the class name structure to determine rules available to reuse. It searches for the rule of interest following the class hierarchy — in other words, pattern inheritance searches classes that share a class name prefix. Because rules are aggregated at higher levels to reflect their usability throughout an entire division or organization, pattern inheritance promotes reuse based on business suitability. For example, a rule set at the division level that defines elements of payment processing for insurance claims can be reused by each claims department belonging to that division.

The following image illustrates a basic pattern inheritance hierarchy for an insurance company (ABCIns) and two of its divisions: Consumer and Business. The ABCIns class is the automatic parent class to two child classes (ABCIns-Consumer and ABCIns-Business) which are themselves the parent classes to ABCIns-Consumer-PolicyProcessing and ABCIns-Business-PolicyProcessing, respectively.

In the following image, click the + icons to learn more about pattern inheritance.

Directed inheritance

Directed inheritance is inheritance between classes where the parent class is explicitly specified, unlike pattern inheritance, which is automatic. You apply directed inheritance to reuse standard Pega Platform rules and rules from other applications outside the business class hierarchy. You list directed inheritance on the class rule form. Because rules are aggregated based on whether they apply to all cases or cases of a certain type, directed inheritance promotes reuse based on functional suitability. For example, a rule may be limited to a specific implementation, such as an auto insurance application, or applied to all implementations, including applications for property and marine insurance.

Class rule with directed inheritance

Directed inheritance is the option that allows an application class to inherit rules defined for standard Pega classes, such as the Work- or Data- class.

For example, consider an organization named TGB that has an IT application with Ticket cases and an Accounting application with Purchase Request cases. Both the Ticket and Purchase Request case types use a property to record the name of the operator that creates the case. Through directed inheritance, both cases inherit the standard property .pxCreateOpName, which is defined in the Work-Cover class.

Diagram that represents directed inheritance

Check your knowledge with the following interaction.

Inheritance and rule reuse

Pega Platform first searches through the parent classes indicated by pattern inheritance when reusing rules through inheritance. If unsuccessful, Pega Platform then searches the parent class indicated by directed inheritance as the basis for another pattern inheritance search. This process repeats until the system reaches the last class in the class hierarchy, called the ultimate base class or @baseclass. If the system cannot find the rule after searching @baseclass, Pega Platform returns an error.

Consider the following example in which an auto insurance claim case references the data element that stores the case ID. The application containing the auto insurance claim is built on a generic policy administration application. That generic application is built on the Pega Platform.

In the following image, click the + icons to learn more about how Pega Platform searches for the case ID data element.

Check your knowledge with the following interaction.


If you are having problems with your training, please review the Pega Academy Support FAQs.

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 Academy has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice