Service Layer low complexity backend
1
Dependencies
0
Dependents
1
Entities
0
Integrations

Description

Handles the coordinator's ability to acknowledge a certificate lapse for a peer mentor, which clears the persistent notification banner for that mentor. Records the acknowledgement timestamp and coordinator identity for audit purposes.

Feature: Certificate Expiry Notifications

coordinator-acknowledgement-service

Summaries

The Coordinator Acknowledgement Service gives coordinators a clear, auditable action to resolve certificate lapse alerts without requiring the underlying issue to be fully remediated first. By allowing a coordinator to formally acknowledge a lapse, persistent notification banners are dismissed in a controlled way—preventing alert fatigue while preserving a complete audit trail of who acknowledged what and when. This balance between operational flexibility and compliance accountability is essential for organizations subject to workforce certification audits. The service ensures that acknowledgements are scoped strictly to the responsible coordinator, preventing unauthorized dismissal of alerts and maintaining the integrity of the compliance oversight process.

Low complexity with a single backend execution context and one dependency on notification-record-repository. Delivery risk is primarily around the authorization rule: only the mentor's assigned coordinator may acknowledge a lapse, which requires the coordinator-mentor relationship to be reliably resolvable at runtime. This authorization check should be validated early in integration testing. The audit record (acknowledgement timestamp and coordinator identity) must meet any compliance or reporting requirements defined by stakeholders—confirm the required retention period and whether these records need to surface in any reporting views.

Testing scope includes valid acknowledgement, unauthorized acknowledgement rejection, duplicate acknowledgement handling, and retrieval of unacknowledged lapses by coordinator.

The service wraps the notification-record-repository with business-rule enforcement layered on top of raw data access. acknowledgeLapse writes the coordinatorId and a UTC timestamp into the notification record and flips the acknowledgement flag, which downstream banner-rendering logic reads via isLapseAcknowledged. The authorization constraint—only the mentor's coordinator may acknowledge—must be enforced here rather than in the repository, since the repository is a pure data layer. getUnacknowledgedLapses powers the coordinator's dashboard view, returning all active unacknowledged notifications scoped to that coordinator.

getAcknowledgementRecord supports audit log display. All mutations should be wrapped in a database transaction to ensure the acknowledgement flag and audit metadata are written atomically. No external service calls; the component is stateless beyond its repository dependency.

Responsibilities

  • Process coordinator acknowledgement of a certificate lapse
  • Clear the persistent notification banner upon acknowledgement
  • Record acknowledgement metadata for audit trail
  • Validate that only the mentor's coordinator can acknowledge

Interfaces

acknowledgeLapse(notificationId: String, coordinatorId: String)
isLapseAcknowledged(notificationId: String) -> bool
getAcknowledgementRecord(notificationId: String) -> AcknowledgementRecord?
getUnacknowledgedLapses(coordinatorId: String) -> List<Notification>

Relationships

Dependencies (1)

Components this component depends on

Related Data Entities (1)

Data entities managed by this component

API Contract

View full contract →
REST /api/v1/lapse-acknowledgements 5 endpoints
GET /api/v1/lapse-acknowledgements
GET /api/v1/lapse-acknowledgements/:acknowledgement_id
POST /api/v1/lapse-acknowledgements
PUT /api/v1/lapse-acknowledgements/:acknowledgement_id
DELETE /api/v1/lapse-acknowledgements/:acknowledgement_id