LMS Lifecycle-to-Contract Mapping
Summary
Source-backed lifecycle-to-contract mapping; no domain-event mapping layer exists.
Audience
Engineering, integration, QA, architecture, security, and contract reviewers.
Reference Content
| Audit measure | Total |
|---|---|
| Domain-to-contract mappings | 0 |
| Lifecycle-to-contract mappings | 8 |
| Unmapped domain events | 0 |
| Uninvoked contracts | 1 |
The assessment mapping is conditional; the other seven invoked mappings are one lifecycle trigger to one contract. Helpers create identity/time/version directly, validate required data categories, and stage the contract in the outbox. No separate mapper type exists.
Correlation and causation are not copied from HTTP context by the producer helpers. Event identity is newly generated per invocation. Every invoked mapping participates in the endpoint's subsequent SaveChanges boundary.
| Lifecycle source | Integration contract | Mapping behavior | Identity / correlation / version | Outbox and invocation evidence |
|---|---|---|---|---|
| Assignment | TrainingAssignedEvent | Direct, one-to-one helper branch | New identity; correlation unset; v1 | Staged; helper is invoked by assignment |
| Enrollment start | TrainingStartedEvent | Direct, one-to-one helper branch | New identity; correlation unset; v1 | Staged; helper is invoked by start |
| Enrollment completion | TrainingCompletedEvent | Direct, one-to-one helper branch | New identity; correlation unset; v1 | Staged; helper is invoked by completion |
| Assessment submission | AssessmentPassedEvent | Conditional on the persisted outcome comparison | New identity; correlation unset; v1 | Staged on the passed branch; submission invokes helper |
| Assessment submission | AssessmentFailedEvent | Conditional on the persisted outcome comparison | New identity; correlation unset; v1 | Staged on the failed branch; submission invokes helper |
| Certificate issue | CertificateIssuedEvent | Direct, one-to-one helper | New identity; correlation unset; v1 | Staged; issue invokes helper |
| Session creation | TrainingSessionScheduledEvent | Direct session-helper branch | New identity; correlation unset; v1 | Staged; create invokes helper |
| Session reschedule | TrainingSessionRescheduledEvent | Direct session-helper branch | New identity; correlation unset; v1 | Staged; reschedule invokes helper |
CertificateExpiringSoonEvent has no lifecycle-to-contract mapping because no Training invocation was found. There is no domain-event mapper to inventory.
Source References
microservices/src/training-service/Api/TrainingEndpoints.csmicroservices/src/training-service/Infrastructure/TrainingDbContext.csmicroservices/src/contracts/Events/TrainingLifecycleEvents.cs
Related Articles
See Also
Keywords
- LMS events
- Training contracts
- Source-backed integration
Revision Information
- Status: Draft
- Last reviewed: 2026-07-17
- Review cycle: Quarterly