Using pxC11NPublishDatapageUpdate Activity

Hi, can someone guide me on how to use the pxC11NPublishDatapageUpdate activity in Constellation?

I have a data page that takes around 10 seconds to load the data. Can I use this activity to notify the user once the data is loaded and refresh/reload the screen? Also, how should I pass the data page in the activity?

Hi Aryawardhan,

pxC11NPublishDatapageUpdate is mainly used in Constellation to notify/invalidate a client-side cached Data Page, not to directly “wait for a Data Page to finish loading” or automatically reload the whole screen.

A few important points:

1. pxC11NPublishDatapageUpdate is intended for Constellation client-side Data Page cache invalidation.

When the server-side data changes, you can call this activity so that Constellation clients are notified through the messaging/websocket mechanism that a specific Data Page is stale.

You normally pass the Data Page name as the parameter, for example:

D_YourListDataPage

2. This works for list / pagelist Data Pages that are eligible for client-side caching.

It does not apply to single-page Data Pages.

This is also mentioned in the Pega documentation for Data Pages in Constellation:

3. Constellation typically does not auto-refresh the list immediately.

The reason is that automatically refreshing the UI could disrupt the user’s current sorting, filtering, grouping, pagination, or table state. Usually the user is notified that refreshed data is available and can decide to refresh the list.

4. If you need a more generic notification/message, you can look at pxC11NPublishMessage.

pxC11NPublishDatapageUpdate is a specific use case for Data Page invalidation. For a more generic server-to-client message in Constellation, pxC11NPublishMessage can be used.

It allows publishing a custom message with parameters such as:

- matcher
- criteria
- message

In this case, criteria and message are map-like parameters, so you can use them to define the target/matching logic and the payload you want to send to the client.

However, the important part is that this only publishes the message from the server side. To actually react to it in the UI, you need something on the frontend side that listens for that message.

5. For a custom UI reaction, you would need a custom DX component.

If your requirement is not just to invalidate a Data Page, but for example:

- show a custom notification when the backend process finishes,
- refresh a specific part of the screen,
- trigger custom frontend behavior,
- react to a custom message payload,

then you would need to build a custom DX component in Constellation that subscribes/listens to the relevant message and handles the frontend behavior.

Hello! I’m happy to help you understand the pxC11NPublishDatapageUpdate activity in Constellation.

The pxC11NPublishDatapageUpdate activity is designed to invalidate a Data Page in the client-side cache. When you call this activity, the server sends a websocket message to the client to invalidate the cached entry. This activity can be called from other Activities, Data Transforms, or declare triggers.

However, it’s important to note that this activity is primarily used for cache invalidation rather than notifying users when data has finished loading. The typical use case is when data has been updated on the server side (for example, when entities or relationships are created or updated in the Common Data Model), and you need to ensure that clients refresh their cached data pages to reflect these changes.

Regarding your specific scenario with a data page that takes 10 seconds to load: The pxC11NPublishDatapageUpdate activity may not be the ideal solution for notifying users when initial data loading is complete. Instead, you might want to consider loading your data page asynchronously to improve the user experience. This approach allows users to continue interacting with the case while data loads in the background, which enhances productivity and application efficiency.

As for passing parameters to the pxC11NPublishDatapageUpdate activity, recent enhancements have added support for parameters. This enables you to limit the number of unwanted refresh notifications on expired Views by targeting specific data page instances more precisely.

Please note that this setting is not applicable for single-page Data Pages, and these activities are only applicable within a Portal requestor.

I hope this helps clarify how the pxC11NPublishDatapageUpdate activity works! If you need more specific guidance on implementing asynchronous data loading for your use case, that would be a different approach to explore.

My use case is that the data takes around 10 seconds to load. In Constellation, the UI initially loads without the data, and currently I have to manually refresh the entire screen to see the updated data once it becomes available.

Is there a way to make the UI update dynamically so that the data automatically appears after the 10-second load time without requiring a full screen refresh?