BPMN model API generated file invalid

Hi,

I’ve created a bpmn file and when i try to open it with the modeler, it says: no diagram to display" do you believe that ‘x’ is a valid diagram?

I see in the file created that there is no ‘bpmn:’ before the attributes.
Any idea as for teh problem?

Could be a whole bunch of things.
You’ll need to explain how you created the model and upload it so that we can take a look.

Hi Niall,

i have followed the API documentation and created something very simple. (start->task->end).
and then i create a bpmn file (see below).
Then i went to the modeler and tried to ‘open’ the file.
From what i can see, the DI elements are not created.

<?xml version="1.0" encoding="UTF-8"?> start-task-Renew-Policy task-Renew-Policy-end start-task-Renew-Policy task-Renew-Policy-end

Indeed you’re correct, the model API doesn’t create any DI - in fact it’s not really intended for building models to be displayed in the modeler.

But luckily our very own @Beagler has kindly built a very useful tool that can help you build the DI you can check it out here. BPMN <bpmndi> generator utility

Thanks Niall,

I will check it out.

Hi @niro,

if you use the fluent builder API, the DI part will be generated as well: https://docs.camunda.org/manual/7.14/user-guide/model-api/bpmn-model-api/fluent-builder-api/#generation-of-diagram-interchange

Hope this helps, Ingo

Niall, I have a follow up question.
If I want to use the generator utility you mentioned, do you have it packaged as a maven dependency as well so i would just need to add a dependency to my project?

Hi,
Are there license terms for using this utility (BPMN Diagram Generator)? I couldn’t find one online

@niro, feel free to use as you please. Perhaps I’ll add license terms (ie use freely :slight_smile:) at some point just to be clear

1 Like