-
Notifications
You must be signed in to change notification settings - Fork 0
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: 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, the bpmn-visualization
APIs should check the uniqueness of the parameter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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! 0 Bugs No Coverage information |
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 aElementsRegistry
parameter Previously, it required aBpmnElementsRegistry
object 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).