From Actor Goals to Complete Use Cases

A use case describes how external participants interact with a system to achieve a particular goal, including relevant alternative outcomes. You encounter use cases when a team needs a precise account of what happens during activities such as reserving equipment or collecting an order. A useful description connects the initiating request to an observable result, while explaining what happens when the usual route cannot finish.

Start with the goal and boundary

An actor is a role outside the chosen system boundary that interacts with the system. The role can be played by a person, another software system, or a device. Several people can play the same role, and one person can play different roles in different interactions.


Choose a goal-based name such as Reserve locker. The primary actor pursues that goal; supporting actors provide services the system needs along the way. If the reservation system sends confirmation through an external messaging service, the visitor is the primary actor and the messaging service supports the interaction.


A visitor and a messaging service communicate with a locker reservation use case inside a system boundary.


Actor status depends on the chosen boundary. A database included within the system is an internal component. An independently operated service outside that boundary can be an actor when it exchanges information with the system. Actor names describe roles, rather than named individuals or internal programming classes.



Write the interaction and its outcomes

Record the preconditions, the event that starts the interaction, and the steps leading to success. Preconditions establish the starting situation; they do not replace checks that the system is responsible for performing during the interaction.


The main success scenario should use clear, numbered steps. Identify who acts and what meaningful information or result passes across the boundary. For example, the visitor requests a locker, the system presents available lockers, the visitor selects one, and the system creates the reservation and provides confirmation.


Keep the description at a consistent level. Specify that the system presents available lockers when that information matters. Usually, the exact colour and position of the selection button do not explain the goal or its outcome.


Example: For Reserve locker, an existing authenticated session might be a precondition. The reservation request starts the interaction. A recorded reservation linked to the visitor is a successful outcome. These statements describe different points in the same execution.


State the postconditions explicitly. Distinguish what successful completion establishes from what remains protected when the goal is not achieved.

Handle alternatives without losing the goal

An alternative flow branches at an identified step. Explain its condition, the system response, and whether execution rejoins the main flow or ends. A rejected selection might return the visitor to the available-locker list. A visitor cancellation might end the interaction without a reservation.


Flow case

What the description establishes

Possible ending

Main success

The ordinary route reaches the goal

Reservation recorded and confirmed

Recoverable alternative

A different route can still reach the goal

Selection repeats, then reservation succeeds

Unsuccessful alternative

The goal is not reached and protected state remains consistent

Temporary hold released; no reservation created


Reaching the last written step does not by itself prove that the goal was achieved. Check that the stated outcome follows from the interactions. For example, sending a request to a confirmation service does not establish that a visitor received the message.



A diagram can summarize actors and goals, but the written flows explain ordering, decisions, retries, and completion conditions. Use both only when each contributes information.

What to remember

  • Name the actor goal and choose the system boundary first.
  • Separate starting assumptions, initiating events, interactions, and final conditions.
  • Give every alternative a branch point and a clear continuation or ending.
  • Check that successful and unsuccessful outcomes match their stated guarantees.

Example: Collecting a Library Locker Item

A library operates a self-service locker system that includes the collection terminal, code-verification software, locker controller, and inventory records. A student has an active collection record whose status is ready for collection. The student starts collection by submitting its collection code.


An accepted code causes the system to unlock the assigned locker. For this problem, assume unlocking always succeeds and a reliable removal sensor confirms that the student takes the item. The system then marks the record collected and displays confirmation.


A rejected code changes neither the record nor the locker. The system allows at most two verification attempts during one execution, meaning one run of this use case from its initiating event to an ending. After the first rejection, the student submits another code. A second rejection ends the execution. There are no other branches or cancellations.


a) Identify the primary actor, its goal, the precondition, and the initiating event.

  1. Draw the boundary around the complete locker system described in the problem. Its terminal, verification software, controller, and records are internal components. The student participates from outside that boundary.
  2. Identify the desired result. The student wants to collect the assigned library item, rather than merely submit a code.
  3. Separate the starting assumption from the event that begins interaction. An active record ready for collection already exists; code submission starts execution.

The primary actor is the student, the goal is to collect the assigned item, the precondition is an active record ready for collection, and the initiating event is submission of the collection code.


b) Write the main success scenario and the rejected-code alternative, including the final guarantees.


The main success scenario follows the exchanges that establish physical collection:

  1. The student submits the collection code.
  2. The system verifies and accepts the code.
  3. The system unlocks the assigned locker.
  4. The student removes the item, and the removal sensor reports that event.
  5. The system marks the record collected and displays confirmation.

The rejected-code alternative branches at verification. After the first rejection, ________ remains. The system displays the rejection and allows another submission, which returns execution to verification. After the second rejection, the system displays a final rejection and ends execution.


A rejected code does not establish collection. On success, the student has removed the item and the record is collected. On unsuccessful completion, the record remains ready for collection and the locker remains locked. These are the final guarantees for the two endings.


c) Count the distinct complete verification-outcome sequences. Use S for an accepted code and F for a rejected code.

  1. Acceptance on the first attempt produces S and ends execution immediately. Acceptance after one rejection produces FS. There are therefore ________.
  2. Rejection on both permitted attempts produces FF and ends unsuccessfully. A single F is not complete because the student must make the remaining attempt under the stated assumptions.
  3. Add the successful and unsuccessful sequence counts.


N=2+1=3N = 2 + 1 = 3


There are 3 distinct complete sequences: S, FS, and FF. Sequences such as SS do not occur because the first acceptance already ends verification and completes collection under the supplied assumptions.

A team is documenting a campus bicycle-rental use case. Match each documentation element to the description that explains its role.

Match each term
A.

The event that starts the interaction

B.

The ordinary sequence of interactions that achieves the goal

C.

A fact established when the goal has been achieved

D.

A fact assumed to hold before the interaction begins

E.

An external role that exchanges information or actions with the system

Actor

Success postcondition

Main success scenario

Trigger

Precondition

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

An online shop documents a Submit Order use case. Whenever its flow reaches address checking, it performs the separately documented Validate Delivery Address behavior. That behavior is required at this point and is reused by another use case.


The shop also documents Request Gift Wrap as a separate behavior that adds an interaction at a named extension point when the customer selects gift wrapping. Submit Order remains complete and meaningful without gift wrapping.


Complete the relationship labels using include or extend. The relationship from Submit Order to Validate Delivery Address is . The relationship from Request Gift Wrap to Submit Order is .

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

A bicycle-rental use case places the kiosk application, its licence-checking module, and its local database inside the system boundary. A rider starts a rental. The application uses its module to contact an independently operated licence-verification service and then stores the rental locally. Which pair identifies the participating actors?

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

Extra Practice