Class hierarchy and inheritance — Concepts and terms |
PRPC's class hierarchy is a hierarchy for storing rules and data, not for Java variables or Java methods. Each class, whether abstract or concrete, can contain properties, activities, data transforms, and many other rules. Only objects in concrete classes can be saved as persistent or enduring instances in the PegaRULES database.
At the top of the hierarchy is the ultimate base class, identified by the keywordA word that, in certain circumstances, has a specific meaning to PRPC. Keywords are sometimes called "reserved words." @baseclass. Its immediate child classes are known as the base classes. Concrete classes under two of these base classes, Rule- and Data-, hold rules and data instances that application developers create and update to build their application.
Instances of concrete classes derived from the Assign- base class and the Work- base class (and perhaps a few others) hold the dynamic transaction data and status details as your PRPC application operates.
When any object is held in memory, it has an XML (eXtensible Markup Language) format visible on your clipboard as pages and property name-value pairs. When stored into the PegaRULES database, the persistent object instance becomes a row in a SQL-based relational database table. Three data classes, accessed through the Database, Database Table and Class Group forms, together determine how PRPC saves and retrieves the XML data as relational database rows.
You application may need custom classes derived from these base classes:
Careful planning and analysis are important before creating the new classes, to understand their interrelationships and plan their positions in the standard class hierarchy. Maximizing reuse of standard classes, standard properties, and other standard rules is a proven tactic for fast development at minimum effort.
A database administrator can help design and plan Database Tables and class groups, as these decisions can influence database performance and backup needs.
Many rules apply to a specific class, and potentially to subclasses of that class. Rule resolution is PRPC's search and lookup algorithm that uses inheritance to search through parent classes in a defined sequence for a rule. For example, if a property named CreditLimit is needed at runtime in the context of a class named Delta- CustomerCard, the system may search for a property with this name in several classes:
The search ends when a rule is found. Settings in the class rule (Rule-Obj-Class rule type) define whether and how two mechanisms — directed inheritance and pattern inheritance — are employed during this search.
Atlas — Standard classes |