What is a Class in PEGA | PRPC ?
Class contains the rule by which objects behave. Define rules such as properties, activities, flows, HTML forms, etc. available to other subordinate classes. Classes are organized into a hierarchy in which lower classes inherit from upper classes. A class is an instance of a rule-obj-class rule.
Types Of Classes
-An abstract class is a rule (an instance of the Rule-Obj-Class class) created to support the definition of rules in PRPC. Such rules can be inherited by subclasses of the abstract class.
-Any abstract class name in Pega training PRPC usually ends with the symbol ‘-‘, For example, Data-.Work- are abstract classes in PRPC. MyClass-
-Whenever we create a first abstract class it’s parent class should be @baseclass. For second abstract class, the parent class will be the first abstract class and so on.
-Abstract classes cannot be instantiated.
-A Class that is not abstract is a concrete class. Concrete classes DO NOT end with a ‘-‘. MyClass
-Whenever we create a first concrete class its parent class should be ‘Work-‘. For second concrete class the parent class will be it’s class group.
There are two types of inheritance:-
–Pattern inheritance — It is an optional feature we can set up for a class in the Rule-Obj-Class rule, affects the first steps in the rule resolution algorithm. This approach is sometimes called “dual” inheritance.
During rule resolution, pattern inheritance causes a class to inherit rules first from classes that match a prefix of the class name.
–Directed inheritance — Allows us to name a parent class, choosing a name that’s not related to the name of this class