Professional Documents
Culture Documents
How To Use Use Cases
How To Use Use Cases
Overview
Many business analysts and business users get frustrated at the perceived lack of
information in a use case diagram. “It’s all very well drawing a picture” they say but what
about the details – what’s actually going on?
When producing project documentation, use case diagrams are rarely used on their own.
They will generally be accompanied by a textual use case and if they’re complex, may also
have a supporting activity diagram to show what’s going on “inside” the use case.
To keep things simple we’ll stick to use case diagrams and textual use cases. Textual use
cases can be both formal and informal. Try the following exercises (from IRM’s Modelling
Requirements with Use Case & the UML workshop) to test your skills. First we’ll draw a
use case diagram from a plain English description, then build on it using textual use cases.
The following should be textually analysed and a use case diagram created containing
several use cases. Identify the actors, use cases and associations.
At the start of each semester a student can request a prospectus containing a course list.
Information about a course is provided, such as the tutor, department and pre-requisites.
The new system will allow students to create a schedule, then select four courses. Each
student chooses two others in case their first choices become full or are cancelled. No course
can have more than 10 students. No course can have less than 3 students or it will be
cancelled. This will be the same functionality as available to other internal users of the
system.
When registration is complete, the registration system sends a message to the billing system
to send out a bill to the student.
Tutors use the system to find which classes they are teaching and who the students are. The
registrar will administer the system.
For a period at the beginning of the semester the student can change their schedule.
Students must be allowed to access the system during this time to add or delete courses.
Note: If you have some experience with use cases try drawing a suitable diagram. If you’re
new to the field, see the following page for an example answer.
Register for
courses
Student Billing
System
View
Teaching
Roster
Tutor
Maintain
C ourse
Information
Maintain
Tutor
Information
Maintain
C urriculum
Registrar
Maintain
Student
Information
Generate
Prospectus
Now use the previous text and the previous example answer to write (informal) textual
documentation for the use case initiated by the student.
Compile a list of possible scenarios which could emerge from further investigations with
business users.
Brief Description:
The student initiates the use case to create, read, update or delete a course for the
coming semester.
If the student enters an invalid number, the student is denied access with an error
message.
If a schedule already exists and a new one is created, the student will be informed and
asked for another option.
In this final exercise we’ll write a fully specified use case. Use the information from both
exercises 1 and 2 and also include:
Note: This course registration system (like most systems) has a high number of alternate
flows. Finding all of them becomes an exercise in logical thinking as you try to identify all the
possible permutations and combinations of events. Don’t be too disappointed if you don’t
find as many as are in the following example answer (congratulations if you find more!). As
with all systems, it’s only by working with them over time that you start to fully understand
them.
Brief Description:
This use case allows the student to register for courses by creating, viewing, modifying
or deleting a schedule for a specified semester. Pertinent billing information is sent to
the Billing System.
Pre-Conditions:
1. Registrations for the Semester are open to Students
Minimum Guarantees:
1. Either a Schedule has been created/updated for a Student or the failed
Validation Rule(s) displayed.
Success Guarantees:
1. A Schedule has been created/updated for a Student.
1. The System displays an error stating the Student already has an existing
Schedule and cannot create a new one.
2. The use case resumes at step 2 (of Primary flow).
As you can see, producing formal use case documentation requires clear, logical thinking
plus a numbering convention which allows you to track and cross-reference primary and
alternate flows.
Summary
So how do we use these 3 different types of use case? For business users and stakeholders,
a use case diagram together with an informal, textual use case will, in most circumstances,
be sufficient to convey the essential business functions of the system. The diagram allows us
to communicate with pictures whilst the primary and alternate flows allows us to summarise
business functionality and key business rules.
With a use case diagram and an informal use case we’re describing what happens in the
system (the business requirements). The formal use case on the other hand is starting to
bridge the gap between what the system does and how it does it. The formal use case
(whilst still useful to business users needing to understand a greater level of detail) provides
information which is essential to the design phase of the project.
You may use this article in your newsletter or internal document free of charge, provided that you do not alter it
in any way and include all copyright notices.