Attendance Payroll Integration Events
Summary
Payroll Service directly subscribes to Attendance Submitted and Approved integration events and updates its own period read model.
Audience
- Payroll and Attendance developers, integration engineers, QA engineers, and architects
Attendance-to-Payroll flow
The consumer resolves tenant and employee/date context from the envelope and contract, updates a monthly Attendance projection, records audit information, and stores successfully processed event identities. A later event older than the projection’s last occurrence is ignored.
Both Submitted and Approved are consumed; source does not restrict the projection to approved-only Attendance. The exact aggregation semantics when both lifecycle events represent the same day require contract/integration review and are classified Transitional. This documentation does not reproduce Payroll formulas.
Attendance-owned approved-period snapshots are a separate synchronous/domain storage concern. No Payroll consumer is confirmed for Punched, Rejected, or Reopened. Cross-service updates are eventually consistent.
Source References
microservices/src/payroll-service/Messaging/PayrollReadModelConsumer.csmicroservices/src/payroll-service/Infrastructure/PayrollDbContext.csmicroservices/src/attendance-service/Application/Services/PayrollSnapshotService.csmicroservices/src/contracts/Events/AttendanceLifecycleEvents.cs
Related Articles
See Also
Keywords
- Attendance events
- Integration contracts
- Eventual consistency
Revision Information
- Status: Draft
- Last reviewed: 2026-07-15
- Review cycle: Quarterly