We are generating bpmn process xml in our application and want to deploy it to the Camunda 7.18 platform. Although we can generate the relationships between elements as expressed in the “bpmn” namespace, we have not generated the geometric information for the diagram as expressed in the “bpmndi” namespace.
This means our bpmn does not load in the modeler, and while we can deploy to the camunda platform and indeed run it, no diagram shows when we view a process instance in the cockpit. That makes it hard to debug because we can’t easily tell which task is current.
Is there some package or utility we can use to supply the missing diagram using some default layout rules?
I assume that people create business process definitions using other modelers, business process definitions that have been used in other servers that are not camunda so there must be a way to do this that is well understood and works.
I don’t know of any program that is doing this by default.
However, Camunda’s BPMN Model API has a simple layout algorithm implemented. You can use this library to…
Parse your current BPMN Model
Recreate the model element by element. I would start with the start-event and use a breadth-first search or depth-first search.
While the model is recreated, the libraries auto-layouting algorithm will be applied, and you’ll receive an equivalent BPMN Model with BPMNDI information.
Hi @StephanHaarmann Could you please provide an example,
I use the BPMN Model API to create bpmn.xml ,I encountered the same problem.I have checked the information that the flowable engine can use new BpmnAutoLayout (bpmnModel). execute(); Does camunda have a similar API or package.
thanks!
as far as I know, Camunda’s BPMN library does not provide a method for auto-layouting. However, since BPMN is a standard, the result of the flowable call should be compatible with Camunda.