Closed
DCR Specialization
What is the best way to define dynamic class referencing pattern to be extended to multiple implementation layers?
This content is closed to future replies and is no longer being maintained or updated.
Links may no longer function. If you have a similar request, please write a new post.
What is the best way to define dynamic class referencing pattern to be extended to multiple implementation layers?
DCR for a work pool starts at the lowest layer that the work pool is defined.
The same is true for Data classes, i.e., you start with the lowest layer that the Data class is concretely defined.
You would never define DCR using an abstract Applies-To class such as Org-Data.
A work pool class could be Org-Email-Work. A concrete Data class could be Org-Data-Vehicle.
Application extension for the Org-Email-Work work pool class would be implemented in a Data class such as Org-Email-Data-AppExtension.
In each higher layer in the application stack, you would override the DCR Data Page, e.g., D_Vehicle, using the base class as the Applies-To class, e.g., Org-Data-Vehicle.
Typically all that is needed to implement DCR is to evaluate pyDefault Data Transforms.
Note that each higher layer is free to directly inherit the base class.
While the DCR Data Page is loading, the Applies-To class can be changed, for example, to Org-WarrantyApp-Data-Vehicle.
Once the step page is changed to Org-WarrantyApp-Data-Vehicle, the pyDefault Data Transform in that class would be invoked.
Each pyDefault Data Transform would be configured to load the pyDefault Data Transform of its parent class,
DCR for a work pool starts at the lowest layer that the work pool is defined.
The same is true for Data classes, i.e., you start with the lowest layer that the Data class is concretely defined.
You would never define DCR using an abstract Applies-To class such as Org-Data.
A work pool class could be Org-Email-Work. A concrete Data class could be Org-Data-Vehicle.
Application extension for the Org-Email-Work work pool class would be implemented in a Data class such as Org-Email-Data-AppExtension.
In each higher layer in the application stack, you would override the DCR Data Page, e.g., D_Vehicle, using the base class as the Applies-To class, e.g., Org-Data-Vehicle.
Typically all that is needed to implement DCR is to evaluate pyDefault Data Transforms.
Note that each higher layer is free to directly inherit the base class.
While the DCR Data Page is loading, the Applies-To class can be changed, for example, to Org-WarrantyApp-Data-Vehicle.
Once the step page is changed to Org-WarrantyApp-Data-Vehicle, the pyDefault Data Transform in that class would be invoked.
Each pyDefault Data Transform would be configured to load the pyDefault Data Transform of its parent class,
Hence Org-WarrantyApp-Data-Vehicle pyDefault would evaluate Org-Data-Vehicle first THEN evaluate Org-WarrantyApp-Data-Vehicle pyDefault.
If higher layer is defined such as Org-USA-WarrantyApp-Data-Vehicle, this approach would continue to work perfectly fine.
Org-USA-WarrantyApp-Data-Vehicle pyDefault would evaluate Org-Data-Vehicle first THEN evaluate Org-WarrantyApp-Data-Vehicle pyDefault THEN evaluate Org-USA-WarrantyApp-Data-Vehicle pyDefault.
Suppose however the Warranty application is specialized for USA without using directly inheritance for case types? In other words, a USA ruleset is added to the application stack with the work pool class remaining the same, i.e., Org-WarrantyApp-Work.
Nothing says that Data classes cannot be specialized in a new layer using direct inheritance when case type classes are not specialized using direct inheritance. In other words, you could still define a new DCR Data class such as Org-WarrantyApp-Data-AppExtension-USA that extends Org--WarrantyApp-Data-AppExtension.
Question
Question
Question
Question
Question
Discussion
Discussion
Discussion
Question Solved
Question
Pega Collaboration Center has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.