activity.updated

This event is raised each time an existing activity is updated. Examples:

  • Adding a workflow session after the activity has started, if it was not available upon starting.
  • When an activity is closed, the system fills in the “end time”, “end mileage”, and “end position” fields.

Payload JSON

{
  "eventId": "d290f1ee-6c54-4b01-90e6-d701748f0851",
  "eventTime": "2025-05-12T22:21:00.000Z",
  "eventOrganizationId": "7e2c1a8b-1f2b-4c3d-9e8a-2b7c1a8b1f2b",
  "subscriptions": [
    {
      "eventSubscriptionIds": "a1c2e3f-4b5d-6e7f-8a9b-0c1d2e3f4a5b",
      "eventsMeta": [
        {
          "eventName": "activity.updated",
          "count": 1
        }
      ],
      "eventsData": [
        {
          "eventType": "activity.updated",
          "eventVersion": 1,
          "eventData": {
            "assetId": "7e2c1a8b-1f2b-4c3d-9e8a-2b7c1a8b1f2b",
            "driverId": "8f3d2b7c-2a8b-4c1d-9e7a-3c2b1a8b2f3d",
            "activityId": "9e7a3c2b-1a8b-4f2d-8c3a-2b7c1a8b3f2d",
            "activityType": "standstill",
            "activityState": "reliable",
            "activityDefinitionId": "1a8b2f3d-3c2b-4e7a-9c1d-8b2f3d1a8b2f",
            "workflowSessionId": "2b7c1a8b-1f2b-4c3d-9e8a-3c2b1a8b1f2b",
            "startTime": "2025-05-12T22:20:00.000Z",
            "endTime": "2025-05-12T22:20:00.000Z",
            "startPosition": {
              "latitude": 50.869,
              "longitude": 2.8942
            },
            "endPosition": {
              "latitude": 50.869,
              "longitude": 2.8942
            },
            "startMileage": 123456.7,
            "endMileage": 123457.7,
            "hasDuration": true,
            "modifiedOn": "2025-05-12T22:20:00.000Z",
            "registeredOn": "2025-05-12T22:20:00.000Z",
            "extraInfo": {
              "coupledAssets": [
                {
                  "assetId": "9ae2c1a8b-1f2b-4c3d-9e8a-2b7c1a8b1f2b",
                  "startTime": "2025-05-12T22:21:00.000Z"
                },
                {
                  "unregisteredAssetName": "trailer2-XHG-937",
                  "startTime": "2025-05-12T10:20:00.000Z",
                  "endTime": "2025-05-12T22:27:00.000Z"
                }
              ]
            }
          }
        }
      ]
    }
  ]
}

Field level description

FieldTypeOptional/RequiredDescription
eventIdstring (UUID)RequiredGUID generated by the core module to identify each event sent to Kafka
eventTimestring (ISO‑8601 datetime)RequiredTime at which the event was sent to Kafka
eventOrganizationIdstring (UUID)RequiredIdentifier of the organization to which the data belongs
subscriptionsarrayRequiredList of subscriptions receiving this event
subscriptions[].eventSubscriptionIdsarrayRequiredIdentifier of the subscription
subscriptions[].eventsMetaarrayRequiredMetadata describing occurrences of event types
subscriptions[].eventsDataarrayRequiredActual domain events for consumers
subscriptions[].eventsMeta[].eventNamestringRequiredName of the event (activity.updated)
subscriptions[].eventsMeta[].countnumber (integer)RequiredNumber of occurrences of this event in eventsData
subscriptions[].eventsMeta[].eventNamestringRequiredName of the event (e.g. activity.updated)
subscriptions[].eventsData[].eventTypestringRequiredEvent type identifier (activity.updated)
subscriptions[].eventsData[].eventVersionnumber (integer)RequiredVersion of the event (always 1)
subscriptions[].eventsData[].eventDataobjectRequiredActivity creation payload
eventData.assetIdstring (UUID)RequiredUnique identifier of the asset
eventData.driverIdstring (UUID)OptionalIdentifier of the driver (nullable)
eventData.activityIdstring (UUID)RequiredUnique identifier of the activity
eventData.activityTypestring (driving, standstill)RequiredActivity type
eventData.activityStatestring (reliable, unreliable)RequiredReliability state of the activity (see Note 2)
eventData.activityDefinitionIdstring (UUID)OptionalActivity definition ID
eventData.workflowSessionIdstring (UUID)OptionalWorkflow session ID
eventData.startTimestring (ISO‑8601 datetime)RequiredTimestamp when the activity started
eventData.endTimestring (ISO‑8601 datetime)OptionalTimestamp when the activity ended
eventData.hasDurationbooleanRequiredIndicates whether activity has a duration
eventData.modifiedOnstring (ISO‑8601 datetime)RequiredLast modification timestamp
eventData.registeredOnstring (ISO‑8601 datetime)RequiredRegistration timestamp
eventData.startPositionobjectOptionalPosition at activity start
eventData.startPosition.latitudenumber (float)RequiredStart latitude
eventData.startPosition.longitudenumber (float)RequiredStart longitude
eventData.endPositionobjectOptionalPosition at activity end
eventData.endPosition.latitudenumber (float)RequiredEnd latitude
eventData.endPosition.longitudenumber (float)RequiredEnd longitude
eventData.startMileagenumber (float)OptionalVehicle mileage at start
eventData.endMileagenumber (float)OptionalVehicle mileage at end
eventData.extraInfoobjectOptionalAdditional event‑specific information
eventData.extraInfo.coupledAssetsarrayOptionalAssets coupled to the main asset during the activity
coupledAssets[].assetIdstring (UUID)OptionalIdentifier of a coupled registered asset
coupledAssets[].unregisteredAssetNamestringOptionalName of an unregistered coupled asset
coupledAssets[].startTimestring (ISO‑8601 datetime)RequiredTimestamp when coupling started
coupledAssets[].endTimestring (ISO‑8601 datetime)OptionalTimestamp when coupling ended
📘

Note 1: A coupled asset entry can represent either a registered asset (assetId) or an unregistered asset (unregisteredAssetName), so those fields are **mutually **exclusive.

📘

Note 2: Reliability state of an activity

An activity is marked unreliable when the system receives signals that contradict each other or make the timeline unclear.

Simple rule

  • Reliable = data is clear and consistent
  • Unreliable = data is conflicting, so accuracy cannot be guaranteed

Typical situations:

  1. Two different events at the exact same time
    Example: one message says “driving” and another says “standstill” at the same timestamp.
  2. Multiple candidate events for the same moment
    The system cannot determine with certainty which one is the real predecessor.
  3. Late or out-of-order messages
    Events arrive after newer events, creating ambiguity in the activity sequence.
  4. Link/unlink inconsistencies
    Driver/assignment transitions conflict with the expected activity flow.

Why this is useful?

The activity is still kept for traceability, but labeled unreliable to show:

  • “This might be correct, but confidence is lower.”
  • “Treat with caution in reporting or investigations.”

Important to know:

An activity being unreliable does not mean it will stay unreliable. It may become reliable again due to late or out‑of‑order events.

These cases are exceptional and should occur only rarely.