Classes and class hierarchy
Pega Platform™ facilitates Rule reuse between Case Types and applications. Developers often reuse Rules, from single data elements to entire Processes, in applications. Rule reuse improves application quality and reduces development time.
Classes
Within an application, Pega Platform groups Rules into classes according to their capacity for reuse. Each grouping is a class. Each application consists of three class types:
- The Work class contains the Rules that describe how to process Cases, such as Processes, data elements, and user interfaces.
- The Integration class contains the Rules that describe how the application interacts with other systems, such as the integration assets that connect the application to an external customer database or a third-party web server.
- The Data class contains the Rules that describe the data types in the application, such as a customer data type or an order items data type.
Check your knowledge with the following interaction:
Parent and child classes
A class can also contain other classes. A class that contains another class is a parent class, while a class that is contained by another class is a child class. A child class can reuse or inherit any of the Rules that are defined for its parent class.
Match the numbers to the following image to learn more about the parent and child classes:
1. Parent class: A class that contains another class is a parent class.
2. Child class: A class that is contained by another class is a child class. Class inheritance ensures that a child class can use all of the Rules that are defined for the parent class.
3. Work class: The Work class contains a child class for each Case Type in your application. Each Case Type child class contains all of the Rules that are unique to a Case Type. For example, the Work class contains the IT Ticket Case Type and the Laptop Request Case Type.
4. Parent Case Type: The IT Ticket Case Type class is the parent class of the Laptop Request Case Type class. For example, the IT Ticket Case Type class contains an approval process for IT tickets, a standard ticket information form, and properties that are related to IT tickets.
5. Child Case Type: The Laptop Request Case Type class is a child class of the IT Ticket Case Type class. The Laptop Request is treated as a specialized version of a generic IT ticket. For example, the Laptop Request Case Type class contains a Process for laptop configuration, a unique form for laptop configuration, and laptop information, which is supplemented by the items that are inherited from the parent class.
6. Data class: The Data class contains the Rules of each data type that is used in your application. For example, the Data class contains the Employee data type.
7. Int class: The Int class contains the Integration Rules such as SOAP and REST connectors for accessing data from external data sources.
Class hierarchy
Classes are layered into a multi-level class hierarchy to organize application assets. Classes are organized from most-specific to least-specific in the class hierarchy. The class hierarchy determines how developers can reuse Rules within the application. The application can use any Rule that is available to an application through the class hierarchy. The application cannot use Rules that an application cannot access through the class hierarchy.
When attempting to identify the Rule to use at run time, Pega Platform starts with the most-specific class and expands the search to more general classes.
The name of each class identifies the position of the class within the class hierarchy. Consider the TGB-IT-Work class. A hyphen separates each level of the class hierarchy (-), which means that TGB-IT-Work is a child of the TGB-IT class, which is a child of the TGB class.
Match the numbers to the following image to learn more about the groups of classes in the class hierarchy:
1.
2. Work classes: Work classes contain all Case Types in an application. In a Pega Platform application, all Case Types are associated with a work class. While integration and data classes can occur at any level of the class hierarchy, work classes are generally the most specific of the three classes.
3. Application classes: The Application Layer contains the required work, integration, and data classes for a single application, and provides the ability to share common Rules among these classes.
4.
5. Organization classes: The organization layer contains all the classes for applications across an entire business or organization. The organization layer often contains data and integration classes that you can apply across the entire organization.
6. Other application classes: Classes from other applications, such as industry-specific Pega Platform applications, are contained in what is sometimes referred to as the framework layer. For example, you use a generic application for ticket management administration as a baseline for customizing versions of different IT ticket types. Using other applications is optional and determined for each implementation by a more experienced developer.
7. Base classes: Pega Platform provides base classes with Rules that provide basic functionality for Case processing. For example, you can access a base class with data elements that record who created a Case and the time that is needed to complete an Assignment.
Check your knowledge with the following interaction:
This Topic is available in the following Modules:
Want to help us improve this content?