WebSockets
WebSocket support makes it possible to open a two-way interactive communication session between a client and ProcessMaker IDP. With this API, you can send messages to a server and receive event-driven responses without having to poll the server for a reply. WebSocket support requires an integration rule with Queue Name WEB_SOCKET_EVENTS
and an Entity Reference to a certain entity to process events.
First, open the connection: wss://processmaker-idp.com/api/websocket/events
. Then you can subscribe or unsubscribe to events of a particular entity instance defined by an ID. Notifications are received after update operations are made on the subscribed file. Each request requires an Authorization header with a Bearer token from Keycloak. Also, a second header Origin
is required with the ProcessMaker IDP base URL as the value.
Subscribe
Example:
Notifications
The client will be notified at every value change of an attribute of that particular entity instance:
If you would like to get notified of new or updated files in a folder, the Event Type of the integration rule related to the child entity (in this case FILE) should be set to both CREATE
and UPDATE
. You will need to subscribe to the folder.
A new file:
An updated file:
Unsubscribe
Example:
Last updated