Skip to content

Real-Time Collaborative Editing

Multiple users can work on the same workflow simultaneously with an editing control system.

  1. A user opens a workflow in the editor
  2. Connects to the /collab WebSocket namespace
  3. Joins the workflow room (workflow:{id})
  4. If they are the first, they get editing control automatically
  5. If there is another editor, they can request control
EventDirectionDescription
join-workflowClient -> ServerJoin the editing session
user-joinedServer -> ClientsNotifies that a user joined
leave-workflowClient -> ServerLeave the session
user-leftServer -> ClientsNotifies that a user left
request-edit-controlClient -> ServerRequest editing control
edit-control-grantedServer -> ClientEditing control granted
release-edit-controlClient -> ServerRelease control voluntarily
heartbeatClient -> ServerKeep session active
get-active-usersClient -> ServerQuery active users
  • Only one user at a time has editing control
  • Others can view the workflow but not modify it
  • If the editor disconnects, control passes to the next in queue
  • A user can release control voluntarily
  • The heartbeat system detects disconnections