ls1intum / Apollon

UML Modeling Editor written in React
https://apollon-library.readthedocs.io
MIT License
65 stars 22 forks source link

Add initial pool and swimlane implementation #314

Closed matthiaslehnertum closed 9 months ago

matthiaslehnertum commented 10 months ago

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

Checklist

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 commented 10 months ago

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