Data Propagation in Pega: Parent-to-Child and Child-to-Parent Case Data

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.

Data propagation configuration in the Pega case type rule

Click the button to map properties. We can map properties directly here, or we can use a Data Transform to map the properties.

Data propagation rule for parent to child case
Clipboard Pages to Remember

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.

Parent and child case work pages on the Pega clipboard

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.

Data propagation shown in Pega Tracer
Parent to child data propagation mapping

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.

Update Case shape in Pega

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.

  1. Use a Data Transform.
  2. Call an Activity and save the parent page (Activities are not recommended by Pega).
  3. 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.

Child to parent data mapping using a Data Transform
Important:

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.

Update Case rule configuration in Pega

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.

  1. 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.
  2. 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.
  3. 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 propagationData Transform
What it isA process of moving data between related casesA rule that sets or copies property values
ScopeParent and child casesAny page or property on the clipboard
How it is doneCase type settings, Update Case shape, or a Data TransformCalled 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.

7 comments:

  1. Hi,
    Helpful post.
    It really helpful.
    Can you post topic on property qualifier, linked properties

    ReplyDelete
  2. Thank you. Will post on those topics.

    ReplyDelete
  3. Can you please explain a scenario where it is required to propagate data from parent to child instead of referring to pyWorkCover.

    ReplyDelete
  4. Dear Team, It was really well explained along with great example. Thanks for this wonderful post

    ReplyDelete
  5. Nice post.Its very clear and understandable.

    ReplyDelete
  6. Hi,
    Good 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?

    ReplyDelete
  7. very nice information and content is specific

    ReplyDelete