The Case Context is not being identified in Pega Constellation

Whenever a View is called with a Data Page context, the WorkPage context is not being picked up.

how to get the workpage context?

Env: Pega Customer Service for Financial Services (Constellation) '25.1.1

@Tarun could you share some more details? What are you trying to get from the WorkPage? I assume you’re trying to use case details of some sort? perhaps as parameters?

If you can share some details then I’m sure someone in our ecosystem will know the answer!

I just need case id from the workpage for my usecase.

IF you create parameters on the data page, you can pass them through the property

I don’t have a good image of my own, but you can see them even with OOTB data pages.

My actual use case is to call an API through a Data Page to fetch customer details and display them in a View. The required parameter(InsKey or caseID) is initially passed from the Data View to the Data Page. However, the parameter is not retained throughout the API Data Page execution because the parameter page gets overridden, causing the parameter value to be lost before the API call completes.

I’ve never experienced this issue. Could you please share a screenshot or little more details? Are you triggering the data from the UI layer which is parameterized to take the case id?

The best way to pass the Case parameters is directly in the data model (as outlined prior). However, if its getting lost you could look to use the caseInfo.content page (though it doesn’t work in all scenarios).

Given there is a need to look at your configuration and figure out why the details are getting lost, a ticket with Pega Support might be the quickest route to resolution.

For my use case, I tried using the pyRefreshData Data Transform to populate the required details into the Data Page when the case is launched, with the intention of reusing the Data Page throughout the case lifecycle. However, I observed that pyRefreshData also executes in the CaseInfo.Content context

Thanks for the suggestion. Could you please clarify which scenarios caseInfo.content would not be available or would fail to provide the case context? This will help us determine whether it is suitable for our use case.

That is a great question! I do not know the answer :expressionless_face:. I have asked colleagues, who have used it and am yet to see anyone test every scenario. It would be a good write up for a Constellation 101

I would be doing this on the property itself or in the flow (loading the datapage using a data transform).

pyRefreshData API and Form Refresh Settings can be used for keeping data up to date but they hit limitations with complex forms and competing API’s calls. It’s best to keep it in your data model and out of the UI.

@Tarun

Below post resonates your use case to some extent. Try if it works

Regards

JC

  1. My scenario is different from the one shared in the post.
  2. The Pega case is launched from an external system through URL mapping.
  3. During case launch, multiple APIs are invoked through Data Pages to retrieve customer and account details.
  4. If any of these APIs fail, we need to capture an audit entry containing the API failure details along with the Case ID.
  5. To capture the Case ID, we need access to the work page/case context during API failure handling.
  6. However, while the Data Page is executing, the primary page is the Data Page class, and the work page context is not available.
  7. Therefore, we are looking for a feasible approach to retain or pass the case/work page context into the Data Page execution, so that the Case ID can be included in the audit.

Try adding a parameter to the data page for the Case ID or pzInsKey. From there, you can open the case within the data page’s data transforms to handle the necessary auditing and actions.