'Subscribe to message' is a form service element that registers for push messages on a specific topic. The Topic property acts as a filter. Only push messages sent to the matching topic are received. When a matching message arrives, the 'Receive message' event fires on the element. If the element is deactivated, no events fire.
Tip
A push message is sent from the server side via the Push message event action. Topics are freely selectable.
NOTE Only clients with an active subscription to the topic receive push messages.
Properties
Property | Description |
|---|---|
Topic | A static text value or value configuration that identifies the channel to subscribe to. The value must match the Topic set in the corresponding Push message event action exactly (case-sensitive). |
The 'Receive message' event
When a push message arrives on the subscribed topic, the 'Receive message' event fires. Configure a Behavior on the element in the form designer to react to this event.
The Payload sent by the Push message event action becomes the input value of the triggered Behavior. Inside the Behavior's event actions, the input value is available under the variable name $input.
Accessing the payload in a Behavior
How you access $input depends on the payload type:
Payload type | What | How to read it |
|---|---|---|
No value |
| Use a Static rule to check that |
Simple value (string, number, boolean) | The scalar value itself, e.g. an order ID or a status code. | Use a Variable value resolver and enter |
Complex object (entity or data structure) | An object with named properties, e.g., | Use a Variable value resolver with |
List ( | A list of values or objects. | Use a Variable value resolver with |
IMPORTANT
The payload type depends entirely on what the sender configured in the Push message event action. Coordinate with whoever configures the sender to know the expected payload structure before building the Behavior.
Example: Refresh a list when data changes
A server-side event handler sends a push message with topic order.updated whenever an order is saved. The payload is the updated order object. A portal form contains a 'Subscribe to message' element.
Goal: Read the order ID from the payload and store it in a variable, then reload the list.
Set the element's Topic to
order.updated.Add a Behavior with 'Receive message' as the trigger.
Add a Set variable event action. In the value configuration, chain:
Variable value resolver → variable name:
$input(returns the full order object)Object property resolver → property:
id(reads the order ID from the object)
Store the result in a variable, e.g.
lastUpdatedOrderId.Add a Reload event action after the Set variable action to refresh the list.
Result: every open session with the form reads the incoming order ID and reloads automatically—without the user refreshing the page.