Question
Areteans Technology Solutions
AU
Last activity: 30 May 2018 5:26 EDT
Report Definition querying on FW class table instead of Impl Class table
Report definition rule which belongs to a framework class and the "Report on Descendant class instances" being checked with "Include Implementation Class Only" selected, runs report on the table associated with the framework class instead of the table associated with the implementation class.
Am i missing something?
-
Likes (1)
Ali Ashroff -
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Areteans Technology Solutions
AU
Thanks Ravi, the engine API you suggested led to finding the root cause.
The Impl Application rule was having a framework ruleset in the stack which was causing the issue. After removing the framework ruleset from the Impl Application rule form, the RD is behaving as expected.
IN
I think when we say include implementation it means consider both FW and Impl , it doesnot mean only Impl and ignore FW.
Did u try writing this report directly in IMPL class instead of FW class.
Pegasystems Inc.
US
This functionality only works if there is one impl class, If there are multiple implementations of the framework this functionality will bring the results from fw class as it is not sure which implementation to use.
-
Ali Ashroff Ali Ashroff
Pegasystems Inc.
US
Use the below code to check all the descendants of a fw class.
try {
String[] strImplClasses = tools.getDatabase().getConcreteDescendantsInCurrentApplication("FW class");
if(strImplClasses ! = null) {
for(String tempClass:strImplClasses) {
oLog.infoForced("Implementation class::"+tempClass);
Use the below code to check all the descendants of a fw class.
try {
String[] strImplClasses = tools.getDatabase().getConcreteDescendantsInCurrentApplication("FW class");
if(strImplClasses ! = null) {
for(String tempClass:strImplClasses) {
oLog.infoForced("Implementation class::"+tempClass);
}
}
} catch(Exception ex){
ex.printStackTrace();
}
-
Mounica Dendukuri Ali Ashroff
EPAM Systems, Inc.
ES
Report on descendant class instances |
Select this check box to include data from one or more descendant classes of the Report Definition's primary class. If descendant classes are mapped to multiple class tables, the generated query will use UNIONs to include this data. You can select a specific subset of descendant classes to include or exclude by adding a filter condition on .pxObjClass. |
Report on descendant class instances |
Select this check box to include data from one or more descendant classes of the Report Definition's primary class. If descendant classes are mapped to multiple class tables, the generated query will use UNIONs to include this data. You can select a specific subset of descendant classes to include or exclude by adding a filter condition on .pxObjClass. When selected, the following options are displayed:
Note: Performance may be poor unless all relevant database columns are indexed in all included class tables. Caution! If descendant classes are in multiple class tables, the query may fail if the referenced properties are not optimized. |
-
Ali Ashroff
EPAM Systems, Inc.
ES
-
Ali Ashroff
Updated: 29 May 2018 8:04 EDT
Areteans Technology Solutions
AU
Thanks for the quick response, people.
To add up to the above post, the same set of code works perfectly fine in higher environments. It used to work fine until the past week. Although there was no major code change.
Also, the FW layer has only one implementation layer to it.
A-B-FW-Work -This is the class group
A-B-FW-Work-Req - This is the FW class on which the RD rule is written.
A-B-Work-Req - This is the Impl class which is also a class group and has dedicated work table.
I think this feature was introduced to avoid developers from writing more than one RD rule in all the implementation class. Which means creating RD rule copy in the implementation class is not the right fix.
Please correct me if i am wrong.
Pegasystems Inc.
US
Hi Ratan,
Did you try the code that I have given? It should confirm all the descendants of the framework class.
Your understanding is right regarding why the feature is given. But if there are more than one implementation classes, it is better overridden in the required layer.
-Ravi.
-
Mendus Chelapurath Reza Taupiq
Areteans Technology Solutions
AU
Hey Ravi,
Thanks for the quick response.
I ran the java code in both Dev(This is where am facing the issue) and QA(This is where the code set up seems to work fine).
In dev, the java code resulted in null.
In QA, the java code was able to give me the implementation class name.
Also, i am noticing a similar behavior where none of the report definitions that are running on the FW-Work layer are querying the impl class relative table. This is happening only in the Dev environment and not in QA. Could this be a cache issue?
Accepted Solution
Areteans Technology Solutions
AU
Thanks Ravi, the engine API you suggested led to finding the root cause.
The Impl Application rule was having a framework ruleset in the stack which was causing the issue. After removing the framework ruleset from the Impl Application rule form, the RD is behaving as expected.
-
Mounica Dendukuri