BulkRegistrationService
Component Detail
Description
Orchestrates the fan-out logic that converts a single bulk registration request into individual activity records for each selected peer mentor. It enforces business rules, delegates persistence to the repository, and aggregates per-record outcomes into a single response.
bulk-registration-service
Sources & reasoning
Line 84 explicitly describes bulk registration as logging collectively for fixed activities with a weekly group training example, and notes Blindeforbundet deprioritizes it - justifying should_have rather than must_have. Line 346 places it in Fase 2 (v1.0 by ordinal mapping). Dependency on coordinator-proxy-reporting is intentional: bulk is a superset of proxy attribution and reuses its authorization and outbox mechanics.
-
docs/source/likeperson.md · line 84enten enkeltvis eller samlet for faste aktiviteter (f.eks. ukentlig trening med mange deltakere). Blindeforbundet bruker ikke proxy-rapportering på samme måte og prioriterer dette lavt.
-
docs/source/likeperson.md · line 346Pausefunksjon og bulkregistrering for koordinatorer
Responsibilities
- Validate that all selected mentor IDs belong to the submitting coordinator's scope
- Iterate over selected mentors and create one activity record per mentor using shared activity details
- Enforce activity type and duration constraints consistent with simple-activity-logging rules
- Collect and return a per-record result summary (created, skipped, failed)
- Emit audit events for bulk submission traceability
Interfaces
submitBulk(coordinatorId: string, mentorIds: string[], details: ActivityDetails): Promise<BulkSubmitResult>
validateScope(coordinatorId: string, mentorIds: string[]): Promise<boolean>
fanOutRecords(mentorIds: string[], details: ActivityDetails): Promise<ActivityRecord[]>
Related Data Entities (2)
Data entities managed by this component