Create ports in the nodes

Hello, I studied the bpmn js source code for a long time, but I could not solve the problem, I want to implement the logic associated with BoundaryEvent, on the basis of which to implement ports for connection in elements. Could suggest how this can be done, I want to create several custom nodes that will work like TimerboundaryEvent + custom nodes on which you can attach them to UserTask analogues. The problem is this: it is not clear how to prohibit the movement of TimerboundaryEvent, and how to create an element immediately with TimerboundaryEvent preset on it. Please tell me in which direction to look.
Снимок экрана 2023-09-30 191024

I’m sorry, but I have some troubles to understand what you want to do. Do you want to prohibit the creation or movement of boundary events? Do you want to to snap them to specific places on the element?

Maybe you can attach some auxiliary drawing or screen recording to establish additional context.