Employee Lifecycle¶
Models the lifecycle of an Employee record within the Unified Commerce platform, from onboarding through active service, leave, role changes, and eventual offboarding. Governs store associate access, operational accountability, and clienteling attribution.
Object: employee ·
States: 6 ·
Transitions: 9
State Diagram¶
flowchart LR
%% ── classDef palette ─────────────────────────────────────
classDef stInit fill:#0d9488,stroke:#0f766e,color:#fff,font-weight:bold
classDef stNorm fill:#3b82f6,stroke:#2563eb,color:#fff
classDef stOk fill:#16a34a,stroke:#15803d,color:#fff,font-weight:bold
classDef stFail fill:#dc2626,stroke:#b91c1c,color:#fff,font-weight:bold
classDef stHold fill:#d97706,stroke:#b45309,color:#fff
%% ── nodes ───────────────────────────────────────────────
onboarding(["Onboarding"])
active["Active"]
on_leave["On Leave"]
suspended>"Suspended"]
offboarded[["Offboarded"]]
archived[["Archived"]]
%% ── transitions ─────────────────────────────────
onboarding -->|"employee-activated"| active
active -->|"employee-deactivated"| on_leave
on_leave -->|"employee-activated"| active
active -->|"employee-deactivated"| suspended
suspended -->|"employee-activated"| active
active -->|"employee-offboarded"| offboarded
on_leave -->|"employee-offboarded"| offboarded
suspended -->|"employee-offboarded"| offboarded
offboarded -->|"employee-archived"| archived
%% ── class assignments ───────────────────────────
class onboarding stInit
class active,on_leave stNorm
class suspended stHold
class offboarded,archived stOk
States¶
| State | Label | Description | Initial | Terminal |
|---|---|---|---|---|
onboarding |
Onboarding | Employee record created; access provisioning and training in progress. Not yet operational. | ✓ | |
active |
Active | Employee fully operational. Can process transactions, access clienteling, and perform store tasks. | ||
on-leave |
On Leave | Employee temporarily absent (holiday, sick leave, parental leave). Record preserved; access suspended. | ||
suspended |
Suspended | Employee access suspended pending investigation or disciplinary process. | ||
offboarded |
Offboarded | Employee has left the organisation. Access revoked. Record retained for audit. | ✓ | |
archived |
Archived | Employee record archived after retention period. No operational impact. | ✓ |
Transitions¶
| From | To | Trigger | Guards |
|---|---|---|---|
onboarding |
active |
employee-activated |
Training completed; System access provisioned; Till/device assignment complete (if applicable) |
active |
on-leave |
employee-deactivated |
Approved leave request on record |
on-leave |
active |
employee-activated |
Return date reached or early return approved |
active |
suspended |
employee-deactivated |
HR or security-initiated suspension; Reason recorded |
suspended |
active |
employee-activated |
Investigation or disciplinary process concluded; Reinstatement approved |
active |
offboarded |
employee-offboarded |
Resignation or termination confirmed; Access revocation checklist complete |
on-leave |
offboarded |
employee-offboarded |
Employment ended during leave period |
suspended |
offboarded |
employee-offboarded |
Dismissal following suspension |
offboarded |
archived |
employee-archived |
Legal retention period elapsed; No outstanding attribution or audit references |