Home
Username:
Password:
UML Tutorials

Sequence Diagrams / Sequence Diagrams & Use Cases




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

This movie looks at the relationship between use case diagrams and sequence diagrams. Use case diagrams as you may recall show the goals that various actors have in interacting with the system. But a use case diagram doesn't give any details about how those goals are achieved. Because sequence diagrams represent participant interactions over time you can use sequence diagrams to show how a use case is executed and one sequence diagram typically represents the flow of events for one individual use case. So here's a familiar looking use case diagram, this is for a shipping company that is creating a system that will allow its customers to do various things online. And this would just be a part of the system, we're just gonna focus on the customer as the primary actor, there would of course be other actors and other use cases. But just for simplicity sake we are going to focus on the customer as the primary actor. So in interacting with the system the customer might have these goals, order pick up, track a package or reschedule a delivery. So we know what some of the different goals are that the customer has in interacting with the system, just looking at this diagram we don't have any idea of how those goals are achieved. You would have to go and look at the specification and look up the written use cases to get some idea of how the customer would for example track a package. Now you can use those written use cases as a starting point for creating a sequence diagram that will show visually the interactions that are necessary for this goal, this user level goal of tracking a package to be achieved. So let's do that for the track a package use case, the first thing we need to do in our sequence diagram is to identify our participants. Now we already know from the use case diagram that the customer is the primary actor whose goal it is to track a package so who kicks of the use case. So that would be our first participant and we want to indicate that the customer is an actor. And we know that the customer is going to track a package by interacting with a web application so that will be another participant. And when you ask well how is the web application going to look up that information we also need a tracking database. So that would be our third participant. So since we know the customer is a primary actor the customer is going to be the one who starts things off and will send the first message. So the customer sends the message to the web application of track package passing the tracking number through the web application. When the web application receives this message it sends the message in turn to the tracking database and let's say get package location. The tracking database sends the return message with the package location and when the web application receives the return message the web application sends its return message back to the customer giving the package location. So the goal that we identified with the use case here we show the interactions and the participants that are necessary in order for that goal to be achieved for that use case to be successfully accomplished. Notice that what we've shown here is the happy path, the normal flow of events or the main success scenario of how the system should work. Use sequence diagrams to document use case scenarios. Sequence diagrams may help you find necessary interactions that the written use case didn't capture. Additionally during the analysis phase sequence diagrams can help you capture required objects. Later on in the development life cycle you can use sequence diagrams to verify object use and here as you can see we brought that track a package use case to life by showing how the various participants interact in order to satisfy that use case.

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