Generate BPMN and DMN from java


I would like to generate BPMN process form Java. I have found description here:
I have generated a simple BPMN as you can see the end of my email.
I would like to open with Modeler or in the Cockpit and of course the rendering does not work but th process can be executed. Do you show any solution where the I can more info about generating bpmn (and dmn) from java and I would like to display in cockpit or Modeler and continue the process design with the modeler?

The business case is the following: We have an own BPMN engine and we would like to migrate our processes to Camunda. There are more 1000 script task and I would like to generate a simple start-scripttask-end process from the old code. Our business can fix or continue our migrated code.

Here is my code:

Thanks in advance: Gábor

Hi @Gabor_Sandor,

fluent java api is not generating representation part of bpmn part yet. This means, you can create and run your processes using code only, but cannot see the outcome.

Could you use element templates to make your migration easier?


Hello Askar

Thank you the answer. I am afraid that the element template is not suitable for us because we need to generate 1000+ Start-ScripTask(s)-End processes and our business customers should modify via Modeler.
So we need to solve the representation in-house :(.

Thank you very much your help.



If they all should have same representation, you could generate it in modeler once, persist your generated bpmn and inject representation. This is all theoretical and hacky and you will have to implement it yourself, but don’t hesitate to contact if you need additional pair of eyes on your code at some point of time.


1 Like