I have pre-existing cases containing a pagelist property that was manually populated.
I now change the pagelist property to be auto populated (-ie- copied from a data page) by a report definition
When I reopen a pre-existing case it re-populates the page list property by mostly appending records to what is existing in the pagelist property. All but the first record is appended to the list again .which seemed really strange. I wouldn't have expected it to be sort of appended to what was already there. But really I was expecting the property to not be re-populated since it was already manually populated.
Can anyone explain to me what the expected behavior of this scenario should be?
***Edited by Moderator Marissa to update Content Type from Discussion to Question; updated Platform Capability tags***
Pega will always use the latest configuration of the (Property) rule to drive its behavior, so in this case - as you are seeing - there is an attempt to apply the Data Page data to the property. Interesting, as you say, that the result is a hybrid, but not surprising that it uses the Data Page as that's what the current configuration is.
If your intent is to retain the manually entered data for existing cases that have it, then if it's not too late I'd recommend reverting the property back to Manual so that this data is not at risk of being affected by the Data Page.
You may need to contemplate a data migration exercise to get the existing data on the Manual pagelist into the table / system of record that the Data Page is expecting to find it, combined with then blanking out the 'manual' data on the pagelist and finally referencing the autopopulate property so that the pagelist holds the snapshot copied from the Data Page as per the new design.
Also consider having your autopopulate property a completely different property and some way of the UIs arbitrating over which property to use based on some version number.
I ended up reverting the property back to not auto populated and ended up adding code in a number of places that were relying on the property to be auto populated to now populate manually so to speak.
I was just wondering if what behavior I was seeing was expected? It is my understanding that after the first auto population of a property set to copy from data page then it won't auto populate again (-ie- if keys haven't changed I suppose) but in this case it was not auto populated in the first place as the property was manually populated so I am assuming the system the system thinks it needs to run the auto population at least once for existing cases.
Posted: 2 years ago
Posted: 16 Dec 2020 19:21 EST
Braam Smith (BraamCLSA)
Partner Success Tech Lead - APAC
I think it is fair to expect that the behavior of a property on existing cases originally configured as Manual and then changed to Auto-populate is unspecified.
Your understanding of the "copy from a data page" data access option is correct, but this does not account for what to do with existing data captured when the property's data access was "Manual".
I doubt the system automatically runs the auto-population for existing cases. Rather, when that property is referenced Pega will know that this case has never sought the data page referenced on the property's latest configuration and therefore go to load it. It won't be expecting to have to content with existing manual data on that property.