Skip to main content
Prüfen Sie die Version, um sicherzustellen, dass Sie mit dem richtigen Inhalt arbeiten, oder schließen Sie die neueste Version ab.

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.

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. You apply directed inheritance to reuse standard Pega Platform rules and rules from other applications outside the business class hierarchy. Unlike the automatic use of pattern inheritance, directed inheritance is explicit. You list directed inheritance on the class rule form.

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. A TGB application has IT Ticket cases and Accounting Purchase Request cases that use the name of the operator that creates the case (.pxCreateOpName). The way for these cases to use .pxCreateOpName, which is a standard property defined in Work-Cover, is through directed inheritance.

Diagram that represents directed inheritance

Check your knowledge with the following interaction.

Inheritance and rule reuse

When attempting to reuse rules through inheritance, Pega Platform first searches through the parent classes indicated by pattern inheritance. If unsuccessful, Pega then searches the parent class indicated by directed inheritance as the basis for another pattern inheritance search. This process repeats until Pega reaches the last class in the class hierarchy, called the ultimate base class or @baseclass. If the rule cannot be found after searching @baseclass, Pega 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 searches for the case ID data element.

Check your knowledge with the following interactions.

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

Fanden Sie diesen Inhalt hilfreich?

Möchten Sie uns dabei helfen, diesen Inhalt zu verbessern?

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