Creating swimlanes

To use swimlanes in an activity diagram, you first need to create a swimlane frame. If you do not, Rhapsody® generates an error message.

About this task

Note: There can be only one swimlane frame in an activity diagram. Once you have created a frame, the Swimlane Frame tool is unavailable.

Procedure

  1. Click the Swimlane Frame button Swimlane Frame button on Diagram Tools.
  2. The cursor turns into crosshairs. In the drawing area, click at the point to draw the swimlane frame (a box).
  3. Click the Swimlane Divider button Swimlane Divider button on Diagram Tools.
  4. The cursor turns into a vertical bar. When it is at the intended location, left-click to place the divider. The product creates two swimlanes, named swimlane_n and swimlane_n+1, where n is an incremental integer starting at 0.

    If you draw another divider, it divides the existing swimlane into two swimlanes, with the new swimlane positioned to the left of the divider.
    Note: You cannot draw a swimlane on an existing state.
  5. If wanted, rename the swimlanes using the Features window.

Results

Note the following information:

  • Swimlanes have a minimum width. If you enlarge a swimlane, the extra space is added to the right of the swimlane. To resize a swimlane, move the divider horizonntally.
  • If a swimlane contains activity diagram elements, you cannot reduce the size of that swimlane so its divider is positioned to the left of any of those elements, because that would force the elements into a different swimlane.
  • A swimlane maps into a partition of states in the activity diagram. A state symbol in a swimlane cases the corresponding state to belong to the corresponding partition.
  • When you delete the swimlane frame, you also delete all of its swimlanes, but the elements they contained still exist in the activity diagram.