Auto-Pause Service
Component Detail
Service Layer
medium complexity
backend
0
Dependencies
0
Dependents
1
Entities
0
Integrations
Description
Evaluates mentor certification expiry against current status and executes the pause transition when a certificate has lapsed. Coordinates notifications to the affected mentor and their coordinator, and removes the mentor from public rosters and matching pools. Integrates with the existing pause-function to ensure consistent state transitions.
auto-pause-service
Sources & reasoning
HLF-specific automation tied to certification module. Source places certification in Phase 3 (§5 'Kursadministrasjon og sertifisering (HLF + Barnekreftforeningen)'), and auto-pause depends on the certificate lifecycle, so Growth & Engagement matches.
-
docs/source/likeperson.md · line 49HLF kobler dette til sertifisering: ved utgått sertifikat forsvinner likepersonen fra lokallagets nettsider automatisk.
-
docs/source/likeperson.md · line 72Kursadministrasjon og sertifisering: Påmelding til kurs i appen, automatisk påminnelse ved utløp, digitale sertifikater.
Responsibilities
- Detect mentors whose certifications have expired and are not yet paused
- Invoke the pause transition via the pause-function for each expired mentor
- Dispatch notifications to mentor and coordinator on auto-pause events
- Remove auto-paused mentors from public rosters and matching eligibility
- Record audit entries linking the pause event to the expired certificate
Interfaces
evaluateAndPauseExpired(asOfDate): AutoPauseResult
pauseMentorForExpiry(mentorId, certificateId): PauseOutcome
notifyAutoPause(mentorId, coordinatorId, certificateId): void