Thanks to java camunda-bpmn-model library it is convenient to build bpmn models on a fly.
But generated BPMN models are without diagram data and cannot be displayed as diagram, it would be very nice to have bpmn diagram as well.
Is there any library already which does the magic?
right now there are no projects that allow generation of DI for a diagram. We had multiple prototypes, but they never made it to production. You can always create feature request in our JIRA or vote for existing feature, like this one CAM-1472.
If you really want this done fast, you could also provide implementation in form of pull request or community extension.
Iām new to camunda bpmn and the forum and this post seems the closest (maybe identical?) to what I would like to ask.
People at my company start using camunda modeler to create diagrams (but usage of the engine would be a long way to go stillā¦). For documentation purposes Iād like to convert the *.bpmn files of the modeler to *.svg automatically, ideally using some command line tool. The tool chain would look something like camunda modeler -> commit via git -> trigger svg generation via cli -> upload to wiki. If thereās some cli, I could use, that would be great. Otherwise a pointer to the right place in the source would be appreciated.
Hi Roman,
thanks for the answer! Next time, Iāll create a new post
For the time being: The svg-export in the modeler works just fine, but what I would like to do is take a .bpmn file as saved by the modeler and generate an svg file using some kind of shell script. Maybe I donāt know enough yet to do a smart search for what I need ā I googled for cli options of the modeler or something similar.
Something like
I guess, itās not that easy, but worst case: itās somewhere in the codeā¦
So my emphasis would be on āautomaticallyā convert to svg. If that would be possible, I could setup a repo just for the bpmn files and all the boring conversion stuff and wiki update would happen somewhere else. The user wouldnāt need to create a new svg everytime they change the model (which still happens a lotā¦).
I think the only thing you can do right now is grab the BPMN.IO library and build yourself a custom solution. Youād have find where it reads in the BPMN XML files and hook that into some sort of interface or command line tool. Iād speculate that thereās probably a rendering component in there that might do this.
I know that in the deprecated Camunda Eclipse plugin it automatically produces a png file. BPMN.IO must automatically render the BPMN, so this functionality is definitely buried in there somewhere.
As for automatic layout, Iām not exactly sure what you mean. If you examine the XML associated with the process, you will see a section like the following:
Without this code, how would the display component know where to put each element. What is the ārightā way to do that? Itās rather arbitrary, though there are layout and routing algorithms out there, their efficacy is pretty subjective. What looks good to me may not look good to someone else. Moreover layout and routing is a fairly complex thing to do as there are an arbitrary number of elements in a process and thus you canāt predict the performance of your algorithm.
If youāre using Camunda Modeler, you can output the file in 3 different graphic formats. Because modeler uses BPMN.IO, the ability to do this dynamically is in there somewhere.
I also an trying to generate a SVG file from a BPMN without having to use the modeler.
Iām writing a NODE CLI application to extend documentation methods to a BPMN, it working pretty well except for the automatic SVG generation.
Iāve posted a new request about this and think the answer may be embedded in the BPMN.JS library and the use of a headless browser. If i figure this out then writing a CLI command to do BPMN to SVG would be somewhat simple.
Have you gotten any other feedback on this request?