Flow of Events

Use cases need to be documented with enough information to describe their functionality and provide the scenarios that the use case covers.  The documentation is in terms of what the use case provides and not how.  That will come later.  One useful document for a use case is called a Flow of Events.  This is documentation that provides a description of the activities involved to meet the required behavior.  It provides information such as the following:

  • When does the use case begin
  • What are the interactions
  • What are the different scenarios involved
  • When does the use case end
  • What type of data is required
  • What are the exception scenarios

For a given analysis, it is best to generate a consistent look to the documentation.  All use cases should be described using the same basic format.  For my own analysis, I use the following template:

X. Flow of Events for the (name) Use Case

X.1 Preconditions

X.2 Main Flow

X.3 Alternate (optional)

X.4 Exception Flows

Using this template create a Flow of Events for the Maintain Video Catalog Use Case.

1. Flow of Events for the Maintain Video Catalog Use Case

1.1  Preconditions

The Receive Video from Subscription Service use case must execute before this use case begins.

1.2  Main Flow

This use case begins when the Clerk executes the Video Catalog Maintenance system.  The system prompts the Clerk to select the desired option:  Add, Remove, Query, and Quit.

If the option selected is Add, the A-1: Add a Video alternate flow is performed.

If the option selected is Remove, the A-2:  Remove a Video alternate flow is performed

If the option selected is Query, the A-3:  Query Video alternate flow is performed

If the option selected is Quit, the use case ends.

1.3  Alternate Flows

A-1: Add a Video

The system displays the video screen containing video information.  This form should include the video's UPC, Title, Quantity, and cost.  The clerk should enter the video's UPC code.  If the video exists, the system should bring it up for modification.  The clerk can enter the video title and other information including the new quantity.  The use case then begins again.

A-2: Remove a Video

The system displays the video screen containing video information.  The clerk should enter the video's UPC code (E-1).  The clerk should update the quantity field (E-2).  If the quantity is 0, the system will remove the video.  The use case then begins again.

A-3: Query Video

The system displays the video screen containing video information.  The clerk should enter the video's UPC code (E-1).  The system will display the current video information.  The use case then begins again.

1.4  Exception Flows

E-1: An invalid video UPC code is entered.  The clerk can re-enter a UPC code or terminate the use case.

E-2: An invalid quantity is entered.  The clerk can re-enter the Quantity or terminate the use case.

This is a first cut at a use case description.  Iterative development will yield more scenarios and alternative flows.  The objective is to capture as many of the requirements needed to begin a useful design.  Repeat this exercise for all use cases that have been defined to this point.  Doing so will give a better and more complete understanding of the system requirements.