Support Article
Declare Index source properties referencing parent do not work
SA-16055
Summary
After upgrading from PRPC 5.5 to Pega 7.1.7, declare Index rules do not work when using "parent" references for properties defined against the parent page.
The properties reference the current page rather than the parent page continues firing correctly.
Error Messages
Not Applicable
Steps to Reproduce
Create a declare index with source property parent.yourProperty format.Root Cause
An issue in the custom application code. Top and Parent references in a Rule-Declare-Index are not always reliable. This has to do with the way change tracking works with Rule-Declare-Index. Change tracking works only with properties which are defined within the page context path. It does not work for properties outside this path. This would include "Parent" references, "Top" references, and references to other named pages. An instance which is referred to with "parent" or "top" cannot guarantee that the indexes for that instance will be within the page context path. If they are not, the index does not update.
Resolution
The following are different resolution options:
- Use Top and Parent references in a Rule-Declare-Index to avoid, unless the properties they refer to are constant throughout the lifetime of an instance.
- When reporting on the indexes, perform a join against the original instance class, where the Top or Parent property already live.
- A less ideal alternative is to use a Rule-Declare-Expressions to maintain a copy of the Top or Parent property in a new property which is in the page context path.
Published January 31, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.