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¶
- User clicks "Delete" on a
Task. - System looks up the
Taskbyid. - System deletes the
Taskfrom the database. - System responds with HTTP 204 (no content).
- System removes the task from the task list in the UI.
Extensions (Alternate Flows)¶
2a. No task with the given ID exists:
- System returns HTTP 404 with error code
TASK_NOT_FOUND. - UI displays an error message.
- 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.