A long-running HR case: the states a durable agent run must survive

A long-running HR case: the states a durable agent run must survive A lifecycle diagram generated by Archify. Case received · thread ID assigned · Lifecycle state · checkpoint 0 01 Case received thread ID assigned checkpoint 0 Planning · next step chosen · Lifecycle state · checkpoint 02 Planning next step chosen checkpoint Waiting for tool · payroll or leave system · Lifecycle state · timeout 30s 03 Waiting for tool payroll or leave system timeout 30s Waiting for HR · approval needed · Lifecycle state · can take days 04 Waiting for HR approval needed can take days Resumed · reloaded, not replayed · Lifecycle state · checkpoint 05 Resumed reloaded, not replayed checkpoint Completed · employee notified · Lifecycle state · terminal 06 Completed employee notified terminal Retrying · max 2 attempts · Lifecycle state · same idempotency key Retrying max 2 attempts same idempotency key Failed · handed to a person · Lifecycle state · terminal Failed handed to a person terminal Cancelled · employee withdrew · Lifecycle state · terminal Cancelled employee withdrew terminal Expired · no decision in 10 days · Lifecycle state · escalated Expired no decision in 10 days escalated start call saved ok done timeout retry retries exhausted deadline passed withdrawn more work Legend initial state active waiting success failure / exit neutral final state