Expense Domain Events
Summary
The Expense aggregate raises exactly three domain-event types, all on terminal lifecycle transitions. Claim creation, receipt operations, workflow start, and deletion do not raise domain events.
Audience
Expense and integration developers, QA engineers, architects, and maintainers reviewing aggregate behavior.
Reference Content
Confirmed domain events
| Domain event | Raised by aggregate transition | Immediate purpose |
|---|---|---|
| ExpenseApprovedDomainEvent | Pending to Approved | Carries the approved outcome to infrastructure mapping |
| ExpenseRejectedDomainEvent | Pending to Rejected | Carries the rejected outcome to infrastructure mapping |
| ExpensePaidDomainEvent | Approved to Paid | Carries the paid outcome to infrastructure mapping |
The shared Expense domain-event base assigns a domain event identity and occurrence time. Aggregate methods enforce lifecycle validation before raising an event. Events remain attached to the aggregate until SaveChanges dispatches them to integration mapping and clears them.
Not implemented
- ExpenseClaimCreatedDomainEvent
- ExpenseClaimDeletedDomainEvent
- ReceiptAddedDomainEvent or ReceiptRemovedDomainEvent
- WorkflowStartedDomainEvent
- Domain-event handlers independent of the SaveChanges mapping path
Requires confirmation
Future non-terminal domain events, handler extensibility, and domain-event observability require confirmation.
Source References
microservices/src/expense-service/Domain/Expense/ExpenseDomainEvents.csmicroservices/src/expense-service/Domain/Expense/ExpenseClaim.cs
Related Articles
See Also
Keywords
- Expense events
- Domain Events
- Integration contracts
Revision Information
- Status: Draft
- Last reviewed: 2026-07-16
- Review cycle: Quarterly