What is Data Propagation in Pega?
Data propagation means mapping important or required properties from a parent case to a child case, or from a child case back to its parent case.
It can save time because the required properties are already available when completing the related case.
Parent Case to Child Case Data Propagation
We can map properties on the parent case type rule.
If we open the case type rule (pyDefault) for the parent case, on the Process tab we can see the number of child cases attached to the parent case.
After each child case, there is a Data propagation button.
Click the button to map properties. We can map properties directly here, or we can use a Data Transform to map the properties.
We need to understand the work pages on the clipboard when we open the parent case and child case.
If we open the parent case, the work page will be pyWorkPage.
If we open the child case, the parent case's work page will be pyWorkCover, while the child case's work page will be pyWorkPage.
This represents the Cover and Covered object relationship.
We created a parent case, Assistance Request, and during the process Pega created the child case FullService.
We can see the mapped properties (Vehicle Information and Service Address) on the clipboard. The data has been propagated from the parent case to the child case.
Using the Update Case Shape
We can use the Update Case shape from the Automation category to update a single case, a specific child case, or all child cases.
Child Case to Parent Case Data Propagation
There is no OOTB utility or shape specifically designed to map data from a child case to its parent case.
In scenarios where we need to map data from a child case to its parent, such as when the child case process finishes, we have multiple options to achieve data propagation.
- Use a Data Transform.
- Call an Activity and save the parent page (Activities are not recommended by Pega).
- Use the Update Case shape with an ID.
1. Data Transform
In the child case lifecycle, we can use a Data Transform rule to map values from the child case to the parent case.
We need to write our own Data Transform to propagate the data from the child case to the parent.
Make sure to save the parent work page (pyWorkCover) after mapping the data.
We cannot save data in a Data Transform, so we need to call the Data Transform from a Utility shape or another supported shape where we have the option to call the Data Transform.
2. Activity
Pega does not recommend using Activities for this type of processing. In this scenario, we can use a Data Transform or the Update Case shape instead.
However, we can use the Property-Set method in an Activity to perform the mapping and save the parent work page.
3. Update Case Shape
We can use the Update Case shape to propagate data to the parent case by selecting the A Single Case option and providing the parent case ID.
The parent case can be referenced using .pxCoverInsKey, and we can write our own Data Transform to map the required properties.
At runtime, with the ID option, the case ID is available through .pyCaseID.
At runtime, Pega calls the pzUpdateCase Data Transform and gets the values from the properties configured in the Update Case shape.
These values are passed to ACTIVITY WORK-COVER-PZUPDATEWRAPPER, which is responsible for calling the Data Transform used in the Update Case shape.
We need to make sure to save the parent work page (pyWorkCover) after the mapping is completed.
Worked Example: Loan Application and Document Verification
Suppose a Loan Application parent case creates a Document Verification child case. The verifier needs the applicant name and requested loan amount, so we do not want them to re-enter it.
- Parent to child: when the child case is created, the applicant name and loan amount are mapped from the parent to the child, so the verifier sees them as soon as the child case opens.
- Child to parent: when verification finishes, the child's result (for example, a verification status) is mapped back so the parent case can decide whether to continue.
- Choosing the mechanism: use the case type propagation settings or the Update Case shape for simple property mapping, and a Data Transform when the mapping needs conditions or calculated values.
Difference Between Data Propagation and Data Transformation
A Data Transform is a rule, whereas data propagation is not a rule. Data propagation is the process of transferring data from a parent case to a child case, or from a child case back to the parent case.
To achieve the data propagation process, we may use a Data Transform.
Data Propagation vs Data Transform at a Glance
| Data propagation | Data Transform | |
|---|---|---|
| What it is | A process of moving data between related cases | A rule that sets or copies property values |
| Scope | Parent and child cases | Any page or property on the clipboard |
| How it is done | Case type settings, Update Case shape, or a Data Transform | Called from flows, activities or other rules |
Key Takeaway
Data propagation makes it easier to move required information between related parent and child cases. Depending on the direction and use case, we can use Data Transforms or the Update Case shape to perform the mapping.
Hope you now have a clear understanding of data propagation in Pega.
Please share your comments and questions.
Hi,
ReplyDeleteHelpful post.
It really helpful.
Can you post topic on property qualifier, linked properties
Thank you. Will post on those topics.
ReplyDeleteCan you please explain a scenario where it is required to propagate data from parent to child instead of referring to pyWorkCover.
ReplyDeleteDear Team, It was really well explained along with great example. Thanks for this wonderful post
ReplyDeleteNice post.Its very clear and understandable.
ReplyDeleteHi,
ReplyDeleteGood explanation and great work.
In my Scenario, the data (Phone: 9000000000) is already propagated from parent case to child case. Later, the property value in parent case is updated (Phone: 9111111111). This new phone number should be updated in child case. In Parent casetype, I am trying to use "Update Case" smart shape and in right side panel, selected option is "Specific Child case". Selected the child casetype from the dropdown and created one data transform to set the value of phone in child case.
My doubts are:
(1). How to map the property values in data transform?
(2). How pega identifies the specific child case property (in our scenario, its phone number) to update the data?
very nice information and content is specific
ReplyDelete