Skip to content

Conversation

@timonlazarviadee
Copy link

@timonlazarviadee timonlazarviadee commented Oct 28, 2025

Proposed Changes

This pull request addresses the following issue: bpmn-io/bpmn-js#1929

It improves the handling of artifacts placed within swimminglanes in BPMN diagrams.

  • When an artifact is positioned within a single swimminglane, it now correctly sticks to that lane.
  • When an artifact overlaps multiple swimminglanes, it will not be assigned to any lane, ensuring consistent and predictable behavior.

Examples
Artifact sticking to the swimminglane:
https://github.com/user-attachments/assets/d3361f0d-3e17-4fab-976f-9e0612f59069

Artifact does not stick to any swimminglane:
https://github.com/user-attachments/assets/737d6b8f-ea43-40c5-ac6f-639e78119f29

Checklist

To ensure you provided everything we need to look at your PR:

  • Brief textual description of the changes present
  • Visual demo attached
  • Steps to try out present, i.e. using the @bpmn-io/sr tool
  • Related issue linked via Closes {LINK_TO_ISSUE} or Related to {LINK_TO_ISSUE}

@barmac barmac force-pushed the 1929-treating-groups-as-artifacts branch from 6b4c114 to 5fe1073 Compare October 28, 2025 15:03
@philippfromme
Copy link
Contributor

The group also moves when it's not contained in the participant:

brave_svHwfnlDfE

I would the fix to also work for artifacts like labels:

brave_MB5Sl3on1P

Besides, I was wondering if we want to implement it this way. Shouldn't the artifacts be moved to the appropriate parent when created/moved as mentioned here: #1929 (comment) This is not what the pull request implements. 🤔

@timonlazarviadee
Copy link
Author

The group also moves when it's not contained in the participant:

brave_svHwfnlDfE brave_svHwfnlDfE

I would the fix to also work for artifacts like labels:

brave_MB5Sl3on1P brave_MB5Sl3on1P

Besides, I was wondering if we want to implement it this way. Shouldn't the artifacts be moved to the appropriate parent when created/moved as mentioned here: #1929 (comment) This is not what the pull request implements. 🤔

@timonlazarviadee
Copy link
Author

Basically, I tried to attach the artifacts to the process, but they did not remain consistent. Furthermore, there was no direct way to evaluate them (in terms of size and coordinates). Therefore, I recommended attaching the artifacts in DiagramJs to the shape.move.start event. If there is another place where artifacts and their respective attributes can be evaluated, please let me know.

@timonlazarviadee
Copy link
Author

I understood the comment https://github.com/bpmn-io/bpmn-js/issues/1929#issuecomment-1630818863 to mean that the group is included if it overlaps. It seems that what is meant here is that the group should be enclosed by the Group. Am I understanding this correctly?

@philippfromme
Copy link
Contributor

I understood the comment https://github.com/bpmn-io/bpmn-js/issues/1929#issuecomment-1630818863 to mean that the group is included if it overlaps. It seems that what is meant here is that the group should be enclosed by the Group. Am I understanding this correctly?

This is something we can discuss. In my opinion, if it's not clearly inside a container it should not move. 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants