Open zhengyang1988 opened 6 years ago
Unfortunately layouting / generating the diagram DI is not a simple task. We appreciate contributions that help to tackle this problem.
To understand your use case a little bit better, how did you end up with a diagram that lacks graphical information?
@nikku I need to generate the .bpmn file programmatically. I can use the camunda model API (full api) or activiti dynamic API to do this. But the .bpmn file generated by either of the two APIs doesn't contain DI information. So you can get a bpmn file without DI by using the two APIs. I need to generate the DI information to display the bpmn file generated through those APIs. If someone can help me I will really appreciate. Actually, Eclipse BPMN2 Modeler can do that once you open a bpmn file without DI in it and save it again. But I need some library which reads a .bpmn file without DI, generates the DI for it and outputs a new .bpmn file with DI. Thank you!
The Camunda model API supports generation of BPMN diagrams with DI information, cf. documentation.
It is trivial to do for simple cases and belongs to the BPMN generators rather than our toolkit.
We'll not provide such feature out of the box any time soon. We are open to contributions that provide solid DI generation though.
@nikku Only Camunda fluent api can generate DI information, the full api cannot generate DI information. There are some restrictions in fluent api so I have to use the full api in my project.
Only Camunda fluent api can generate DI information, the full api cannot generate DI information.
This is probably due to the reason that generating DI gets very complex pretty fast. Try to pursue the project to close this gap. The Camunda BPMN API builder is the right place to put DI generation.
Reopening this due to popular demand.
Are there any plans for this enhancement anytime soon?
When opening an bpmn file without DI information(the section), there will be an error. If the editor or viewer can generate the DI information automatically and display the diagram correctly, that will be great.
Expected Behavior
Actual Behavior
Steps to reproduce the Behavior
open a bpmn file without DI information. You can manually delete the element and all its descendants from a bpmn file generated by the bpmn editor