Add a lane to a pool dynamically

I am creating a web page, where there are two columns. In right column, there are some input field and on the left column the bpmn diagram is generated based on the values of input fields. My requirement is when the user insert some value in a input field, I need to dynamically insert a lane to a pool with label as value of input. Is this possible to create a lane dynamically ? Thanks in advance.

1 Like


Yes, as an example, you could get ‚ÄėElementFactory‚Äô component and use ‚ÄėcreateParticipantShape‚Äô function to dynamically create required component.

Have a look on ‚ÄėLabelEditingProvider.update‚Äô for setting labels, as well.

Consider looking into bpmn-js source code for examples and ideas.