Swim Lanes in Activity diagram
The Activity diagrams in Object Oriented Design are just like the flow carts that show the sequence of steps that make up a complex process, such as an algorithm or workflow. Activity diagram are most useful during the initial stages of the design phase.
An example of the activity diagram for “TICKET VENDING MACHINE” is as shown below:
The above activity diagram does not show which organisation performs a particular activity
Swimlanes are used to show which activities are performed by which organisation in the activity diagram. The lanes are boundaries are drawn and the activities of a particular organisation are drawn in the same lane as that of the organisation. Swimlanes have to be ordered in a Logical Manner. It is suggested to have less than five swimlanes in an activity diagram. Swimlanes are good in that they combine the activity diagram’s depiction of logic with the interaction diagram’s depiction of responsibility.
The above activity diagram for “TICKET VENDING MACHINE” with the swimlanes is shown below: