0% found this document useful (0 votes)
0 views

Class Structure

The document outlines the class structure and inheritance in Pega, emphasizing its hierarchical organization that enhances reusability and scalability. It describes various class types, including Work, Data, Integration, and Rule classes, and explains the significance of Division and Unit layers for modularity and maintainability. Additionally, it details the concepts of directed and pattern inheritance, highlighting their roles in rule reuse and application organization.

Uploaded by

purushotham
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views

Class Structure

The document outlines the class structure and inheritance in Pega, emphasizing its hierarchical organization that enhances reusability and scalability. It describes various class types, including Work, Data, Integration, and Rule classes, and explains the significance of Division and Unit layers for modularity and maintainability. Additionally, it details the concepts of directed and pattern inheritance, highlighting their roles in rule reuse and application organization.

Uploaded by

purushotham
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Class Structure & Inheritance

In Pega, the class structure is a fundamental aspect of application design, as it defines how data
and rules are organized within the system. The class structure in Pega is hierarchical and is built
using inheritance, allowing for reusability and scalability.

Class is like a blueprint that defines how different parts of an application should work and what
data they should manage. It organizes related rules and data, making it easier to build and
maintain the application.
OR
a Class is a way to organize and define how certain parts of your application work and what data
they should handle. It helps in structuring the application, making it easier to manage and reuse
components.
1.Abstract Class
2.Concrete Class
Class Types:
 Work Class:
o Represents the core business process or case.
o All work items or cases are instances of work classes.
o Example: MyApp-Work-Order, where Order is a case type.
 Data Class:
o Used to define reusable data objects or entities.
o Typically stores information that supports work classes but doesn’t represent a
case itself.
o Example: MyApp-Data-Customer, where Customer holds customer-related data.
 Integration Class:
o Manages interactions with external systems.
o Usually corresponds to data models used for integrations like SOAP, REST
services.
o Example: MyApp-Int-ERP, where ERP is the external system.
 Rule Class:
o Defines the rules and logic for processing data and managing cases.
o Examples include rule types like activities, decision tables, and when rules.

Importance of Class:
Any Pega Rules we create & execute/Compile can be done only under a class. only under
classes we can create rules & execute the rules.

PEGA Contains diff classes:


1. Predefined – Reusable rules are configured under built classes
2. User defined – New rules we add
Predefined Classes: 14
@baseclass (Super Class)
Work-, Data-, Int-, Code-, Index-, Rule-, CMIS-, Embed-,History-, Assign-, Log-, System,-,

PEGA All Predefined Classes are Abstract Classes.


Class Structure & Inheritance

User Defined Classes: Organization Names, Application Name/Division, Unit Name ( Work,
Data, Int) it will generate user-defined Classes
Class Structure & Inheritance

In Pega, the Division (Div) Layer and Unit Layer are part of the organizational class structure
that appears in the Implementation application class structure. These layers help in organizing
and managing rules, data, and processes within different parts of a large organization.
The Division (Div) and Unit layers are not typically present in the Framework application class
structure because the framework layer is designed to be a reusable and generic foundation that
can be applied across multiple implementations, divisions, and units.

1. Division Layer (Div Layer):


 Purpose:
o The Division layer is used to organize rules and classes that are specific to a
particular division within an organization. A division is typically a large business
area within a company that might have its own specific processes, data, and rules.
Unit Layer:
 Purpose:
o The Unit layer is even more granular and is used to define rules and classes that
are specific to a particular unit within a division. A unit could be a smaller group,
department, or team within a division that has its own specific needs.

Benefits of Div and Unit Layers:


 Modularity: Rules can be tailored to the needs of specific divisions and units without
impacting other parts of the organization.
 Reusability: Common rules can be defined at higher layers (e.g., Enterprise layer) and
reused across divisions and units.
Class Structure & Inheritance

 Scalability: As the organization grows, new divisions or units can be added easily, with
their specific rules organized in their respective layers.
 Maintainability: Changes can be made at the division or unit level without affecting the
entire organization, making maintenance easier and less risky.

Inheritance:
Inheritance in Pega refers to the ability of one rule to use or extend the functionality of another
rule. Pega uses inheritance to promote reuse, simplify development, and manage changes across
applications. There are two main types of inheritance in Pega
1.Pattern
2.direct
Directed Inheritance:
Directed inheritance refers to explicitly specifying a parent class from which a rule or class can
inherit. This type of inheritance allows you to reuse rules defined in other classes by directly
inheriting them.
 Example: If Class A is specified as the directed parent of Class B, then Class B can use
the rules defined in Class A.
Pattern Inheritance
Pattern inheritance follows the hierarchical structure of class names, where classes inherit rules
from their immediate parent classes based on the naming pattern.
 Example: If you have a class named MyCo-LoanApp-Work-AutoLoan, Pega will look
for rules in the following order:
o MyCo-LoanApp-Work-AutoLoan
o MyCo-LoanApp-Work
o MyCo-LoanApp
o MyCo
o @baseclass (a built-in Pega class that all classes ultimately inherit from)
Class Structure & Inheritance

 If you have a rule in MyCo-Finance-Loan and another rule in MyCo-Finance, and


you try to use the rule from MyCo-Finance-Loan-Auto, Pega will first look in
MyCo-Finance-Loan. If it finds the rule there, it will use it. If not, it will continue
up the pattern inheritance path to MyCo-Finance, and so on.

If the rule is not found in the pattern inheritance path, Pega then checks the
directed inheritance path, which could be a completely different class structure
specified by the developer.
Key Points About Inheritance in Pega:
 Reuse: Inheritance allows for the reuse of rules across different classes, reducing
redundancy and improving maintainability.
 Flexibility: By combining pattern and directed inheritance, Pega provides flexibility in
how rules are shared and overridden across an application.
Class Structure & Inheritance

 Organization: Inheritance helps in organizing rules in a hierarchical manner, making it


easier to manage complex applications.

You might also like