Thursday, September 22, 2011

Pattern Inheritance in Pega


Pattern inheritance follows the pattern of the names & dashes in the class name to define inheritance. For example, the class YourCo-CustService-Data-Lender might have the following ancestors in the class hierarchy:
YourCo-CustService-Data –
YourCo-CustService-Data
YourCo-CustService-
YourCo-CustService
YourCo-
YourCo
If pattern inheritance is being followed, then all Activities, Whens, Models, etc. that are defined on any of the above classes would be available to be applied to YourCo-CustService-Data-Lender (unless there is another more specific version of the instance defined on the YourCo-CustService-Data-Lender class itself).
Pattern inheritance is always checked first. Note that pattern inheritance will cause the system to search all the way through the class pattern hierarchy before checking directed inheritance.

Pega Concepts: Inheritance



PegaRULES models data by defining it in a class hierarchy, following an object-oriented paradigm (much like Java). As Java methods can be inherited from the Java class’s parents, Rules in PegaRULES such as Activities can be inherited from the defined class hierarchy. Thus, an instance of the class Work-Cover-GeneralTask will not only be able to use the activities, properties, etc. which are defined on that class, but also those defined on the class Work-Cover-, and the class Work-.


When a particular activity (or property or other such rule) is called during processing, the application will search for that rule in the class where it was called. If the rule is not present in that class, Process Commander will search other classes, based on specific procedures. This section describes the paradigm used to search the class hierarchy during rule resolution.


In PegaRULES, each class that is defined in the system may have one or two parents, depending upon the type of inheritance specified:
• pattern inheritance
• directed inheritance

PEGA Concepts: Class Inheritance and Rule Resolution


The Use class-based inheritance to arrive at the correct rule to execute checkbox defines how inheritance (through the class hierarchy) affects this rule. For this functionality, there are two main types of rules:

• those that can be defined as attributes or aspects of other classes
• those that are not aspects of other classes, but stand alone


There are some types of rules, like Activities, Models, Whens, Decision Tables, etc., which may be “applied to” or “defined on” other classes.