Leave Workflow Integration Events
Summary
Workflow integration uses HTTP start/state operations and an HTTP completion callback; no dedicated Leave-to-Workflow integration event exists.
Audience
Leave/Workflow developers, QA, architects, downstream owners, and support.
Concept
Leave starts a Workflow instance through an HTTP client and stores its correlation on the request. Direct approval/rejection is blocked while the pending request is Workflow-managed. The callback resolves the request, optionally verifies external state, and invokes the same LeaveRequest approval/rejection domain methods used by direct decisions.
A valid callback therefore raises LeaveApprovedDomainEvent or LeaveRejectedDomainEvent, which maps to the ordinary shared Leave decision contract and reaches confirmed Payroll/Notification consumers. A duplicate callback against an already terminal request is acknowledged and audited without another decision event. Invalid correlation, decision, subject, or verified state produces no Leave event.
Workflow start failure, callback transport failure, and event-broker publication failure are separate boundaries. The request can be committed before Workflow start/correlation persistence; callback decision can be committed before a later balance update. No WorkflowStarted, WorkflowCompleted, task-created, or callback-received Leave integration contract exists.
Source References
- microservices/src/leave-service/Application/WorkflowIntegration.cs
- microservices/src/leave-service/Application/LeaveWorkflows.cs
- microservices/src/leave-service/Domain/Leave/LeaveRequest.cs
- microservices/src/leave-service/Api/LeaveEndpoints.cs
Related Articles
See Also
Keywords
- Workflow callback
- HTTP-only boundary
- Decision publication
Revision Information
- Status: Draft
- Last reviewed: 2026-07-15
- Review cycle: Quarterly