Assignment Completion Event Listener
Component Detail
Infrastructure
low complexity
backend
1
Dependencies
0
Dependents
3
Entities
0
Integrations
Description
Infrastructure adapter that subscribes to assignment status-change events from the backend event bus or database trigger layer. When an assignment transitions to 'completed', it dispatches the event to the Threshold Tracking Service for counter increment and threshold evaluation. Provides decoupled integration between the assignment lifecycle and threshold logic.
assignment-completion-event-listener
Responsibilities
- Subscribe to assignment status-change events for completed transitions
- Filter relevant events (only completed status, not reversals or other statuses)
- Invoke Threshold Tracking Service with normalized event payload
- Handle retries and error logging for failed threshold evaluations
Interfaces
onAssignmentStatusChanged(event: AssignmentStatusEvent): void
filterCompleted(event: AssignmentStatusEvent): bool
dispatchToTrackingService(mentorId: String, assignmentId: String, orgId: String): void
handleProcessingError(event: AssignmentStatusEvent, error: Error): void
Relationships
Related Data Entities (3)
Data entities managed by this component