Chapter 9. A Walk through the Diagrams

Table of Contents
Use Case Diagrams
Class Diagrams
Object Diagrams
Activity Diagrams
State Diagrams
Sequence Diagrams
Collaboration Diagrams
Component Diagrams
Deployment Diagrams

There is a lot to say about when to use which diagram type when developing a design, and what the role of it should be. The different answers to this are referred to as the design process or design method. This document is not intended to describe a concrete design process. Poseidon for UML can be used for any such process. Instead, in this chapter we will look at the various diagram types and how the corresponding model elements are created or edited in Poseidon. For many of these diagrams, a short example has already been given in the default model Softsale, which we looked at in Chapter 6.

Use Case Diagrams

The first diagram to look at is the Use Case diagram. The main ingredients for this type of diagram are use cases and actors, together they define the roles that users can play within a system. They are associated to the tasks, these are use cases, they are involved in. It is often used in early stages of the design process to collect the intention requirements of a project.

If you are not well-acquainted with UML yet, remember that a use case is not just a bubble noted in the diagram. Along with this bubble, there should be a description of the use case, a typical scenario, exceptional cases, preconditions etc. These can either be expressed in external texts using regular text processing tools, requirements tools or file cards. It can be and is often refined using other diagrams like a sequence diagram or an activity diagram that explain its main scenarios. The basic description of a use case can also be inserted in the Documentation tab of the Details pane.

Figure 9-1. A Use Case Diagram.

Diagram Elements

  • Actors — Also referred to as Roles. Name and stereotype of an actor can be changed in its Properties tab.

  • Inheritance — Refinement relations between actors. This relation can carry a name and a stereotype.

  • Use cases — These can have Extension Points.

  • Extension Points — This defines a location where an extension can be added.

  • Associations — Between roles and use cases. It is useful to give associations speaking names.

  • Dependencies — Between use cases. Dependencies often have a stereotype to better define the role of the dependency. To select a stereotype, select the dependency from the diagram or the Navigation pane, then change the stereotype in the Properties tab. There are two special kinds of dependencies: <<extend>> and <<include>>, for which Poseidon offers own buttons (see below).

  • Extend relationship — A uni-directional relationship between two use cases. An extend relationship between use case B and use case A means that the behavior of B can be included in A.

  • Include relationship — A uni-directional relationship between two use cases. Such a relationship between use cases A and B means, that the behavior of B is always included in A.

  • System border — The system border is actually not implemented as model element in Poseidon for UML. You can simply draw a rectangle, send it to the background and use it as system border by putting all corresponding use cases inside the rectangle.

Toolbar

Select

Broom

Package

Actor

Use Case

Add Extension Point

Association

Generalization

Dependency

Extend

Include

Collaboration

Classifier Role

Realization

Rectangle

Rounded Rectangle

Circle

Line

Text

Polygon

Spline

Ink