Employee Domain Events
Summary
Seven immutable domain-event record types describe significant Employee aggregate changes. Each carries an event identifier and UTC occurrence time generated when the record is created.
Audience
- Employee Service developers
- Integration and QA engineers
- Domain-model reviewers
Reference Content
| Domain event | Confirmed aggregate trigger | Notes |
|---|---|---|
EmployeeCreatedDomainEvent | Employee.Create | Raised after creation and the initial timeline entry |
EmployeeUpdatedDomainEvent | UpdateCoreDetails; also ChangeStatus | Represents a current employee projection |
EmployeeDeletedDomainEvent | MarkDeleted | Method performs a soft-delete state transition; an exposed caller was not confirmed |
ManagerChangedDomainEvent | ChangeManager | Only when the assignment value changes |
DepartmentChangedDomainEvent | ChangeDepartment | Only when the assignment value changes |
EmploymentStatusChangedDomainEvent | ChangeStatus | Carries previous and new states; followed by EmployeeUpdatedDomainEvent |
EmployeeTimelineEventRecordedDomainEvent | RecordTimelineEvent | Applies to explicitly recorded external/lifecycle timeline input |
Domain behavior
No-change manager, department, and status requests return without raising their respective event. Core profile updates raise only the update event. Notes and document references add timeline entries but do not call RecordTimelineEvent, so they do not raise the timeline-recorded domain event.
ChangeManager and ChangeDepartment raise their dedicated event but do not directly raise EmployeeUpdatedDomainEvent. ChangeStatus raises both the dedicated status event and an update event in that order.
Domain-to-integration mapping
Every listed domain type has a mapping in EmployeeDbContext. Unmapped domain-event types would be ignored by the current switch, but no additional Employee aggregate domain-event types were found.
Source References
microservices/src/employee-service/Domain/Employees/Employee.csmicroservices/src/employee-service/Domain/Common/DomainPrimitives.csmicroservices/src/employee-service/Infrastructure/EmployeeDbContext.cs
Related Articles
See Also
Keywords
- Aggregate events
- Employee domain model
- State transitions
Revision Information
- Status: Draft
- Last reviewed: 2026-07-15
- Review cycle: Quarterly