bpmn-visualization-js icon indicating copy to clipboard operation
bpmn-visualization-js copied to clipboard

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

Open csouchet opened this issue 3 years ago • 1 comments
trafficstars

Describe the bug Currently, in [email protected], 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):

  • Version 0.25.3, 0.26.0

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

  • 7 tests failed in BpmnJsonParser.lane.test.ts
  • no error in the integration tests
  • no error in the e2e tests

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

csouchet avatar Aug 19 '22 13:08 csouchet

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. 🤟🏿

tbouffard avatar Aug 19 '22 14:08 tbouffard