Skip to content

UC003: Retrieve Task by ID

Overview

Property Value
ID UC003
Level User Goal
Primary Actor User
Trigger User or the UI requests a single Task by its id.
Precondition A valid numeric id is provided in the request path.
Success Guarantee The system returns the Task with the given id.
Related Rules BR-005
Related Feature features/UC003-retrieve-task-by-id.feature

Goal

The User (or the UI acting on behalf of the User) wants to view the full detail of a single Task. This is typically triggered when the User clicks a task in the list to open its detail or edit view. This use case does not modify any data.

Main Success Scenario

  1. User (or UI) sends a request with the Task id.
  2. System looks up the Task by id in the database.
  3. System responds with HTTP 200 and the full Task representation.

Extensions (Alternate Flows)

2a. No task with the given ID exists:

  1. System returns HTTP 404 with error code TASK_NOT_FOUND.
  2. UI displays an appropriate error message.
  3. Use case ends in failure.

Transaction Boundary

Read-only. A single database lookup by primary key suffices.

Sequence Diagram

BDD Scenarios

The feature file is the single source of truth for behaviour — it is also executed as an acceptance test. See features/UC003-retrieve-task-by-id.feature.