Posted: 21 Jan 2019 10:28 EST Last activity: 23 Jan 2019 20:01 EST
How to reuse rules through inheritance
Is it a mistake in the description below?:
1) Here it is the definition: Pattern inheritance describes the business relationship between classes. Pattern inheritance allows your application to share rules with other applications throughout an organization. The following image demonstrates a basic pattern inheritance hierarchy. - it clearly states that Pattern Inheritance allows sharing rules with other applications.
2) But the knowledge check on the same page below states completely different:
How does directed inheritance differ from pattern inheritance?
Pattern inheritance allows you to reuse rules within a single application. Directed inheritance allows you to reuse rules in other applications, including standard rules provided as part of the Pega platform.
So what is correct? Can pattern inheritance be used to share rules between apps or not?
That would be a typo. Instead of "application", the knowledge check should use the word "layer". The correct explanation would be: Pattern inheritance allows you to reuse rules within a single layer. Directed inheritance allows you to reuse rules in other layers, including standard rules provided as part of the Pega platform.
Suppose you define Org-Data-Vehicle, labeled "Vehicle", at the Enterprise layer. Within that Enterprise layer you can also define a "Car" Data type that is based on "Vehicle". The generated class will be Org-Data-Vehicle-Car. That class would directly extend Org-Data-Vehicle. Note that pattern inheritance takes precedence and occurs within the same layer.
Now suppose you define Org-App-Data-Vehicle within the Application layer, that layer built on the Enterprise layer. The Org-App-Data-Vehicle class would directly extend Org-Data-Vehicle. Within that Application layer you could also define Org-App-Data-Vehicle-Car.
Direct inheritance is used to bridge two layers. Pattern inheritance is used within a layer.
The New Application Wizard uses direct inheritance when it bridges a new case type within the new application's layer to a case type of the same name defined in a built-on Application's layer.