-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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: improve handling of compensation association #2039
Conversation
6cad5af
to
a4b94e1
Compare
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.
I integration tested this and indeed it feels like an overall less blocking UX, which is a major improvement.
What I found is a couple of quirks:
When transforming to a compensation boundary event the connection turns into an undirected association, where I'd expect a directed association. Expected: We use directed association and the task turns into a compensation task.
Existing sequence flows are not removed, despite being illegal for compensation tasks. Expected: Remove all other existing connections.
Expected: Preview reflects future association layout.
Thanks for looking into this @nikku. I'm going to look into all these details tomorrow |
✅ This was a bug fixed via aa2fd41
✅
Nope, doesn't affect text annotations |
lib/features/modeling/behavior/CompensateBoundaryEventBehaviour.js
Outdated
Show resolved
Hide resolved
lib/features/modeling/behavior/CompensateBoundaryEventBehaviour.js
Outdated
Show resolved
Hide resolved
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.
b91090c
to
134eef7
Compare
Agreed with @barmac that he would take a look at this |
7aa3703
to
ed0168c
Compare
Another edge case found ;): Screen.Recording.2023-12-18.at.18.34.41.mov |
There is more: Screen.Recording.2023-12-18.at.18.37.29.mov |
However, I got the basic interaction to work: Screen.Recording.2023-12-18.at.18.40.07.mov |
This is an old issue, so I will create a separate issue for this. |
bc30eda
to
4e84d70
Compare
I retargetted this to |
|
||
// newSource no longer valid | ||
if (isForCompensation(target) && !isCompensationBoundaryEvent(newSource)) { | ||
removeIsForCompensationProperty(target); |
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.
What scenario did we not cover here?
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.
I am sorry, I don't understand the question. Can you make it more verbose?
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.
This line is not covered by tests, so I wonder which scenario this line represents that we do not not cover through tests.
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.
I will add test cases for that.
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.
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.
However, this can be recreated only when we forcefully reconnect start. It's not allowed by the rules.
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.
I will leave it out of scope, and remove the respective source code.
|
||
// newSource valid | ||
if (canBeForCompensation(target) && isCompensationBoundaryEvent(newSource)) { | ||
addIsForCompensationProperty(target); |
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.
What scenario did we not cover here?
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.
OK so I debugged it and source changes are handled via ReplaceConnectionBehavior. We don't need explicit compensation-specific code.
Association removal is handled in CompensateBoundaryEventBehavior.
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.
This works great!
From my point of view you can go ahead and merge this. Consider cleaning up the commits before. |
isForCompensation
on connect
when boundary event is turned replaced with compensate boundary event.
Closes #2038