Payroll Workflow State Machine

Summary

Payroll turns source time evidence into reviewable, repairable, and sync-ready state. The state machine exists because pay changes should not be dispatched until blockers, overrides, review decisions, and sync scope are explicit.

Reader Question

How does payroll move from refreshed source evidence to reviewed weekly state and outbound sync while preserving repair and audit paths?

State Machine

Source Refreshed pulls time evidence from lakehouse and provider seams. Review Built creates the weekly grid, day detail, planned entries, pay types, and comparison state. Blocked marks rows or days that cannot safely proceed. Repaired records edits, overrides, or explanations with actor context.

Once reviewed, the workflow reaches Sync Scoped: the operator or job knows which entries are eligible. Sync Dispatched sends the explicit request. Synced records success, while Sync Failed exposes a repairable state and run history.

Payroll should not treat exceptions as incidental warnings. They are the workflow. The operator experience depends on seeing why a day is blocked, what changed, and what will be synced before side effects occur.

Visual

The diagram highlights the blocker and sync-failure loops around review and dispatch.