BPMN Model API - Diagram elements not created



I am using the BPMN Model API from 7.10 in an attempt to create and export a BPMN model. The simple example (Example 1) yields a diagram with no diagram elements (bpmndi completely missing) and produce the following error in the desktop modeler when trying to view it:


Could you please investigate?

Herewith the generated XML:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<definitions id="definitions_6e413763-03bc-41a9-bec5-8a715e58c968" targetNamespace="http://camunda.org/examples" xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL">
  <process id="process-with-one-task">
    <startEvent id="start">
    <userTask id="task1" name="User Task">
    <endEvent id="end">
    <sequenceFlow id="start-task1" sourceRef="start" targetRef="task1"/>
    <sequenceFlow id="task1-end" sourceRef="task1" targetRef="end"/>

PS: The fluent modeler works as expected, but I would like to explore all the options.


Hi @david.bailey,

That’s expected behavior. Only the fluent builder generates DI data.



Hi Thorben,

Thanks for your response.

Could you please link some documentation detailing real-world scenarios that this aspect of the model API is useful for?

Kind regards,


I don’t think such documentation exists.