To use swimlanes in an activity diagram, you first need
to create a swimlane frame. If you do not, IBM® Rational® 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
- Click the Swimlane Frame button
on Diagram
Tools.
- The cursor turns into crosshairs. In the
drawing area, click one corner to draw the swimlane frame (a box).
- Click the Swimlane Divider button
on Diagram Tools.
- 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.
- 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 to the left or the right.
- 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.