Skip to main content

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 eventConfirmed aggregate triggerNotes
EmployeeCreatedDomainEventEmployee.CreateRaised after creation and the initial timeline entry
EmployeeUpdatedDomainEventUpdateCoreDetails; also ChangeStatusRepresents a current employee projection
EmployeeDeletedDomainEventMarkDeletedMethod performs a soft-delete state transition; an exposed caller was not confirmed
ManagerChangedDomainEventChangeManagerOnly when the assignment value changes
DepartmentChangedDomainEventChangeDepartmentOnly when the assignment value changes
EmploymentStatusChangedDomainEventChangeStatusCarries previous and new states; followed by EmployeeUpdatedDomainEvent
EmployeeTimelineEventRecordedDomainEventRecordTimelineEventApplies 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.cs
  • microservices/src/employee-service/Domain/Common/DomainPrimitives.cs
  • microservices/src/employee-service/Infrastructure/EmployeeDbContext.cs

See Also

Keywords

  • Aggregate events
  • Employee domain model
  • State transitions

Revision Information

  • Status: Draft
  • Last reviewed: 2026-07-15
  • Review cycle: Quarterly