Closed alvarosantoscwb closed 1 year ago
Hi @sleeptd2 I need more information to be able to answer to you.
All the above information will help us understand and/or reproduce what you see. Thx
Potential causes of the rendering issues:
BPMNDI
part of the BPMN XML source. Possible workaround: use the ModelFilter
option when loading the diagram (see https://github.com/process-analytics/bpmn-visualization-js/blob/v0.33.0/src/component/options.ts#L116-L119)BPMNDI
. This is something that we already see in the past (#2253). This may be workaround if we implement #2469, but the cause of the issue is in the BPMN source, not in bpmn-visualization
.Any diagram that is exported from Bizagi, this ends up happening, the ones that are exported from camunda work correctly, the colors placed by css class, i just did a quick-start, put this diagram exported from Bizagi and this happened
Thanks for this first set of information.
Can you please share any of the diagrams you mentioned so I can test them with bpmn-visualization
and other BPMN modelers and viewers?
Thx
Same diagram but one is imported from Bizagi another from Camunda
@tbouffard
do you have any idea what it could be?
Hi @sleeptd2
I have been able to reproduce what you mentioned with the provided diagram and https://cdn.statically.io/gh/process-analytics/bpmn-visualization-examples/v0.33.0/examples/misc/compare-with-bpmn-js/index.html. This is the example that let us compare the BPMN rendering of bpmn-visualization
and bpmn-js
.
bpmn-js@11.1.1 |
bpmn-visualization@0.33.0 |
---|---|
The rendering issue you mentioned is the same with both bpmn-visualization
and bpmn-js
.
The problem is with the content of the diagram, not with the way the two libraries handle the rendering (see below for more details).
If Bizagi exports it this way and you have only modeled one process/participant in the tool, there is probably a problem with Bizagi. Otherwise, you may have made an unwanted and undetected change while using Bizagi, which created the problem.
The model contains 2 participants
<participant id="Id_3e8a82a9-2c3b-4b88-b928-bd0bf1131343" name="Processo principal" processRef="Id_deea4171-154c-4a86-b221-19cdfdbd694c">
<participant id="Id_2cc4ca13-3507-4512-b2ad-9c564f686ac2" name="Processo" processRef="Id_23cc42fc-17a7-46d8-9eae-9ed2ee354f11">
Both processRef are valid and the participants both have a related BPMNShape. So they must be rendered.
The positions of the pools are very close (x and y) and the dimensions are the same, so they overlap
<Bounds x="30" y="30" width="700" height="350" ...>
<Bounds x="5" y="4" width="700" height="350"
Pool: the default fill color is
Pool fonts: bpmn-visualization respects the LabelStyle whereas bpmn-js doesn't. Both pools reference a LabelStyle defining
<Font name="Segoe UI" size="10" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false
Position of Label of the tasks The Label positions of the tasks are outside of the Task themselves in the BPMN source.
For instance, see the "Tarefa 1" BPMNShape
<BPMNShape id="DiagramElement_689aeebb-bd50-432e-9912-78fce30e43b0" bpmnElement="Id_e21d8d76-9530-4f0b-a371-be61cc6a61df">
<extension xmlns="http://www.omg.org/spec/DD/20100524/DI" />
<Bounds x="218" y="139" width="90" height="60" xmlns="http://www.omg.org/spec/DD/20100524/DC" />
<BPMNLabel id="DiagramElement_5fb0a30a-49b2-4433-afc1-30dfabb16f0d" labelStyle="Style_e7c5fb1b-44ad-4689-b619-84fc19ce4914">
<extension xmlns="http://www.omg.org/spec/DD/20100524/DI" />
<Bounds x="0" y="0" width="90" height="60" xmlns="http://www.omg.org/spec/DD/20100524/DC" />
</BPMNLabel>
</BPMNShape>
bpmn-visualization
Note: these are only workaround, the best way to fix the problem is to fix the BPMN source.
The workaround is exactly what I described in https://github.com/process-analytics/bpmn-visualization-js/issues/2590#issuecomment-1481342256
Displaying a single Pool
If you want to only display the "Processo principal", you use the ModelFilter
option when loading the diagram (see bpmn-visualization-js/options.ts at v0.33.0 · process-analytics/bpmn-visualization-js · GitHub) to filter the pool.
bpmnVisualization.load(xml, {
modelFilter: {
pools: {
name: 'Processo principal'
},
});
About the task whose label is displayed on the top left of the pool.
The label bounds is wrong in the BPMNDI
. This is something that we already saw in the past (#2253). This may be workaround if we implement #2469. Please vote for it if you cannot fix the BPMN source.
If you want bpmn-visualization
to ignore the LabelStyle because you cannot change the font of the pool (font family, bold) in the BPMN source, please vote for #2468.
Got it, thanks for the support I'll try those alternatives
how i can fixed this?