[读书笔记-- Learning UML 2.0, OReilly, April 2006] Use case diagram

 

读书笔记: Learning UML 2.0, OReilly, April 2006
 
(一) Use case diagram
 
Rule of thumb to specify a Use Case:
A use case is something that provides some measurable result to the user or an external system.
 
Approaches:
1.       Capture an initial set of actors;
2.       Find cases where the system is used to complete a specific job;
 
Use case descriptions:
Table 2-1. Some types of information that you can include in your use case descriptions

Use case description detail

What the detail means and why it is useful

Related Requirements

Some indication as to which requirements this use case partially or completely fulfills.

Goal In Context

The use case's place within the system and why this use case is important.

Preconditions

What needs to happen before the use case can be executed.

Successful End Condition

What the system's condition should be if the use case executes successfully.

Failed End Condition

What the system's condition should be if the use case fails to execute successfully.

Primary Actors

The main actors that participate in the use case. Often includes the actors that trigger or directly receive information from a use case's execution.

Secondary Actors

Actors that participate but are not the main players in a use case's execution.

Trigger

The event triggered by an actor that causes the use case to execute.

Main Flow

The place to describe each of the important steps in a use case's normal execution.

Extensions

A description of any alternative steps from the ones described in the Main Flow.


Example:
Table 2-2. A complete use case description for the "Create a new Blog Account" use case

Use case name

Create a new Blog Account

Related Requirements

Requirement A.1.

Goal In Context

A new or existing author requests a new blog account from the Administrator.

Preconditions

The system is limited to recognized authors and so the author needs to have appropriate proof of identity.

Successful End Condition

A new blog account is created for the author.

Failed End Condition

The application for a new blog account is rejected.

Primary Actors

Administrator.

 

Secondary Actors

Author Credentials Database.

 

Trigger

The Administrator asks the CMS to create a new blog account.

Main Flow

Step

Action

 

1

The Administrator asks the system to create a new blog account.

 

2

The Administrator selects an account type.

 

3

The Administrator enters the author's details.

 

4

The author's details are verified using the Author Credentials Database.

 

5

The new blog account is created.

 

6

A summary of the new blog account's details are emailed to the author.

Extensions

Step

Branching Action

 

4.1

The Author Credentials Database does not verify the author's details.

 

4.2

The author's new blog account application is rejected.

 
2.2.       Use Case Relationships
2.2.1.     The <<include>> Relationship
2.2.2.     Special Cases
   2.2.3.    The <<extend>> Relationship

 
 
2.3  Use Case Overview Diagrams
           Use Case Overview diagrams give you an opportunity to paint a broad picture of your system's context or domain. Unfortunately, Use Case Overviews are badly named as they don't usually contain any use cases…. they are more a placeholder and starting point to for the rest of your model's detail.

你可能感兴趣的:([读书笔记-- Learning UML 2.0, OReilly, April 2006] Use case diagram)