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.