plannedPlanned
Stops, service window, asset, driver, and business identifiers are fixed enough to create the trip.
Provision an observable trip, follow live vehicle state, explain exceptions, close deliberately, and retain a replayable operational record.
A state is not a UI label. It determines which actor may act, what evidence exists, what may be retried, and how recovery proceeds.
plannedStops, service window, asset, driver, and business identifiers are fixed enough to create the trip.
readyThe trip and assigned device are provisioned, entitled, and emitting sufficiently fresh location.
activePositions, events, progress, ETA, and exception state are continuously observed.
exceptionA deviation, delay, device gap, geofence, or safety event requires operator attention.
closingArrival is plausible but late events, final proof, and device state are still being reconciled.
closedterminalThe provider trip and internal aggregate are closed with a final trace, metrics, and exception record.
Commands express intent. The aggregate validates current state and invariants, commits one new version, and emits a fact in the same transaction.
create_tripFleet plannertrip.createdUse the dispatch or order journey ID across retries.
confirm_device_readyTelematics serviceplannedtrip.readyBind the decision to device identity and observed health version.
raise_exceptionTelematics serviceactiveexceptiontrip.exception_raisedDerive a stable key from rule, asset, and source-event identity.
resolve_exceptionOperations controllerexceptiontrip.exception_resolvedRecord acknowledgement and resolution command IDs separately.
request_closeDriveractiveexceptiontrip.close_requestedThe same close request may be safely replayed while finalization runs.
close_tripTelematics serviceclosingtrip.closedProvider close and internal completion must reconcile to one terminal version.
Keep provider responses, business identity, state, events, and side-effect delivery distinct so each can be reconciled safely.
Current operational state and identity mapping.
tripIdexternalIdproviderTripIddeviceIdstateversionImmutable position and vehicle observation.
sourceEventIddeviceIdeventTimereceivedTimepositionqualityOperator-owned acknowledgement and resolution workflow.
caseIdruleseverityownerstatussourceEventIdsRecomputed summary when bounded late data arrives.
tripIdrevisioninputWatermarkmetricsgeneratedAtA device is assigned to at most one active trip in the same operational context.
Raw telemetry is immutable and distinguished by event time and receipt time.
Derived live state can be rebuilt from ordered observations and commands.
Trip closure never discards unresolved exceptions or data gaps.
Every provider identifier is mapped to the internal trip and tenant.
Recovery changes durable truth only through the same rules as normal operation. A timeout is an unknown outcome, not evidence that nothing happened.
Event time is behind the trip watermark or its sequence creates a gap.
Store raw input, recompute the bounded affected window, and publish a new derived revision.
Freshness exceeds the vehicle-specific health threshold.
Raise a connection exception, show last-known time explicitly, and avoid extrapolating authoritative position.
Internal trip remains closing while provider detail reports closed.
Reconciliation closes the internal aggregate with the original command identity.
A control-plane version differs from the assignment captured at trip start.
Use an explicit transfer transition and retain both assignment intervals.
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/trips/trips/trips/{id}/trips/{id}/close/devices/devices/{deviceId}/eventsmappls-intouch-rest-apismappls-intouch-android-sdkmappls-intouch-ios-sdkmappls-intouch-ios-distributionmappls-intouch-ios-distribution-basemapmyindia-intouch-ios-sdkmappls-react-native-intouch-sdk7 verified tests