Define the Class hierarchy structure

What is the class hierarchy structure?


When you start building a house, the most important thing is to have a good foundation; the same happens with the pega application. We designed the class structure based on the business; for example, a banking company has many divisions, such as personal loans, credits, onboarding. etc. If we build everything under the same class structure, it will be impossible to maintain. This is where class hierarchy comes to save the day, because instead of having all your assets under one layer, you can distribute them within the class structure and take advantage of rule reusability.

Pega Platform™ enables you to organize your application by using the same dimensions as your business. Pega Platform makes reusing common policies and procedures easy while allowing for differences between products, regions, channels, and customer segments.

In the following diagram, I explain the Class hierarchy structure and you will find some examples of rules and assets that each class can have, as well the definition of each class.

1. Pega Platform Layer: The Pega Platform Layer contains the built-in assets that are necessary for processing Cases and other work in Pega Platform applications. This Layer also includes the assets that Pega Platform uses.

2. Organization Layer: The Organization Layer contains the assets that are used on an enterprise-wide basis. For example, access to an external customer database is an integration point that you can add to the Organization Layer.

3. Division Layer: The Division Layer is optional and contains assets used on a division-wide basis. Assets in the Division Layer may apply to a line of business, region, or brand. For example, you save a Service-Level Agreement (SLA) Rule that defines the expected response time to a customer complaint in the Division Layer to enable all applications within that division to use that SLA Rule. 

4. Unit Layer: If you enable the Division Layer, you can optionally enable the Unit Layer, which contains assets that are used on a unit-wide basis.

5. Implementation Layer: The Implementation Layer contains one or more applications customized for a specific division or line of business. For example, a clothing retailer consists of two brands of stores. Each brand can create its own Implementation Layer for brand-specific assets, such as styling and policies.

Class inheritance

Classes in pega are used to organize rules, so when in comes enterprise class structure you have to think about each class as a layer that contains assets for your organization, each layer has rules that can be reused trough inheritance

Types of class inheritance

Pattern inheritance: this type of inheritance is like a family tree, you got one parent class and then it started to get child classes, each child class is defined after the parent class with a hyphen, for example we have the parent class MyOrg-KnowYour-Work, then we create a child case class -GlobalKYCCustomer,

GlobalKYCCustomer can access assets form

Work

KnowYour

MyOrg

@baseclass

so basically if you need to create a rule that will be reuse trough your organization, you can create it at the level of KnowYour on that way you can ensure rule reuse and can be accessed at any child level or integration level

Direct inheritance: this is way different than pattern inheritance, with direct inheritance you create a class and then you define the parent class in the class inheritance tab. It lets an application reuse standard Pega Platform rules (such as Work- or Data- classes) or rules from built-on framework applications. 

there is a way to check the inheritance of a class, you can goo to the app app explorer, locate the target class, right click on the class and there is an option that say Inheritance

Then a windows will pop up and you can check the pattern and the direct inheritance that the class may have

Questionnaire

  1. An application uses three Layers in its Class hierarchy structure. Drag the Layer name on the left to its correct description on the right.?
  2. You have a requirement to create an email Correspondence that built-on applications can reuse. In which two Layers of the Class hierarchy structure could you apply the email Correspondence Rule? (Choose Two)
    1. Division
    2. Pega Platform™
    3. implementation
    4. organization

Answer : 1. Division and 4. Organization

3. What is the purpose of the Class hierarchy structure?

Answer: It provides a structure that supports Rule reuse.

Discover more from Pega Sandbox

Subscribe now to keep reading and get access to the full archive.

Continue reading