Programmatically creating a process



I want to design a business process diagram in BPMN 2.0 using Javascript. Does have some sort of API that I can call to create BPMN elements and connections, setting their position and, at the end, generate a BPMN 2.0 XML?

Thanks in advance,

Diogo Cardoso



is the bpmn-js command line interface an option for you?
You can check it out here:


Yes, that looks very nice. However, I am only able to use the CLI in the web browser console. How can I use it inside my own JS code?




Can anyone help me?


Have a look at the unit tests for modeling. They serve as documentation, too.