Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Report on descendant class instances returns framework instances

SA-3308

Summary



Developers created a report definition in a framework layer and have enabled the switch "Report on descendant class instances" in the 'Data Access' tab. Upon running the report definition from the implementation context, Developers found that only Framework level records listed. The desired behavior is that it returns records from implementation layer.

Error Messages



No error message. Observed undesired behavior that the report definition returned instances from framework layer instead of implementation layer.


Steps to Reproduce



1) Create an application that is framework only layer.
2) Create a report definition in this application. Enable the "Report on descendant class instances".
3) Create few work objects in this layer
4) Create another application that is framework and implementation layer, extending from the one created at step 1.
5) Create few work objects from the implementation layer
6) In application explorer, browse to the framework layer class group created in step 1. Find the report definition, open it.
7) Run the report definition.


Root Cause



The root cause of this problem is there were 2 implementation classes extending from the same framework class.

There is an API available getConcreteDescendantsInCurrentApplication(String className) which returns the list of implementation classes for a given FW class.
We can write an activity which includes a Java step and invoked this as below:
 
try {
    String[] strImplClasses = tools.getDatabase().getConcreteDescendantsInCurrentApplication("IPA-Designs-Work");
    if(strImplClasses ! = null) {
           for(String tempClass:strImplClasses) {
                oLog.infoForced("Implementation class::"+tempClass);
           }
     }    
} catch(Exception ex){
    ex.printStackTrace();
}



Resolution



This issue is resolved by providing the following explanation:
If you have multiple implementation layers and they reside in rulesets that you have access to, the report will default back to the framework level. (Ref: https://pdn.pega.com/reporting/how-to-implement-dynamic-class-reporting)

Upon changing the application design to set the 2nd implementation class to extend from a different class, the report definition returns implementation level instances as expected.

Published January 31, 2016 - Updated October 8, 2020

Was this useful?

100% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community 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.

Close Deprecation Notice
Contact us