Username:
Password:
UML Tutorials

Types of Diagrams: An Overview / State & Activity Diagrams

Subtitles of the Movie

In this movie, we'll talk about state diagrams and activity diagrams, both of which offer a dynamic view of your system. On your screen you see an example of a state diagram, state diagrams are also called state chart and state machine diagrams and what they show is a system's behavior. In particular state diagrams show how the system behaves in response to some external stimulus and they're useful for showing functionalities and or business flows particularly in specialized areas of the system. As you can see here state diagrams consists of states in this sort of rounded box and transitions between the states which is an arrow that points from one state to another. Transitions can be labeled with an event, its argument, a condition, and an action. So they can convey a lot of information about how the system makes its transition from one state to the next. You can have super states which contain sub states as you see here. And these diagrams also show something called pseudo states, a pseudo state is the kind of a marker, unlike a state it does not have variables or activities but it represents a sort of discernible point in the flow from one state to another. For example this symbol here is the initial pseudo state, its not a state in itself but it represents the starting point for the diagram. Similarly this is called the history pseudo state and I'm not going to go into the details of that now theres a movie on the history pseudo state. But like the initial pseudo state it represents a point in the state machine that is similar to the state but does not possess the variable and activities that a state does. One of the best uses for state diagrams is to illustrate the systems behavior across several use cases. So you can take your use case diagrams and create state diagrams to expand on those. Here's an example of an activity diagram. An activity diagram as I've said is also a dynamic view of the system and activities diagrams are similar to flow charts, they describe workflow, business processes or procedural logic of your system. In an activity diagram each activity consists of a series of actions and actions are represented again by these sort of laws and shaped symbols. Actions are connected by arrows that are called control flows and they show the direction of the flow in your activity diagram. Activity diagrams also show decision points, they're called decision nodes in the UML and points where the flow forks and then rejoins, comes back together. You have a starting point and then the flow through the various actions that make up the activity and then you end with the final node. You can if you want and as you can see in this diagram use swim lanes and UML swim lanes are called partitions and using swim lanes you can assign the different actions of the activity to different domains. Use UML activity diagrams where you would use a flow chart. Notice that these diagrams are great for showing parallel behavior and that's one of the best reasons to use them. And you can also use activity diagrams to illustrate individual use cases. A use case as you may recall indicates a user goal in interacting with the system so that user goal can be the activity and then the actions are the steps that are required for that activity to be accomplished.

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
  • 81,350 Video Tutorials (20,800 free)
  • Video Available as Flash or QuickTime
  • Over 782 Courses
  • $30 for One Month Access
  • Multi-User Discounts Available