Leave Balance Events
Summary
LeaveBalanceUpdated is produced for explicit balance saves and approval/cancellation usage changes; carry-forward and encashment triggers exist only at Foundation domain-method level.
Audience
Developers, QA, architects, Payroll owners, and support.
Concept
The event communicates balance/tenant/user/type/period categories, current available and used categories, and a source-provided reason. Detailed payload reference belongs to the shared contract source and is not repeated here.
Approval and cancellation save request decisions first, then balance mutation and its event in another commit. Downstream observers can therefore see a decision before the balance event. Payroll does not subscribe to LeaveBalanceUpdated; its confirmed Leave consumer uses decision events. No accrual-specific, adjustment-specific, carry-forward-specific, reservation, or balance-deleted integration event exists.
Source References
- microservices/src/leave-service/Domain/Leave/LeaveBalance.cs
- microservices/src/leave-service/Domain/Leave/LeaveDomainEvents.cs
- microservices/src/contracts/Events/LeaveLifecycleEvents.cs
- microservices/src/leave-service/Infrastructure/LeaveDbContext.cs
- microservices/src/leave-service/Application/LeaveWorkflows.cs
- microservices/src/payroll-service/Messaging/PayrollReadModelConsumer.cs
Related Articles
See Also
Keywords
- LeaveBalanceUpdated
- Balance usage
- Eventual consistency
Revision Information
- Status: Draft
- Last reviewed: 2026-07-15
- Review cycle: Quarterly