0% found this document useful (0 votes)
36 views6 pages

Understanding Pega 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
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views6 pages

Understanding Pega 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
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

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.
[Link] Class
[Link] 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
[Link]
[Link]
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.

Common questions

Powered by AI

Class inheritance promotes scalability in Pega applications by enabling the reuse of rules across different classes, which minimizes redundancy and facilitates the management of larger, complex systems. As new divisions or units are added, their specific rules can be organized under new classes without altering existing ones. This approach allows applications to grow in complexity without increasing maintenance challenges proportionally .

The Division and Unit layers contribute to modularity in a Pega application by allowing rules to be tailored to the specific needs of individual divisions and units without impacting other parts of the organization. This modularity ensures that rules specific to a division or unit do not interfere with others, facilitating easier organization management. Additionally, these layers enhance maintainability by localizing changes to specific divisions or units. This localization reduces the risk of widespread disruption across the application when changes are necessary, making maintenance easier and more manageable .

Pega's class structure supports application maintainability by offering an organized way to define and modify rules and data. This structure allows changes to be made at specific layers, such as Division or Unit, without affecting the entire application. It also enables rules to be inherited and reused, minimizing code duplication and easing the update process across multiple application instances. These features make maintaining and evolving applications more manageable and less risky .

Hierarchical class organization in Pega offers advantages such as improved manageability, reusability, and scalability. By structuring classes hierarchically, Pega allows for the creation of a logical flow where rules and data are organized in layers. This structure supports the intuitive organization of complex applications, enabling developers to reuse components efficiently and scale applications by adding new classes without significantly impacting existing structures .

The rule class plays a crucial role in processing data and managing cases in Pega by defining the rules and logic that dictate how data is handled and how business processes are managed. Rule classes encompass various rule types, like decision tables and activities, which collectively govern the behavior of applications, ensuring data is processed and cases are managed according to business requirements .

The concept of 'Work Class' is essential in a Pega application framework because it represents the core business process or case management structure, where each work item or case is an instance of a work class. It serves as the foundation for organizing cases, allowing the application to define, manage, and process the essential business operations efficiently and consistently .

Pega leverages the integration class structure to facilitate interactions with external systems by using specific integration classes that map to the data models used in these external systems, such as SOAP or REST services. This approach allows Pega applications to seamlessly exchange data with other systems, promoting interoperability and extending application functionality beyond organizational boundaries .

Abstract and concrete classes enhance application design in Pega by enabling the separation of generic functionalities from application-specific implementations. Abstract classes, being non-instantiable, provide a framework for defining reusable functionalities that can be inherited by concrete classes. Concrete classes then implement specific functionalities, allowing for the customizations necessary for different business needs while maintaining a base of shared, reusable logic .

The main distinction between pattern and directed inheritance in Pega lies in their approach to rule and class inheritance. Pattern inheritance allows classes to inherit rules following a hierarchical structure based on class naming conventions. It checks rules in the immediate parent class and moves up the hierarchy if necessary . Directed inheritance, however, involves explicitly specifying a parent class that a class or rule should inherit from, allowing direct reuse of rules between unrelated classes .

Using predefined classes in the Pega framework offers several benefits, such as reusability, consistency, and ease of application development. Predefined classes, like Work-, Data-, and Int-, provide a set of reusable rules and templates that developers can leverage to build applications faster and more reliably. This reuse results in consistent implementations across different applications, lowering the risk of errors and reducing development time .

You might also like