Skip to main content

Attendance Domain Events

Summary

The Attendance domain defines exactly five concrete lifecycle event records.

Audience

  • Domain developers, QA engineers, architects, and event-contract reviewers

Reference Content

Exact domain eventTrigger and producer actionBusiness meaningConceptual dataIntegration mapping / side effect
AttendancePunchedDomainEventPunch aggregate creationA punch was capturedtenant, employee/date, punch category, stateAttendancePunchedEvent; outbox row on save
AttendanceSubmittedDomainEventDaily record computation saved without approvalAttendance awaits reviewdaily identity, outcome and calculated timeAttendanceSubmittedEvent; Payroll and Integration consumers
AttendanceApprovedDomainEventComputation saved already approved, explicit approval, or approved punch recalculationCanonical Attendance is approveddaily identity, approved outcome and timeAttendanceApprovedEvent; Payroll and Integration consumers
AttendanceRejectedDomainEventDaily record rejection, including qualifying punch rejectionAttendance outcome was cleared/rejecteddaily identity and reason categoryAttendanceRejectedEvent; Integration consumer
AttendanceReopenedDomainEventApproved reopen computation appliedAn approved daily outcome was replaced after reopen reviewdaily identity, recomputed outcome, reopen referenceAttendanceReopenedEvent; no confirmed consumer

The domain event base creates its own identity and occurrence time, but mapping creates the integration event’s identity. A newly created daily record may raise an event before its database-generated identifier exists, so consumers must use the business identity when necessary.

Creating or rejecting a reopen request does not raise a dedicated domain event. Punch approval changes punch state but raises an approved Attendance event only when a matching daily record is recomputed.

Source References

  • microservices/src/attendance-service/Domain/Attendance/AttendanceDomainEvents.cs
  • microservices/src/attendance-service/Domain/Attendance/AttendanceRecord.cs
  • microservices/src/attendance-service/Domain/Attendance/AttendancePunchRecord.cs
  • microservices/src/attendance-service/Infrastructure/AttendanceDbContext.cs

See Also

Keywords

  • Attendance events
  • Integration contracts
  • Eventual consistency

Revision Information

  • Status: Draft
  • Last reviewed: 2026-07-15
  • Review cycle: Quarterly