Status: Accepted (in force). Reconstructed.

Context

Leave, Loan, Salary Advance, Document, Exit, Redeployment and Suspension are all "an employee asks; someone approves; something happens." Building seven independent features would duplicate the raise → route → approve → effect pipeline seven times.

Decision

Model them as one generic EmployeeRequest with a type discriminator, handled by a single RequestService and a shared approval-workflow engine. Type-specific behaviour is branches within the shared pipeline (plus _Ess self-service variants).

Consequences

Good: one lifecycle, one approval engine, one audit model; adding a type reuses the pipeline; consistent UX across request types.

Bad / costs: RequestService is enormous (13,676 lines) with heavy duplication (notably X vs X_Ess); a change to shared logic risks all types; ReviewEmployeeRequest is a ~1,900-line branchy method that's hard to reason about.

Alternatives

Related

technical.md, onboarding.md.