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

Add initial pool and swimlane implementation #314

Merged
merged 17 commits into from
Nov 17, 2023

Conversation

matthiaslehnertum
Copy link
Collaborator

@matthiaslehnertum matthiaslehnertum commented Oct 24, 2023

This PR intends to add support for pools and swimlanes to the BPMN diagram type.

Checklist

  • I documented the TypeScript code using JSDoc style.
  • I added multiple screenshots/screencasts of my UI changes
  • I translated all the newly inserted strings into German and English

Motivation and Context

Pools are swimlanes are central components of the BPMN standard, allowing to model activities of different operators and their exchanges.

Description

Pools are added to the BPMN diagram type as a new entity type with the ability to add swimlane within it.

Steps for Testing

  1. Select the BPMN diagram type
  2. Drop a pool element onto the canvas
  3. Double click on the pool element
  4. Add a few swimlanes
  5. Try resizing the swimlanes
  6. Add elements within the swimlanes and connect them
  7. Delete one of the swimlanes

Test Coverage

File % Stmts % Branch % Funcs % Lines
main/packages/bpmn/bpmn-pool 49.58 100 40 49.58
bpmn-pool-component.tsx 100 100 100 100
bpmn-pool-update.tsx 38.4 100 0 38.4
bpmn-pool.ts 40.32 100 50 40.32
main/packages/bpmn/bpmn-swimlane 89.65 100 66.66 89.65
bpmn-swimlane-component.tsx 100 100 100 100
bpmn-swimlane.ts 81.81 100 50 81.81

Screenshots

Example of a BPMN diagram with a pool with multiple swimlanes
Screenshot 2023-10-24 at 16 42 42

Example of the update dialog of the pool that allows inserting additional swimlanes
Screenshot 2023-10-24 at 17 20 36

@matthiaslehnertum matthiaslehnertum changed the title Add initial swimlane implementation Add initial pool and swimlane implementation Oct 24, 2023
@matthiaslehnertum matthiaslehnertum marked this pull request as ready for review October 26, 2023 10:55
Copy link
Contributor

@loreanvictor loreanvictor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One final note: how can I disassociate a BPMN element from a pool? I can drag an element into a pool and they are associated (e.g. they move together), but dragging them outside of the pool won't disassociate the elements. This is in contrast to behaviour of similar elements in other diagram types (e.g. packages in class diagrams) where I can drag a child element out of a parent element to disassociate them.

@matthiaslehnertum
Copy link
Collaborator Author

@loreanvictor I would merge the Groups PR first - that one fixes the disassociation issue for the pools and swimlanes as well

matthiaslehnertum and others added 5 commits October 28, 2023 19:12
# Conflicts:
#	src/main/i18n/de.json
#	src/main/i18n/en.json
#	src/main/packages/bpmn/bpmn-diagram-preview.ts
#	src/main/packages/bpmn/index.ts
#	src/main/packages/components.ts
#	src/main/packages/popups.ts
#	src/main/packages/uml-elements.ts
#	src/tests/unit/packages/bpmn/bpmn-annotation/bpmn-annotation-component-test.tsx
#	src/tests/unit/packages/bpmn/bpmn-call-activity/bpmn-call-activity-component-test.tsx
#	src/tests/unit/packages/bpmn/bpmn-conversation/bpmn-conversation-component-test.tsx
#	src/tests/unit/packages/bpmn/bpmn-end-event/bpmn-end-event-component-test.tsx
#	src/tests/unit/packages/bpmn/bpmn-flow/bpmn-flow-component-test.tsx
#	src/tests/unit/packages/bpmn/bpmn-gateway/bpmn-gateway-component-test.tsx
#	src/tests/unit/packages/bpmn/bpmn-intermediate-event/bpmn-intermediate-event-component-test.tsx
#	src/tests/unit/packages/bpmn/bpmn-start-event/bpmn-start-event-component-test.tsx
#	src/tests/unit/packages/bpmn/bpmn-subprocess/bpmn-subprocess-component-test.tsx
#	src/tests/unit/packages/bpmn/bpmn-task/bpmn-task-component-test.tsx
#	src/tests/unit/packages/bpmn/bpmn-transaction/bpmn-transaction-component-test.tsx
Copy link
Contributor

@AlexanderG2207 AlexanderG2207 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything works well locally with adding lanes and adding elements to the lanes. However, the resizing of the pool gives me issues, especially when trying to resize the bottom lane.

Screenshot 2023-10-30 at 19 17 24

# Conflicts:
#	src/main/i18n/de.json
#	src/main/i18n/en.json
#	src/main/packages/bpmn/bpmn-diagram-preview.ts
#	src/main/packages/bpmn/index.ts
#	src/main/packages/components.ts
#	src/main/packages/uml-elements.ts
Copy link
Contributor

@loreanvictor loreanvictor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a few issues I've found on:

  • the zoomFactor property error appears again, perhaps it was fixed on some other elements? it happens when adding a pool.

    Screenshot 2023-11-02 at 12 46 47
  • management of lanes in a pool differs from management of other "child elements": to add a lane you need to double click on the pool and add them via the context menu, but to manage lanes you need to select lanes individually.

    Screenshot 2023-11-02 at 12 47 40

    this is in contrast to other elements with children, for example attributes on a class, where the context menu allows adding AND managing children (which seems more intuitive).

    Screenshot 2023-11-02 at 12 48 07

    of course this second point is a UX issue not an actual issue, so it could also be further discussed and if it really needs to be changed / updated, that can happen via a subsequent PR.

p.s. in addition to these issues, one of the tests is still failing.

Copy link
Contributor

@loreanvictor loreanvictor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok all the previous issues are nicely resolved and the tests are passing, manual testing also seems to be fine with the pools and lanes, etc.

@matthiaslehnertum matthiaslehnertum merged commit e0303b5 into develop Nov 17, 2023
3 checks passed
@matthiaslehnertum matthiaslehnertum deleted the feature/swimlanes branch November 17, 2023 11:03
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.

3 participants