Skip to content

Workflow States

All workflows in Ikamet OS use a shared set of 20 status values. This standardization means the same operational infrastructure (timeline events, renewal engine, task system, UI components) works across every service type.

The 20 states

StatusMeaning
PENDINGCreated, not yet started
AWAITING_DOCUMENTSWaiting for customer to upload required documents
SUBMITTEDSubmitted to government or insurer — awaiting response
UNDER_REVIEWBeing reviewed internally or by the authority
APPROVEDApproved by the authority
ISSUEDPermit or policy document issued
ACTIVECurrently valid and active
RENEWAL_DUEApproaching expiry — renewal process should begin
EXPIREDPast expiry date — no longer valid
CANCELLEDCancelled before completion
REJECTEDFormally rejected by the authority or insurer
APPEALCustomer has appealed a rejection
REFERRED_TO_LEGALEscalated to legal team
LEGAL_REVIEWUnder review by legal team
COMPLIANCE_REVIEWUnder compliance review
AWAITING_INSURERWaiting on insurer decision
AWAITING_EMPLOYERWaiting on employer action (work permit workflows)
AWAITING_CANDIDATEWaiting on candidate action
COMPLETEDSuccessfully completed
ON_HOLDPaused — reason documented in notes

Status transitions

Not all transitions are valid. The general progression is:

PENDING
→ AWAITING_DOCUMENTS
→ SUBMITTED
→ UNDER_REVIEW
→ APPROVED / REJECTED
→ ISSUED / APPEAL
→ ACTIVE
→ RENEWAL_DUE
→ COMPLETED / EXPIRED

Branching statuses (AWAITING_INSURER, AWAITING_EMPLOYER, ON_HOLD, REFERRED_TO_LEGAL) can be entered from most active states and return to the flow once resolved.

Status changes generate timeline events

Every status change calls writeStatusChange(), which writes a STATUS_CHANGE timeline event with the old and new status, the entity label, and the staff member who triggered the change.

await writeStatusChange(
user_id,
'Residency Application',
oldStatus,
newStatus,
{ staff_id, order_id }
);

Operational significance

State groupOperational action
AWAITING_DOCUMENTSTrigger document request reminder
RENEWAL_DUETrigger renewal outreach sequence
EXPIREDFlag for compliance review
REJECTEDTrigger appeal workflow or case closure
ON_HOLDCreate follow-up task with scheduled date