process-analytics / bpmn-visualization-js

A TypeScript library for visualizing process execution data on BPMN diagrams
https://process-analytics.github.io/bpmn-visualization-js/
Apache License 2.0
224 stars 31 forks source link

[BUG] Extra parsing of `lane` elements which are not in the BPMN spec #2188

Closed csouchet closed 1 year ago

csouchet commented 2 years ago

Describe the bug Currently, in bpmn-visualization@0.26.0, we parse the Lane from a LaneSet and from a Process directly. (See the ProcessConverter https://github.com/process-analytics/bpmn-visualization-js/blob/v0.26.0/src/component/parser/json/converter/ProcessConverter.ts#L95) However according to the BPMN specification, Lane lane is defined only within a LaneSet.

So, the Lanes are not parsed correctly.

To Reproduce Steps to reproduce the behavior:

  1. Load a bpmn file with a wrong format (lane directly in process and no laneset)
  2. See no error and the lane is display

Expected behavior The lane should be not displayed, and we should have a warning/error for the bad format.

Desktop (please complete the following information):

Additional context If we remove the bad parsing, there is:

BPMN Specification

image

When a Lane is defined it is contained within a LaneSet, which is contained within a Process.

image

ℹ️ For more information: https://www.omg.org/spec/BPMN/2.0.2/PDF

⚠️ Check the contribution guidelines for BPMN support

tbouffard commented 2 years ago

I have checked the reference files in the bpmn-miwg-test-suite repository. All the files that have lanes declare laneset > lane, never declare lanes directly.

If this is in the BPMN specification, this is what it was expected. With this is verification, this is for sure. 🤟🏿