docs(architecture): draw JourneyItemDocumentDeleteListener event flow (#805)
Adds the JourneyItemDocumentDeleteListener component and the DocumentDeletingEvent edge (documentSvc -> listener) to the supporting-domains l3 diagram. This is the first event-driven edge in the backend; the diagram must make that in-process coupling visible per the doc-currency rule. Addresses @markus review (blocker) on PR #806. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -20,6 +20,7 @@ System_Boundary(backend, "API Backend (Spring Boot)") {
|
|||||||
Component(geschSvc, "GeschichteService", "Spring Service", "Manages story lifecycle (DRAFT → PUBLISHED with timestamp). Supports two subtypes: STORY (prose) and JOURNEY (ordered JourneyItem sequence). Sanitizes HTML body with an allowlist policy.")
|
Component(geschSvc, "GeschichteService", "Spring Service", "Manages story lifecycle (DRAFT → PUBLISHED with timestamp). Supports two subtypes: STORY (prose) and JOURNEY (ordered JourneyItem sequence). Sanitizes HTML body with an allowlist policy.")
|
||||||
Component(geschQuerySvc, "GeschichteQueryService", "Spring Service", "Read-only facade over GeschichteRepository. Exposes existsById() and findById() to prevent JourneyItemService from crossing domain boundaries.")
|
Component(geschQuerySvc, "GeschichteQueryService", "Spring Service", "Read-only facade over GeschichteRepository. Exposes existsById() and findById() to prevent JourneyItemService from crossing domain boundaries.")
|
||||||
Component(journeyItemSvc, "JourneyItemService", "Spring Service", "Manages journey item lifecycle: append (100-item cap), updateNote (three-way PATCH), delete, and reorder (DEFERRABLE position swap). Serves both STORY and JOURNEY subtypes.")
|
Component(journeyItemSvc, "JourneyItemService", "Spring Service", "Manages journey item lifecycle: append (100-item cap), updateNote (three-way PATCH), delete, and reorder (DEFERRABLE position swap). Serves both STORY and JOURNEY subtypes.")
|
||||||
|
Component(journeyListener, "JourneyItemDocumentDeleteListener", "Spring @EventListener", "Consumes DocumentDeletingEvent synchronously inside the delete transaction and removes note-less journey items before ON DELETE SET NULL fires, preventing a chk_journey_item_not_empty violation. See ADR-038.")
|
||||||
Component(exHandler, "GlobalExceptionHandler", "Spring @RestControllerAdvice", "Converts DomainException, validation errors, and generic exceptions to ErrorResponse JSON with machine-readable ErrorCode and HTTP status.")
|
Component(exHandler, "GlobalExceptionHandler", "Spring @RestControllerAdvice", "Converts DomainException, validation errors, and generic exceptions to ErrorResponse JSON with machine-readable ErrorCode and HTTP status.")
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -44,6 +45,8 @@ Rel(geschCtrl, journeyItemSvc, "Delegates journey item CRUD")
|
|||||||
Rel(journeyItemSvc, geschQuerySvc, "Checks Geschichte existence")
|
Rel(journeyItemSvc, geschQuerySvc, "Checks Geschichte existence")
|
||||||
Rel(geschQuerySvc, db, "Reads geschichten", "JDBC")
|
Rel(geschQuerySvc, db, "Reads geschichten", "JDBC")
|
||||||
Rel(journeyItemSvc, db, "Reads / writes journey_items", "JDBC")
|
Rel(journeyItemSvc, db, "Reads / writes journey_items", "JDBC")
|
||||||
|
Rel(documentSvc, journeyListener, "DocumentDeletingEvent", "in-process event")
|
||||||
|
Rel(journeyListener, db, "Deletes note-less journey_items", "JDBC")
|
||||||
Rel(auditSvc, db, "Writes audit_log", "JDBC")
|
Rel(auditSvc, db, "Writes audit_log", "JDBC")
|
||||||
Rel(auditQuery, db, "Reads audit_log", "JDBC")
|
Rel(auditQuery, db, "Reads audit_log", "JDBC")
|
||||||
Rel(notifSvc, db, "Reads / writes notifications", "JDBC")
|
Rel(notifSvc, db, "Reads / writes notifications", "JDBC")
|
||||||
|
|||||||
Reference in New Issue
Block a user