Skip to content

UC005: Delete Task

Overview

Property Value
ID UC005
Level User Goal
Primary Actor User
Trigger User clicks the "Delete" button for a Task in the UI.
Precondition The Task with the given id exists in the system.
Success Guarantee The Task is permanently removed from the system.
Related Rules
Related Feature features/UC005-delete-task.feature

Goal

The User wants to permanently remove a Task they no longer need. The deletion is immediate and irreversible — there is no soft-delete or archive mechanism. After successful deletion the task no longer appears in the list.

Main Success Scenario

  1. User clicks "Delete" on a Task.
  2. System looks up the Task by id.
  3. System deletes the Task from the database.
  4. System responds with HTTP 204 (no content).
  5. System removes the task from the task list in the UI.

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 error message.
  3. Use case ends in failure; no data is changed.

Transaction Boundary

Single DB transaction covering find → delete of the Task aggregate. No distributed transaction required.

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/UC005-delete-task.feature.