Swimlane
What is a Swimlane in UML?
In UML Activity Diagram, a swimlane is a visual element used to delineate who or what is responsible for specific parts of a process. It helps in organizing activities and making the diagram more readable by grouping tasks into horizontal or vertical sections. Each swimlane represents a different actor, department, or system involved in the process, making it easier to see the flow of activities and the interactions between different participants.
Swimlane Notation
Swimlanes are depicted using rectangles. The name of the swimlane is separated from its content by a line. Swimlanes can be oriented either vertically or horizontally:
- Vertical Swimlanes: The name is displayed at the top of the swimlane.
- Horizontal Swimlanes: The name is displayed on the left side, with the text rotated by 90°.
This flexible orientation allows for better fitting of the swimlanes into the overall diagram layout.
Closed Border Option
Swimlanes can have either open or closed bottom/right parts of their rectangles. Users can switch between these two visual styles using the context menu. To change this setting, right-click on the swimlane and select "Closed Border" from the menu options. This feature allows for greater control over the visual presentation of the swimlane, depending on the specific needs of the diagram.
Pinned Swimlane Header
For diagrams with very long swimlanes that extend beyond the visible screen area, it can be helpful to keep the header always visible. Software Ideas Modeler allows users to pin the swimlane header. This feature ensures that the header remains visible even when scrolling through the diagram.
In Software Ideas Modeler, the headers can be pinned this way:
- Navigate to the View tab in the ribbon.
- Check the Pin Container Headers button in the Indicators group.
Changing Swimlane Orientation
There are two ways to change the orientation of swimlanes:
- Using the context bar button Switch Orientation: This changes only the orientation of the swimlane without altering its content or bounds.
- Using the Transpose feature: This changes the orientation of one or multiple swimlanes, including their content. This option is typically available in the "Design" tab of the ribbon under the "Placement" group. This feature is useful when re-organizing the layout of complex diagrams.
Adding Swimlanes
Swimlanes can be added to a diagram in several ways:
- From the Toolbox: Double-click on the swimlane button, drag the button to the diagram canvas, or specify the bounds by dragging diagonally from one corner to another.
- Adding Additional Swimlanes: Use the context bar. Select an existing swimlane and click on the Add Swimlane button in the context bar. This adds another vertical swimlane to the right or a horizontal swimlane below the selected one, maintaining the same size as the original.
Collapsing and Expanding Swimlanes
Swimlanes can be collapsed to save space in complex diagrams. When collapsed, the swimlane element will shrink to the size of its header, hiding all nested elements such as actions and decisions.
To collapse/expand a swimlane, use the buttons in the context bar:
- Collapse: Use the Collapse button in the context bar to reduce the swimlane to the size of its header, hiding all nested elements (actions, decisions, etc.).
- Expand: Use the Expand button in the context bar to restore the swimlane to its original size, making the hidden nested elements visible again.
New Comment