Use Cases Description
Overview
- The primary driver for all UML diagramming techniques.
- Depicts activities performed by the users.
- Describes basic functions of the system:
- What the user can do.
- How the system responds.
- Use cases are building blocks for continued design activities.
- Each use case describes one and only one function.
- Use Cases Description Examples
Purpose | Overview | Detail |
---|
Essential | High-level overview of issues essential to understanding required functionality | Detailed description of issues essential to understanding required functionality |
Real | High-level overview of a specific set of steps performed on the real system once implemented | Detailed description of a specific set of steps performed on the real system once implemented |
Use Case Writing Guidelines
- Write in the form of subject-verb-direct object.
- Make sure it is clear who the initiator of the step is.
- Write from an independent observer’s perspective.
- Write at about the same level of abstraction.
- Ensure the use case has a sensible set of steps.
- Apply the KISS principle liberally.
- Write repeating instructions after the set of steps to be repeated.
Creating Use-Case Descriptions
- Pick a high-priority use case and create an overview:
- List the primary actor.
- Determine its type (overview or detail; essential or real).
- List all stakeholders and their interests.
- Determine the level of importance of the use case.
- Briefly describe the use case.
- List what triggers the use case.
- List its relationship to other use cases.
- Fill in the steps of the normal flow of events required to complete the use case.
- Ensure that the steps listed are not too complicated or long and are consistent in size with other steps.
- Identify and write the alternate or exceptional flows.
- Carefully review the use case description and confirm that it is correct.
- Iterate over the entire set of steps again.
Elements of a Use Case Description
- Overview:
- Name, ID Number, Type, Primary Actor, Brief Description, Importance Level, Stakeholder(s), Trigger(s).
- Relationships:
- Association: Communication between the use case and the actors.
- Extend: Extends the functionality of a use case.
- Include: Includes another use case.
- Generalization: Allows use cases to support inheritance.
- Flow of Events:
- Normal flow: The usual set of activities.
- Sub-flows: Decomposed normal flows to simplify the use case.
- Alternate or exceptional flows: Those not considered the norm.
- Optional characteristics (complexity, time, etc.).
Verifying & Validating a Use Case
- Use cases must be verified and validated before beginning structural and behavioral modeling.
- Utilize a walkthrough:
- Perform a review of the models and diagrams created so far.
- Performed by individuals from the development team and the client (very interactive).
- Facilitator: Schedule and set up the meeting.
- Presenter: The one responsible for the specific representation being reviewed.
- Recorder (scribe): Takes notes and documents errors.
Rules for Verification & Validation
- Ensure one recorded event in the flows of the use case description for each action/activity on the activity diagram.
- All objects in an activity diagram must be mentioned in an event of the use case description.
- The sequence of the use case description should match the sequence in the activity diagram.
- One and only one description for each use case.
- All actors listed in a use case description must be shown on the use case diagram.
- Stakeholders listed in the use case description may be shown on the use case diagram (check local policy).
- All relationships in the use case description must be depicted on the use case diagram.
- All diagram-specific rules must be enforced.