Question
cognizant
IN
Last activity: 27 Oct 2015 21:49 EDT
we are using a Declare index and when the property is changing declare index is not firing
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Pegasystems Inc.
JP
See prhelp article below.
https://community.pega.com/sites/default/files/help_v719/procomhelpmain.htm
It is possible to use page name keywords "top" and "parent" in property references ("parent.property" would refer to a property on the page one level up from the class identified in the Source Class Context field; "top.property" would refer to a property on the primary or top-level page of the Applies Toclass); however, these references are not reliable.
Change tracking only works with properties that are defined within the page context path. references to "top", "parent", or another named page are not within that path. If you have an instance, and you change a property which is referred to by a "parent" or "top" reference, you cannot be sure that the indexes for that instance will be updated.
Avoid using "top" or "parent" references unless the properties they refer to are constant throughout the lifetime of an instance.
cognizant
IN
Hi Chunzhi Hong,
Thanks for your reply, Actually we are using same Declare Index in different class for different purpose, and in that Declare Index( Pages & Classes) a page name With TOP is declared. But the one Declare index i posted doesn't have any Pages & Clases, If i give TOP page in Pages and Clasess will it be helpful.
Please advice !!
cognizant
IN
Updated: 9 Nov 2015 6:11 EST
Please follow the below mesh post.
Parent and Top references in Rule-Declare-Index are not always reliable --> Invalid document link.
See Document content below:
Top and Parent references in a Rule-Declare-Index are not always reliable.
This has to do with the way that 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--and this would include "Parent" references, "Top" references, and references to other named pages.
This means that if you have an instance, and you change a property which is referred to by a Parent or Top reference, then you cannot be guaranteed that the indexes for that instance will be updated. They might be updated--and they'll certainly always be updated if any properties within the page context path change--but there's no guarantee.
The advice we should give people about using Top and Parent references in a Rule-Declare-Index is that they should be avoided unless the properties they refer to are constant throughout the lifetime of an instance.
If you believe that you really need to pull in a Top or a Parent property into an index, you might consider a couple of alternatives:
Please follow the below mesh post.
Parent and Top references in Rule-Declare-Index are not always reliable --> Invalid document link.
See Document content below:
Top and Parent references in a Rule-Declare-Index are not always reliable.
This has to do with the way that 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--and this would include "Parent" references, "Top" references, and references to other named pages.
This means that if you have an instance, and you change a property which is referred to by a Parent or Top reference, then you cannot be guaranteed that the indexes for that instance will be updated. They might be updated--and they'll certainly always be updated if any properties within the page context path change--but there's no guarantee.
The advice we should give people about using Top and Parent references in a Rule-Declare-Index is that they should be avoided unless the properties they refer to are constant throughout the lifetime of an instance.
If you believe that you really need to pull in a Top or a Parent property into an index, you might consider a couple of alternatives:
- The best alternative is to not use the Top or Parent property in the index at all. Instead, when you are report on the indexes, do a join against the original instance class--where the Top or Parent property already lives.
- 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.
The link is not accessible. Is it published content?
Error: Access to this place or content is restricted. If you think this is a mistake, please contact your administrator or the person who directed you here.
Pegasystems
US
Due to the warnings against using "top" or "parent" cited in reply Re: we are using a Declare index and when the property is chnaging declare index is not firing and due to the fact that your declare-index has only parent.something sources shown, I suggest you redefine it such that you don't use the phrase "parent" in your sources.
For example, your current source page context is .Person.Account().Business.Address() and one of your source properties is "parent.BusNm".
Try changing your source page context to be one level less deep, so that you can leave out the "parent" phrase.
The new source context would be Person.Account().Business and the new source property would be merely ".BusNm".
See if that works better for you. Thanks. /Eric