feat: introduce CasePathResolver#142
Conversation
It is dedicated to path resolution of a single instance/case of a process. Given a set of elements considered as completed, it is currently able to compute the edges between the provided shapes and the shapes around the provided edges. In addition - refactor the constructor of `PathResolver`: it now only accepts a `ElementsRegistry` parameter Previously, it required a `BpmnElementsRegistry` object which is not needed as the implementation only needs to access to the methods related to the model. - main README: add link to the sources of the demo
|
♻️ PR Preview d065c70 has been successfully destroyed since this PR has been closed. 🤖 By surge-preview |
[no ci]
| import type { EdgeBpmnSemantic, ElementsRegistry, ShapeBpmnSemantic } from 'bpmn-visualization'; | ||
|
|
||
| // bpmn-visualization does not filter duplicates when passing an ids several times | ||
| const filterDuplicates = (ids: string[]): string[] => [...new Set(ids)]; |
There was a problem hiding this comment.
thought: IMHO this is a bug in bpmn-visualization that we should fix. It applies to all methods of ElementsRegistry taking ids or kinds.
What do you think @csouchet?
If so, I will create an issue.
There was a problem hiding this comment.
Indeed, the bpmn-visualization APIs should check the uniqueness of the parameter
There was a problem hiding this comment.
Fine, before merging this PR, I am going to create a dedicated issue in bpmn-visualization and another one in bv-experimental-add-ons to update the implementation when the fix is available in a new release of bpmn-visualization.
There was a problem hiding this comment.
Bug created: process-analytics/bpmn-visualization-js#2921
Refactor task created: #150
|
Putting in draft, waiting for creating issues related to duplicated results returned by the |
|
Kudos, SonarCloud Quality Gate passed!
|









This new class is dedicated to path resolution of a single instance/case of a process.
Given a set of elements considered as completed, it is currently able to compute the edges between the provided shapes and the shapes around the provided edges.
This is the first step towards the implementation of more intelligent computing in the future.
In addition
PathResolver: it now only accepts aElementsRegistryparameter Previously, it required aBpmnElementsRegistryobject which is not needed as the implementation only needs to access to the methods related to the model.Covers #16
Closes #22
Covers #24
Notes about the types introduced in this PR
The types of the parameter and the returned value are defined to correspond to the state of the final implementation as it is known today. There should be no discussion of types in this PR as the API is not finalized.
What follows is the current proposal with an overview of the structure. It does not mean that the final implementation will be like this (in particular, do not debate now about a pseudo duplication in the type definition, it is too early as the types may change).