I see that there is a sever warning (Performance) getting added on report definition rules in Pega 8 when there is a filter which uses a dynamic value, either paramter or data page reference, and asking to select “Use null if empty” option.
Warning:
Some of your filters are using a Page Reference with the “Use null if empty” option NOT selected. Please ensure that you do pass the Page Reference. Otherwise, the filter will be dropped entirely and execution of the report will result in very poor performance. If you do not want this behavior, select the “Use null if empty” option.
In many places we used the same report definition rule with different parameters to work differently to make the report definition more reusable.
For ex: if I have to show the user list of cases matching the criteria in a screen with the filters as Case ID and CustomerID. User will either enter customer id or case id or both and searches for cases.
For this we used to have a single data page with two parameters and the same will be passed to a single report definition rule.
But with this new warning introduced in Pega, we are forced to create multiple versions of the same rule with different parameters and configure multiple conditions in data page to refer these RDs to make sure the guardrail score is not impacted.
For me it looks like a limitation on reusability perspective but not sure why Pega added this warning.
Dropping the filter criteria when the dynamic value is there from long time. not sure what is changed around this in engine code with Pega 8.
Can anyone please share some details on how this is impacting the performance.
@ShivakumarS The guardrail warning appears to have been introduced to indicate that because you could potentially have an empty value reference because of which the filter could be removed/ignored, you could potentially have more results than you expected when compared to a ‘null’ value filter in the DB query. Though the functionality was pre-existing the guard rail warnings were added to indicate end-users that there could be a potential problem.
Guardrail warnings alert you to reports that could have performance issues. Instruct your teams to address warnings before moving your application from development to target environments.
Move your Query tab.
In the Edit filters section, next to the specific filter condition, click the Options icon(right corner).
In the Edit filter options modal dialog box,
Tick the "Use null if empty " checkbox. and Submit.
I understand that there could be potential work behind the scene to remove the filter when the RHS value is empty. which Pega has to do in back end and is being the same from the introduction of the RD rules. But this warning I am seeing it first time in Pega 8. and the severe warning is forcing us to maintain different versions of the same rule which defeats the purpose of reuse.
Here we are either has to compromise on guardrail or reuse. both are not encouraged.
I am trying to understand if there is any additional changes done in Pega around this functionality and to know the best practice to follow to avoid the warning.
i just got below info from one support article.Kindly check this once if it works for you
when Report Definition rule uses parameters as a value for filter criteria, a moderate performance warning was generated: ‘‘Some of your filters are using a parameter with the “Use null if empty” option NOT selected. Please ensure that you do pass the parameter. Otherwise, the filter will be dropped entirely and execution of the report will result in very poor performance. If you do not want this behavior, select the “Use null if empty” option.’’ When the “Use null if empty” checkbox was selected as suggested, the “Select values” button gave an empty list of possible values. This was traced to refactoring work done on Select Values which changed it to be backed by a Report Definition and Grid instead of a List View: the option was intended to be only temporarily disabled, but was missed. To correct this, the activity pzGetSelectValues has been updated to honor the checkbox and appropriately disable the “Use null if empty” option on the selected filter on the temporary copy of the report definition before it is executed.
Some of your filters are using a Page Reference with the “Use null if empty” option NOT selected. Please ensure that you do pass the Page Reference. Otherwise, the filter will be dropped entirely and execution of the report will result in very poor performance. If you do not want this behavior, select the “Use null if empty” option.
please let me know is there any updates/solutions to overcome this guardrail warnings instead of creating mutiple RDS.
@ShivakumarS the warnings exist for a reason - to avoid performance problems. As you found on the Academy pages, “Guardrail warnings alert you to reports that could have performance issues. Instruct your teams to address warnings before moving your application from development to target environments.”