Consider an application has framework and implementation layer.
Framework layer has a declare expression defined on a property in a work class. How will this declare expression ever run from implementation layer?
As per PRPC's Change Tracking, there are 3 options:
1. Only when the top-level page is of the Applies to class - this wouldn't work as implementation layer class is different.
2. When the top-level page is of the Applies To class, or one of the following - this wouldn't work as framework layer doesn't have knowledge of implementation layer and we shouldn't put any implementation relation information.
3. Regardless of any pages it is embedded in - this seems to be the only option which would work. However, this option is not recommended by Pega.
So, how do define an expression at framework layer and use it at implementations layer? What is the common approach/design pattern?
For Declare Expresssions Change Tracking, you can select either of the options "Only When the top-level page is of the applies to class" and "When the top-level page is of the applies to class or one of this class" and use Framework layer class(Org-FW-FWName-Work-WorkType1), at run time this declare expression would trigger from Implementation Class(Org-DIV-Work-WorkType1).
For example, take the declare expression, pxUrgencyWork defined in Work- class with Change Tracking option selected as "Only When the top-level page is of the applies to class" , this declare expression fires for each assignments irrespective of the implementation.