Leave Integration Events
Summary
Six exact shared contracts are produced by Leave Service at schema version 1 through the transactional outbox.
Audience
Producers, consumers, QA, architects, and contract-governance reviewers.
Reference Content
| Exact contract | Purpose/trigger | Confirmed consumers | Context/version | Maturity | Source |
|---|---|---|---|---|---|
| LeaveRequestedEvent | Announce request creation and initial state | None | Numeric tenant/employee context; correlation; version 1 | Direct production, Foundation consumption | microservices/src/contracts/Events/LeaveLifecycleEvents.cs |
| LeaveApprovedEvent | Announce direct, initial, or Workflow-completed approval | Payroll, Notification | Tenant/employee/approver categories; correlation; version 1 | Transitional | microservices/src/contracts/Events/LeaveLifecycleEvents.cs |
| LeaveRejectedEvent | Announce direct or Workflow-completed rejection | Payroll, Notification | Tenant/employee/rejection categories; correlation; version 1 | Transitional | microservices/src/contracts/Events/LeaveLifecycleEvents.cs |
| LeaveCancelledEvent | Announce request cancellation | Payroll | Tenant/employee/date/type/unit categories; correlation; version 1 | Transitional | microservices/src/contracts/Events/LeaveLifecycleEvents.cs |
| LeaveBalanceUpdatedEvent | Announce balance mutation | None | Tenant/user/period/balance categories; correlation; version 1 | Direct production, Foundation consumption | microservices/src/contracts/Events/LeaveLifecycleEvents.cs |
| LeaveEncashedEvent | Announce encashment aggregate creation | None | Tenant/user/period/units/optional amount category; version 1 | Foundation | microservices/src/contracts/Events/LeaveLifecycleEvents.cs |
All contracts inherit the shared IntegrationEvent envelope: event identity/type/time, optional correlation/causation and cross-service tenant/user context, source service, and schema version. The Leave mapping creates new integration IDs, uses version 1, supplies correlation, leaves causation absent, and carries numeric Leave identity context in contract-specific fields. Compatibility consumers must tolerate new-record identifiers documented by the contract source.
Source References
- microservices/src/contracts/Events/IntegrationEvent.cs
- microservices/src/contracts/Events/LeaveLifecycleEvents.cs
- microservices/src/leave-service/Infrastructure/LeaveDbContext.cs
- microservices/src/payroll-service/Messaging/PayrollReadModelConsumer.cs
- microservices/src/notification-service/Application/EventNotificationResolver.cs
Related Articles
See Also
Keywords
- Integration contracts
- Schema version 1
- Leave lifecycle
Revision Information
- Status: Draft
- Last reviewed: 2026-07-15
- Review cycle: Quarterly