Class Structures and Heirarchy
Class Structures and Heirarchy
Reusability in software is the ability to take a module or component from one system and apply it to
another system. Reusuable components abide by the DRY (Don't repeat yourself) principle and ensure
applications are efficiently built saving time and effort in development and testing. Reusability can be
classified into the types: application (reusable components within an application that can be implemented
across business units) and enterprise (reusable components that can span multiple applications).
Pega promotes application design which employs a framework layer as the foundation of an application
with an implementation layer built on top. The framework layer provides common functionality which can
be reused across multiple applications and is extended by a concrete implementation layer which involves
application specific features. This methodology is adopted because it promotes reusability and is a
structured means of designing scalable, robust applications.
In detail, the best practice for PRPC class structure design involves implementing a class design which
consists of four layers:
1. PRPC shared product: the Pega layer which contains all Pega OOTB rules and functionality
2. Enterprise shared product layer: extensions to the Pega OOTB functionality which is used across
applications
3. Generalised application layer: a generic base application employed as a framework for the actual
application
4. Organisational and specialised application layer: the actual application
Reusability decreases as rules are saved to lower layers.
The general rule of thumb is to have enough layers to clearly group levels of reuse without introducing
unnecessary levels of complexity.
The key building blocks making up an organisational structure in Pega consists of organisations, divisions
and business units. These building blocks provide a basis of describing the access model of application
users and need not map directly to the HR organisational chart.
An efficient method of designing an organisation structure in Pega involves dividing users into functional
groups based on what the user does.
Access groups is Pega terminology for grouping users to various applications with various levels of
access. An access group can be associated to an organisation, division, business unit or individual with
each level of specialisation overriding the broader group.
For example, a Larry is a manager at ABank in the Finance division, working in the Accounts business
unit. ABank has the access group ABank:WorkUsergiving all ABank employees access to the bank's
portal. Finance employees also have the access group TradeMore:WorkUser and the Accounts business
unit has the access group DebCredit:WorkUser. Since Larry is a manager he is also part of the access
group DebCredit:WorkManager.
Thus, Larry is part of the following access groups
overall: ABank:WorkUser,TradeMore:WorkUser and DebCredit:WorkManager.
Note: the Accounts access group DebCredit:WorkUser was overridden by Larry's specific DebCredit
access group DebCredit:WorkManager.
The Pega rule hierarchy begins at the top class @baseclass which is extended by several base classes:
Units of Work
All work classes inherit from the base class Work-. There are three main subclasses of Work-:
Work-Object-
Work-Cover-
Work-Folder-
All work classes contain a unique ID pyID which is usually in the form - e.g. AA-10. The pyID prefix is
defined in the pyDefault model of the work class with the property .pyWorkIDPrefix.