Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEAT] Include links between edges and shapes in the internal model #2503

Closed
4 tasks done
Tracked by #2402
tbouffard opened this issue Feb 1, 2023 · 0 comments · Fixed by #2520
Closed
4 tasks done
Tracked by #2402

[FEAT] Include links between edges and shapes in the internal model #2503

tbouffard opened this issue Feb 1, 2023 · 0 comments · Fixed by #2520
Assignees
Labels
BPMN support Something about the BPMN specification that the lib is already supporting or will support enhancement New feature or request
Milestone

Comments

@tbouffard
Copy link
Member

tbouffard commented Feb 1, 2023

Is your feature request related to a problem? Please describe.
In the semantic part of the BPMN diagram:

  • the flow node elements (represented by shapes) have the list of their incoming and outgoing flows (represented by edges). See incoming and outgoing attributes in the BPMN semantic.
  • the flows have their source and target flownodes. See sourceRef and targetRef attributes in the BPMN semantic.

This information can help navigating in the graph/paths of the diagram.
Currently, in version 0.29.2, we store the source and target reference for flows. See https://github.com/process-analytics/bpmn-visualization-js/blob/v0.30.0/src/model/bpmn/internal/edge/flows.ts#L22-L24
But don't store this information for incoming/outgoing flows of flownodes. Having such information would leverage new features related to paths computation (see #930) or let users get more information for subsequent processing when retrieving a specific element via the existing API (see #929 and #2504).

Describe the solution you'd like
When parsing the diagram, retrieve the links between flownodes and flows and store them in the internal model.

As a first implementation, the shape-edge relationship will be described by providing the ids of the elements, not the objects.
This is what is needed to implement #2504.
The model is internal and not part of the public API. So, the way we provide the links may change at any time without prior notice.

Describe alternatives you've considered
This issue is mandatory for the implementation of several features that are needed to be able to support monitoring and path based use-cases.

Tasks

  • ensure all parsing tests are updated prior implementing. Do it "à la TDD" to not miss any elements
  • list in the PR the number of unit tests that were added
  • implementation
  • update the schema of the internal model
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BPMN support Something about the BPMN specification that the lib is already supporting or will support enhancement New feature or request
Projects
Archived in project
1 participant