pubsubevents
Reactive icon

PubSubEvents

version 1.0.0 (Compatible with OutSystems 11)
Uploaded
 on 24 Aug (yesterday)
 by 
0.0
 (0 ratings)
pubsubevents

PubSubEvents

Details
A core utility application providing highly decoupled communication between client-side blocks and screens. It implements the Publish/Subscribe pattern to enable targeted UI state synchronization, effectively replacing complex event bubbling and the reliance on OnParametersChanged for client-side data updates. Use this component to build more modular, maintainable, and responsive user interfaces.
Read more

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.


Key Actions


1. SubscribeToEvent (The Listener)


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.

InputDescription
EventIdThe unique identifier (channel name) to subscribe to. Must exactly match the name used by the PublishEvent action (e.g., "UserProfileSaved").
CallbackActionThe client action to be executed when the event is published. This action serves as the event handler for the subscriber.


2. PublishEvent (The Sender)


Action Description:

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.

InputDescription
EventIdThe unique identifier (channel name) for the event. Use a descriptive, PascalCase name (e.g., "OrderProcessed").
PayloadThe data object to be sent to the subscribers. Best practice is to send only an identifier (e.g., a Record ID) rather than sensitive or complete records.


Security Consideration

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.

Release notes (1.0.0)
License (1.0.0)
Reviews (0)
Team
Other assets in this category