Home
Username:
Password:
UML Tutorials

Activity Diagrams / Using Swim Lanes




Visitors to VTC.com will be able to view all introductory videos for each training course.
Free Trial Members will gain access to first three chapters for each training course.
Full Access Members have full access to VTC.com’s entire library of video tutorials.


Learn More

Subtitles of the Movie

Activity diagrams such as this one show a process or activity but they don't show who is responsible for each action and as you can see here we have an activity diagram that shows the process for registering for a class. We have actions that include request class, check eligibility, we have a decision point if the student is eligible we move on to check availability if the student is not eligible we deny enrollment and send a denial notice. Down here with check availability we have another decision point where if the class is available the student enrolls in the class if the class is not available again we send another denial notice. Once the student is enrolled in the class we send the schedule, the schedule is received and that's the end of our process. So this shows very clearly the actions involved in registering for a class but there is no information at all about who does which action. So when you want to visual roles to show which actor or domain does what in an activity diagram you want to add partitions and these are called informally swim lanes and this is what a swim lane activity diagram looks like. We have our two partitions here and each of those partitions belongs to a particular role, we have the student and we have the registrar. Each swim lane contains the activity done by that role by that actor. So we have the student starting things off by requesting a class and then things pass over to the registrar's office and we have the same actions that we had in the previous diagram. The two swim lanes means that they are laid out a little bit differently but you can see that the information is the same, we have our decision point and what to do if the student is eligible or not eligible. We have another decision point, what the to do if the class is available or not available. We have a denial that gets sent or we have a schedule that gets sent depending on how the data flows through these various actions. And it makes it very clear who does what. Notice that flows can move easily from one lane to other and you can also pass objects from one lane to the other. For example down here where the registrar's office sends the schedule to the student who receives the schedule we have a schedule object that is passed from one domain to the other. Swim lanes can be vertical as in this example or they can be horizontal. It depends on your own preferences and what makes your diagram look better. So this is an example of vertical swim lanes but you could do the exact same diagram in a different layout by making your swim lanes horizontal. So swim lanes adds another dimension of information to your activity diagram. Swim lanes show roles who does what. You can also use a two dimensional grid to add yet another dimension of information. What if you have a role whose responsibilities are shared among say several different locations? You might have a home office and then branch offices that have similar roles but different responsibilities or in our university example you might have a main campus that teaches mostly traditional students and a satellite campus that teaches mostly continuing education students. Can you use swim lanes to show that? Yes you can and this is what it looks like. We have our role swim lanes and here they are arranged vertically. We have administration and faculty as two different roles that will take part in this process. And then we have horizontal swim lanes that show location, main campus and satellite campus. So this has to do with devising and implementing a new policy, the administration of the main campus starts the ball rolling by drafting a policy and then their counterpart the administration on the satellite campus reviews that policy. The main campus administration finalizes the policy to produce a policy document so we have this object here and that gets passed to the faculty. The faculty in the main campus implements that policy for traditional students; the faculty in the satellite campus implements the policy for continuing education students. So this kind of multidimensional grid showing two sets of partitions was new in UML 2.0 and it adds a whole new dimension of information to help you show who does what in an activity diagram.

Tutorial Information

Course: UML
Author: Nancy Conner
SKU: 33815
ISBN: 1-934743-23-2
Release Date: 2007-10-26
Duration: 7 hrs / 95 lessons
Captions: For Online University members only
Compatibility: Vista/XP/2000, OS X, Linux
QuickTime 7, Flash 8

VTC Sign up & Benefits

  • Unlimited Access
  • 98,729 Video Tutorials (23,265 free)
  • Video Available as Flash or QuickTime
  • Over 1026 Courses
  • $30 for One Month Access
  • Multi-User Discounts Available