How to add bpmn elements to the canvas e.g. via input fields?

Hello guys,

i just started using the bpmn-js Framework and went trough the walktrough.
I installed bpmn-js via npm and made a small webserver to start the appilcation.

Now if i want to add bpmn elements (Tasks etc.) to the Modeler with e.g. input fields (Dropdown with different Elements for example), how can i achieve that? For now these do not get attached to any other element, i just want to understand the concept on how to create valid bpmn elements outside the default way.

Any help is appreciated. Thanks in advance.

The ElementFactory module is a good starting point for this.

Here is a simple example on how to use it for creating a simple task:

Thank you, that already helps a lot.
Where do I find all the available functions of the ElementFactory? doesnt list the used functions.

That’s the ElementFactory you’re searching

Thanks :slight_smile:

Will look into this and try things out.

1 Like

You may also find this project interesting: