#1938·bpmn-js

Add Auto-Connect Feature

Author: philippfrommeCreated Aug 7, 2023Updated Jul 14, 2026
Labelsenhancementbacklog

The introduction of auto-place has made modeling (especially when modeling from scratch) a lot faster. With a single click, you can append an element without having to worry about the position of the element. With a little bit of logic, connections could be created automatically, too. When the user hovers the connect entry of the context pad, a possible connection could be previewed, which can then be created on click.

brave_TI1DPawpz5

Implementation Notes

  • context pad supports hover callbacks (both mouseover and mouseout)
  • auto-connect feature finds suitable candidate for connecting
    • if candidate is found it is connected on click
    • if not candidate found connect tool is activated on click
  • allow hooking into finding suitable candidate through event bus (e.g. prevent suggesting connection between participants)