Getting started Community Training Tutorials Documentation APIs, AI & Tools
<flow name="onIncomingMessageFlow">
<websocket:inbound-listener
path="/chat"
defaultGroups="#[['AVENGERS', 'REVENGERS']]"
config-ref="ws" />
<logger
level="INFO"
message="#['Received message ' ++ payload ++ ' from socket: ' ++ attributes.socketId]" />
<websocket:send
doc:name="SendResponse"
socketId="#[attributes.socketId]"
config-ref="ws" >
<websocket:content>#['I'm fine, thank you!']</websocket:content>
</websocket:send>
</flow>
<flow name="sendFriendlyMessageFlow">
<websocket:open-outbound-socket path="/chat" config-ref="ws" />
<websocket:send
doc:name="SendMessage"
socketId="#[attributes.socketId]"
config-ref="ws" >
<websocket:content>#['Hi! How are you?']</websocket:content>
</websocket:send>
</flow>



