unassignedUnassigned
The job exists with client, site, SLA, skills, window, and proof policy but no worker owns it.
Create, assign, accept, travel, prove, approve, and close a field job without losing actor, retry, or evidence history.
A state is not a UI label. It determines which actor may act, what evidence exists, what may be retried, and how recovery proceeds.
unassignedThe job exists with client, site, SLA, skills, window, and proof policy but no worker owns it.
assignedA specific eligible worker owns the next decision and dispatch has recorded why they were selected.
acceptedThe worker has acknowledged responsibility and the customer-facing plan can become firm.
en_routeTravel has begun and ETA, route deviation, and SLA-risk observations may change continuously.
in_progressArrival is established and work evidence can be gathered under the declared proof policy.
proof_pendingThe worker submitted an immutable evidence set awaiting automated or supervisor validation.
completedterminalRequired proof is accepted and downstream billing, inventory, SLA, and customer workflows may run.
cancelledterminalA named actor stopped the job with a reason before completion.
Commands express intent. The aggregate validates current state and invariants, commits one new version, and emits a fact in the same transaction.
create_taskIntegration servicetask.createdUse the upstream job ID as a stable creation key.
assignDispatcherunassignedassignedtask.assignedDeduplicate by dispatcher command ID and compare expected task version.
acceptField workerassignedtask.acceptedGenerate the key on-device before network transmission and persist it through retry.
start_travelField workeracceptedtask.en_routeA repeated start must return the same state and must not create a second trip.
arriveField workeren_routetask.startedBind arrival evidence and command ID to the same transition transaction.
submit_proofField workerin_progresstask.proof_submittedHash the evidence manifest and reject a reused key with different content.
approve_proofSupervisorproof_pendingtask.completedCommit approval and downstream outbox entries atomically.
reject_proofSupervisorproof_pendingtask.proof_rejectedPreserve decision reason and the rejected evidence version.
Keep provider responses, business identity, state, events, and side-effect delivery distinct so each can be reconciled safely.
Fast current-state reads and optimistic concurrency.
taskIdexternalIdstateversionassigneeIdmapplsPinAttributable, replayable history for support and compliance.
eventIdaggregateVersionactorcommandIdoccurredAtImmutable references and hashes for checklist, media, signature, and consent.
manifestIdtaskVersioncaptureTimecontentHashretentionClassReliable downstream billing, inventory, notification, and analytics delivery.
outboxIdeventIdstatusattemptsnextAttemptAtOne upstream external job maps to one durable task aggregate.
Only the assigned worker can accept, travel, arrive, or submit proof unless an attributable override is recorded.
Every command carries tenant, actor, idempotency key, expected version, and occurrence time.
Completion is impossible until the declared proof policy passes.
Task history is append-only; corrections use new events or compensating work.
Recovery changes durable truth only through the same rules as normal operation. A timeout is an unknown outcome, not evidence that nothing happened.
No provider response but the upstream external ID and idempotency key are known.
Query by known identity or repeat the same command; do not mint a new job ID.
The submitted expected version is older than the current aggregate version.
Return conflict with current state; refresh context and require an intentional new command.
Evidence exists locally but no server acknowledgement or event ID exists.
Retain command ID, hashes, capture timestamps, and retry queue until the committed event is returned.
Task is complete but its outbox entry remains pending or retrying.
Retry outbox delivery independently; never reopen or re-complete the task to trigger side effects.
Measure state age, event health, retries, reconciliation, and sensitive-data access alongside latency and error rate.
Only explicitly indexed evidence is linked. Empty sections are not backfilled with invented endpoints or package names.
8 labs · 5 hostile scenarios/tasks/tasks/{taskId}/tasks/{taskId}/users/clientsmapmyindia-workmate-apismappls-workmate-android-sdk6 verified tests