durable operation2–3 hr5 stages8 code languages

Operating journey: Dispatch the right technician, with the right proof

Higher first-time-fix rates and auditable work from dispatch through customer sign-off.

The real-world moment

A utility receives a no-power complaint for a commercial unit. Dispatch must resolve the service point, choose a technician with the correct certification and inventory, survive an offline basement visit, collect readings and imagery, route weak proof to review, and close the job only after the provider and customer records agree.

Make ownership visible before code.

Operate the full lifecycle with versioned state, hostile-path recovery, audit, and release evidence.

Application state
stateful
Planning calls
0
Credentials accepted
No
Write authority
None
01
Work-order system

Geocode and classify the service location

Owns customer/service asset, SLA, required skills, inventory, commercial outcome, and the authoritative terminal status.

Work order ↔ service asset/location ID, SLA, skill and inventory requirements

GETTo get the list of tasks and their details/tasksThis is a supporting operation from the selected product stack, not proof of an exact provider contract for this stage. Resolve the stage through its product source or adapter boundary before live implementation.

Record stage 1 with the application identity, source fingerprint, request or aggregate identity, timestamp, and observable outcome.

Technician accepts while another assignment races

Use optimistic aggregate versions and one active assignment invariant; surface conflict instead of last-write-wins.

02
Spatial service context

Assign by skills, shift, inventory, and ETA

Search, asset layers, and mGIS context bind the request to a stable service location, access notes, network assets, and hazards.

Record stage 2 with the application identity, source fingerprint, request or aggregate identity, timestamp, and observable outcome.

Offline commands replay after reassignment

Validate actor, task version, and transition preconditions for every queued command; retain rejected evidence.

03
Workmate lifecycle

Guide the technician

Provider task identity mirrors explicit create, assign, accept, travel, arrive, prove, review/rework, and close transitions through an outbox/callback boundary.

Record stage 3 with the application identity, source fingerprint, request or aggregate identity, timestamp, and observable outcome.

Proof is incomplete

Move to named review/rework with reason and a new submission identity; never overwrite the rejected attempt.

04
Technician experience

Collect checklist, image, and signature proof

Mobile guidance, offline command queue, checklists, evidence capture, and conflict UI operate under scoped task and consent policy.

Record stage 4 with the application identity, source fingerprint, request or aggregate identity, timestamp, and observable outcome.

Technician accepts while another assignment races

Use optimistic aggregate versions and one active assignment invariant; surface conflict instead of last-write-wins.

05
Operations and analytics

Analyze repeat faults spatially

Owned exception/review queues, audit, repeat-fault spatial analysis, and SLA metrics derive from immutable task/evidence history.

Work order ↔ service asset/location ID, SLA, skill and inventory requirements

POSTTo create new Task/tasksThis is a supporting operation from the selected product stack, not proof of an exact provider contract for this stage. Resolve the stage through its product source or adapter boundary before live implementation.

Record stage 5 with the application identity, source fingerprint, request or aggregate identity, timestamp, and observable outcome.

Offline commands replay after reassignment

Validate actor, task version, and transition preconditions for every queued command; retain rejected evidence.

Edit once. Generate eight trusted-runtime implementations.

The recipe starts from the normalized GET /tasks contract. Execute six deterministic fixture outcomes before an issued account is involved.

Local request composerCode stays local · fixtures are explicit
GETRequest inputs
7 editable · 0 protected
Generated in eight languages
Environment-backed credentials
GEThttps://workmate.mapmyindia.com/apis/tasks?startTime=1700000000000&endTime=1700000000000&ownerId=1&assigneeId=1&clientDetails=true&activityDetails=true
Credential-free sandboxExecute this contract without a provider call
How fixtures work
Generated from your inputs
curl --request GET \
  --url 'https://workmate.mapmyindia.com/apis/tasks?startTime=1700000000000&endTime=1700000000000&ownerId=1&assigneeId=1&clientDetails=true&activityDetails=true' \
  --header "Accept: application/json" \
  --header "Authorization: Bearer ${MAPPLS_ACCESS_TOKEN}"

Credential-safe by constructionSet MAPPLS_ACCESS_TOKEN only in your trusted runtime. Code generation stays local. Sandbox execution sends only bounded fixture inputs to this developer platform and never reads a credential or calls Mappls.

Break the journey before customers do.

These controls are required at this operating depth; deeper recipes add durable truth rather than merely more API calls.

Idempotent commandsOptimistic aggregate versionsEvent and receipt timeTransactional outboxUnknown-outcome reconciliationIndependent human decisionsRestart recoveryImmutable audit evidence

Definition of done

Every aggregate has an invariant, expected version, stable command identity, and attributable actor.

Duplicate, late, reordered, invalid, stale, timed-out, and restarted execution preserve one durable truth.

Unknown provider outcomes reconcile by original identity before replay or compensation.

Terminal decisions, human review, audit, outbox delivery, privacy, retention, and rollback remain independently evidenced.

Contracts, tutorials, and journeys stay linked.

Contract set

GETTo get the list of tasks and their details/tasksGETRouting API/{REST_KEY}/{resources}/{profile}/{geopositions}GETTo get the task details for the given task id./tasks/{taskId}GETRouting API with driving profile/{REST_KEY}/{resources}/driving/{geopositions}GETTo get the task list details./taskListsGETRouting API with trucking profile/{REST_KEY}/{resources}/trucking/{geopositions}POSTTo create new Task/tasksGETRouting API with biking profile/{REST_KEY}/{resources}/biking/{geopositions}PUTTo update the task description & status./tasks/{taskId}GETRouting API with walking profile/{REST_KEY}/{resources}/walking/{geopositions}GETGet users attendance details with travelled distance./reports/attendancesGETDistance Matrix Predictive ETA API/{REST_KEY}/distance_matrix_predictive/driving/{coordinates}

Durable state machines

statefulField-service task lifecycle8 states · 8 transitionsstatefulCoordinated incident response7 states · 8 transitionshybridRecoverable navigation session6 states · 6 transitionshybridGoverned spatial analysis7 states · 6 transitionshybridDurable multi-stop itinerary6 states · 9 transitionshybridiOS direction planning and navigation handoff8 states · 8 transitionshybridiOS feedback report and review9 states · 9 transitionshybridConsent-bound location capture evidence8 states · 9 transitionsstatefulGoverned place contribution and publication7 states · 8 transitions

Grid Restoration Desk

Correlate an outage, govern independent switching approval, dispatch an assigned crew, preserve rework, and reconcile restoration from telemetry and customer-impact evidence.

Source-grounded, not authority-granting

This recipe composes source-derived contracts, application architecture, fixtures, and maintained learning evidence. It does not prove package availability, provider payload shape, account entitlement, regional behavior, production compatibility, or release approval.