Tasklist webapp diagram

Hi,
My bpmn model was created by model api (not fluent builder api) which don’t include bpmndi:BPMNDiagram, So I want to know how tasklist web app generates the diagram image ?
Thanks.

anyone help ?

Hi @manda091x,

the tasklist includes BPMN.io libraries which create the diagram based on the coordinates in the bpmndi:BPMNDiagram section.

If they are not there, the library can’t create an image.

A long time ago I tried to set the coordinates explicitly with the model API setting special properties on the elements. I remember that it worked, but not any details about it.

Hope this helps, Ingo

Hi @Ingo_Richtsmeier, thanks for your replying.
I tried to use model api to delete a usertask from an existing model (created by camunda modeler.exe), the validation passed but the coordinates of those flow nodes(in my case is the end event) which after the deleted task didn’t change,so some of the sequenceFlowes look like not connected to the flowNodes(actually connected,both source and target),see my new bpmn diagram(part of, because right now uploading image is not working well,don’t know why)
1 . So is it possible to update the coordinates or something else ? thanks again.

edit 1
or is it possible to create model from empty with use of fluent api and add some logical code ?

Hi @manda091x,

this could happen, as absolute coordinates are saved for every element.

The sequence flow has an absolute start- and endpoint as the end event has. There is no doublecheck, if connected elements (they are logically connected with <bpmn:sequenceFlow id="SequenceFlow_1ijy1qq" sourceRef="ExclusiveGateway_168r1ef" targetRef="EndEvent_142rw8v" />) have matching coordinates in the DI part.

You have to update all coordinates in your code.

Fluent API has some extra features for autolayouting the flow and maintaining the coordinates. I found something in this class: https://github.com/camunda/camunda-bpmn-model/blob/master/src/main/java/org/camunda/bpm/model/bpmn/builder/AbstractBaseElementBuilder.java#L271.

Hope this helps, Ingo

Hi @Ingo_Richtsmeier, thanks again, it’s very helpful to me, I will mark it as solution, just one more question.
Is it possible to create model from empty with use of fluent api and add some logical code ? If yes, please give some samples or links, very appreciated.

Hi @Ingo_Richtsmeier,
after read this https://github.com/camunda/camunda-bpmn-model/blob/master/src/test/java/org/camunda/bpm/model/bpmn/builder/ProcessBuilderTest.java#L354 testExtend, now I can add my own logical code, thank you