Question
Cognizant Technology Solutions India Private limited
IN
Last activity: 26 Aug 2021 15:33 EDT
How to copy page list from child case to parent
How can we copy the pagelist which is updating in childcase to parent case
Tried using data transform/ activity but seems i am missing some configuration
Please please someone help me to solve it
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Virtusa
IN
@Harikrishnao Please note Parent Case to Child Case data propagation is possible via couple of means like Specifying Data Propagation on Case Type rule, invoking data transform while we add a child case to a Parent Case.
Now if you want to send data from Child Case back to Parent Case, there is configuration needed, but you have to
- open Parent Case instance (if lock is not already acquired on Parent Case while Child case is being performed, which is based on your locking configuration).
- Set data from Child Case to Parent Case
- Save the Parent Case Page
- Commit data to Parent Case.
If you wish to transfer data from Child Case to Parent Case for display purpose only OR for some decision making purpose, then you may make use of Data Page which will load necessary data from Child Case by passing respective pxCoveredInsKey from Parent Case to the Data Page.
Let me know !
Thanks !
Cognizant Technology Solutions India Private limited
IN
@amolstayade hi sir,
I need to create activity in child case class only right..?
Virtusa
IN
@Harikrishnao Yes that's right. Activity has to be created in child case context. And please don't call "sir". We are all learning :D
Cognizant Technology Solutions India Private limited
IN
@amolstayade yes i have created Activity in Child case class
in the the steps are like the following,
step1;obj-open-----Pworkcover.Inskey acquired the lock and checked the release and commit:
step2:propert:set:....? not sure how to write that to copy page list from child case to parent case..
Rulesware
PE
Every time I need to update the parent case I use the "Update a case" smart shape passing the cover inskey and a data transform which contains the logic to copy data from child to parent.
Cognizant Technology Solutions India Private limited
IN
@Deivit Hi
Thanks for your reply ☺️
Do we need consider locking concept while copying data from child case to parent case
Thanks in advance
Pegasystems Inc.
US
@HarikrishnaoGenerally yes, you'll need to consider locking policy. Out of curiosity, are you trying to update pyWorkCover? That approach can be tempting, but is generally not successful, since pyWorkCover is put on the clipboard so that child cases can display parent case data. The general approach that @amolt885 outlined is what I'd recommend for updating the parent case from a child case: open the parent case (and acquire the lock if necessary) to a page on the clipboard, update it, and save it. You might have to commit it as well, but very often not since Pega intelligently commits in circumstances like upon assignment completion -- I would try it without committing first and see how that goes.
Cognizant Technology Solutions India Private limited
IN
@peter_bessman i have created activity in child class please refer the attachement
could clearly specifify that what we need specify in pages&classes and step page
can give completed activity for me plz
thanks a lot in adavcne
Updated: 25 Aug 2021 23:09 EDT
Rulesware
PE
@HarikrishnaoOf course, consider locking always when working on updating parent/child cases. If not considered you may end up with "case updated by another requestor" message, and the user will need to refresh the case (see the attached screenshot).
Personally, I prefer this method over obj- methods because the "Update a Case" smart shape calls the OOTB activity "pzUpdate", which takes care of many things
- Validates the work object before updating
- Set audit notes
- Checks if lock is held (it uses the obj-refresh-and-lock method).
- It uses the obj-open-by-handle and commit methods safely.
- Set messages and rollback if something fails.
Hope I helped you.
-
Peter Bessman
Cognizant Technology Solutions India Private limited
IN
@Deivit can you specify the logic to copy a page list from child class(pyworkpage) to parent case(pyworkcover)
thanks a lot in advance
Cognizant Technology Solutions India Private limited
IN
@Harikrishnao i am able to see page list in py workcover of child case but not able to see that in parent case pyworkpage
Any suggestion
Pegasystems Inc.
US
@Harikrishnao You might need to commit at the end of your activity. I generally try to avoid this, but sometimes it proves necessary. You could insert step where the method is a call to commitWithErrorHandling like so: