Workflow Event Ordering
Summary
The aggregate preserves the order in which it raises domain events, the save path inserts corresponding outbox records in that order, and the outbox store reads eligible records oldest first. These are useful local behaviors, not a strict end-to-end ordering contract.
Observed sequences
- Rejection raises the task-rejected event before the workflow-rejected event.
- Approval raises task-approved before opening the next stage and its task-created events, or before workflow completion.
- A workflow start is raised before initial-stage task creation.
Ordering boundary
No contract sequence number, broker partition key, outbox claim/lease, single-relay constraint or consumer-side reorder policy is verified. Concurrent relay instances, retries and transport behavior can therefore change observed delivery order.
Requires Confirmation
Required ordering scope, relay concurrency, broker routing and consumer handling of late or reordered events require confirmation.
Source References
microservices/src/workflow-service/Domain/Common/DomainPrimitives.csmicroservices/src/shared-kernel/Messaging/OutboxProcessor.csmicroservices/src/workflow-service/Domain/Workflow/WorkflowInstance.csmicroservices/src/workflow-service/Infrastructure/Persistence.cs
Related Articles
See Also
Keywords
Workflow events, ordering, transactional outbox.
Revision Information
- Status: Draft
- Last reviewed: 2026-07-20
- Next review: 2026-10-20