Pega - Case Type Covers ( Parent and Child Cases )

1.How to Access Parent case data at child cases?
A.At each child case, parent case data will be made available in the name of a system created page, pyWorkCover.
pyWorkCover is a Copy of pyWorkPage of Parent Case.

2.You are writing an activity at Child case1, how to copy the data of Child case2?
A.We should open the childcase2 on a temp page and use it.

3.How to update Data from Parent to Child during Processing of Parent case?
A.We need to open the child case, on to temp page, update Parent case data to temp page, lock and Save it.
B.PRPC has an OOTB flow shape for the same. “Update Case”
1664116875059.png


4). Where is the relation defined between parent and child cases? How do we know , the child cases of a parent?

1664116943101.png

Under pyWorkPage of Parent case, we have “pxCoveredInsKey”. Which will have all it’s child cases, pzInsKeys.
This pxCoveredInsKeys is an OOTB value list property.
Done.

5.Write an activity at Parent case and fetch child case data?
We can use Obj-Open-ByHandle and Open child case data.
Loop through for each value in Valuelist and pass the pzIsnKey like below
pyWorkPage.pxCoveredInsKeys(<CURRENT>)


6.We are designing child case1, write an activity to fetch other child case(s) data?
We can use Obj-Open-ByHandle and Open child case data.
Loop through for each value in Valuelist and pass the pzIsnKey like below
pyWorkCover.pxCoveredInsKeys(<CURRENT>)

1664117081848.png

7. How do we want to update data from parent to child at the time of a child case is getting created?
Two ways
1.Data Propagation : Copying data from parent to child ,while child is getting created.
1664117344685.png


2.We have to write the logic in pyDefaultDataTrnasform , which should be created under Child case type class.
.FirstName = pyWorkCover.FirstName.

8.How do you know the number of Child cases of a parent case?
We can look up the value of OOTB properties
pxCoveredCount 2

9.How do you know , how many child cases are open , under parent case? Which are yet to be resolved?
We can look up the value of OOTB properties
pxCoveredCountOpen

10.How do you know weather all child cases are resolved or not?
We need to write when condition like
pxCoveredCountOpen = 0.

For this PRPC has OOTB when rule
“AllCoveredResolved”
1664117585612.png

11.We want to stop the parent case to wait till all children gets resolved. On click of submit button in an assignment, PC has to check all children resolved or not? If resolved, should move forward else display a message on the screen.

A.In the post processing activity, use a precondition on method “Property-Set-Message” or “Page-Set-Messages” to display a message on page.
B.In the post processing activity, Call Validate rule using Obj-Validate Method.
C.In the validation tab of flow, we can call validate rule.
D.We can use “Decision Shape- Fork” and connect back to same step when pxCoveredCount !=0

12.We want to stop the parent case to wait till all children gets resolved, Parent case should be on wait.
We can make parent wait by using wait shape

1664117759259.png

1664117777964.png

Wait can be based on time, hard coded or Prop Reference.
OR
It can be dependent , case Status or Resolution.



1664117853556.png

13.We have used a wait shape, where case got stuck , how to manually release this?
When case reaches wait shape, PC pushes that into a work queue, [email protected]
1664117914288.png

To get access to the above work basket, we can add it to operators Work Group.
Or
we can add operators into Work Basket by updating it’s rule form


1664117966688.png
DONE.

14.How to achieve || processing using Covers?
A.We need to choose the option “Do not lock parent, when the child is open”, under settings tab of “Child case types”.

15.Optimistic Locking--> Case has two assingments. Assingment1 routed to Work Queue WQ1.

Op1, Op2 are part of WQ1.
When the case is at Assignment1, Op1, Op2 opened the case and they are filling a form.
Op1, submitted case and submit action is completed. Then Op2 has submitted the case.

The details submitted by Op1 will be Overridden by Op2 or not?
A.Op2 data will not be stored because the assignment is completed by OP1. Op2 will get a screen with refresh button.
 
Top