The PubSubEvents component implements the Publish/Subscribe (Pub/Sub) pattern directly on the client-side, providing a modern, flexible, and highly decoupled mechanism for communication between UI blocks and screens.
This component eliminates common complexities in OutSystems development, such as tedious event bubbling and relying on OnParametersChanged for client-side updates.
OnParametersChanged
Action Description:
Registers the calling Block or Screen to receive notifications from a specific event channel.This action acts as the Subscriber by linking a unique $EventId to a specific $CallbackAction. Once registered, the $CallbackAction will automatically execute when a matching event is published.
$EventId
$CallbackAction
EventId
PublishEvent
"UserProfileSaved"
CallbackAction
Publishes a message to a specific channel in the Pub/Sub Event Bus.This action acts as the Publisher, broadcasting a payload to all client-side components that have previously subscribed to the $EventId. Enables decoupled, cross-component UI synchronization.
"OrderProcessed"
Payload
Like all client-side operations, the data transmitted through this event bus is accessible and tamperable by the end-user. NEVER rely on the event Payload for security. All Server Actions called as a result of an event must always re-validate the user's roles and permissions on the server side.