durable operation2–3 hr5 stages8 code languages

Operating journey: Route coordinated response under pressure

Reduced time to scene and safer decisions across dispatch, responders, and command.

The real-world moment

A caller reports a road collision near an informal landmark while multiple units are returning from other incidents. The control room must resolve location confidence, choose capable available responders using fresh positions and vehicle-aware ETA, update routes around hazards, prevent double dispatch, prove arrival, and replay the incident for review.

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
CAD incident record

Resolve location from address, pin, or device

Owns call, incident identity, priority, location revisions, assigned resources, hazards, resolution and review.

Incident location ↔ revision, source, confidence, confirmer

GETAutoSuggest API/api/places/search/jsonThis normalized operation matches the stage intent and remains subject to its source, lifecycle, authentication, entitlement, host, and regional gates.

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

Caller description produces multiple locations

Show ranked candidates and confidence to the call taker; record confirmation and every revision.

02
Location resolution

Find eligible nearby responders

Combines address, landmark, Mappls Pin and consented device evidence while retaining candidates, confidence and human confirmation.

Unit eligibility ↔ capability, availability, jurisdiction, telemetry freshness

GETGeocode API/api/places/geocodeThis 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 2 with the application identity, source fingerprint, request or aggregate identity, timestamp, and observable outcome.

Unit position is stale

Exclude from automated ranking or mark ETA unavailable; request fresh evidence and let an accountable dispatcher decide.

03
Resource and route service

Route with vehicle constraints

Filters capability/availability/jurisdiction first, then uses matrix/route evidence with freshness and deterministic dispatch policy.

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

Hazard changes after dispatch

Append a hazard revision, compute a new route identity, notify assigned units and retain both plans.

04
Live coordination

Track units and changing hazards

Ingests event-time unit telemetry and hazard revisions, derives progress and arrival evidence, and blocks one unit from two active incidents.

Arrival/resolution ↔ objective evidence, actor, times, open-hazard/exception checks

GETGets the list of all the nearby devices./devices/nearbyThis 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 4 with the application identity, source fingerprint, request or aggregate identity, timestamp, and observable outcome.

Caller description produces multiple locations

Show ranked candidates and confidence to the call taker; record confirmation and every revision.

05
Command and review

Replay the incident for review

Role-specific views, immutable actions, communication references, late evidence and outcome metrics support command and after-action review.

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

Unit position is stale

Exclude from automated ranking or mark ETA unavailable; request fresh evidence and let an accountable dispatcher decide.

Edit once. Generate eight trusted-runtime implementations.

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

Local request composerCode stays local · fixtures are explicit
GETRequest inputs
7 editable · 1 protected
Generated in eight languages
Environment-backed credentials
GEThttps://atlas.mapmyindia.com/api/places/search/json?query=mapmyindia&location=28.612964%2C77.229463&region=IND&pod=CITY&filter=pin%3A110001&bridge=true&hyperLocal=true
Credential-free sandboxExecute this contract without a provider call
How fixtures work
Generated from your inputs
curl --request GET \
  --url 'https://atlas.mapmyindia.com/api/places/search/json?query=mapmyindia&location=28.612964%2C77.229463&region=IND&pod=CITY&filter=pin%3A110001&bridge=true&hyperLocal=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

GETAutoSuggest API/api/places/search/jsonGETRouting API/{REST_KEY}/{resources}/{profile}/{geopositions}GETGets the list of all the nearby devices./devices/nearbyGETNearby API/api/places/nearby/jsonGETRouting API with driving profile/{REST_KEY}/{resources}/driving/{geopositions}GETGets the live data of devices./deviceGETGeocode API/api/places/geocodeGETRouting API with trucking profile/{REST_KEY}/{resources}/trucking/{geopositions}GETGets the historical location events of a device./devices/{deviceId}/eventsGETText Search API/api/places/textsearch/jsonGETRouting API with biking profile/{REST_KEY}/{resources}/biking/{geopositions}GETGets drive details of a device./devices/drives

Durable state machines

statefulConnected fleet trip6 states · 7 transitionsstatefulFleet geofence exception6 states · 5 transitionsstatefulCoordinated incident response7 states · 8 transitionshybridRecoverable navigation session6 states · 6 transitionshybridGoverned spatial analysis7 states · 6 transitionshybridDurable multi-stop itinerary6 states · 9 transitionsstatefulConsented address verification9 states · 11 transitionshybridiOS direction planning and navigation handoff8 states · 8 transitionshybridiOS geofence draft and publication boundary6 states · 6 transitions

Care Transfer Desk

Confirm the correct receiving entrance, assign eligible transport, preserve courier custody, review condition exceptions, and reconcile receiver acceptance without retaining patient or clinical data.

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.