activity.created
This event is raised each time an new activity is created. Examples:
- An asset starts or stops driving.
- A driver selects or initiates an activity.
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.created",
"count": 1
}
],
"eventsData": [
{
"eventType": "activity.created",
"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:30: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
| Field | Type | Optional/Required | Description |
|---|---|---|---|
| eventId | string (UUID) | Required | GUID generated by the core module to identify each event sent to Kafka |
| eventTime | string (ISO‑8601 datetime) | Required | Time at which the event was sent to Kafka |
| eventOrganizationId | string (UUID) | Required | Identifier of the organization to which the data belongs |
| subscriptions | array | Required | List of subscriptions receiving this event |
| subscriptions[].eventSubscriptionIds | array | Required | Identifier of the subscription |
| subscriptions[].eventsMeta | array | Required | Metadata describing occurrences of event types |
| subscriptions[].eventsData | array | Required | Actual domain events for consumers |
| subscriptions[].eventsMeta[].eventName | string | Required | Name of the event (activity.created) |
| subscriptions[].eventsMeta[].count | number (integer) | Required | Number of occurrences of this event in eventsData |
| subscriptions[].eventsMeta[].eventName | string | Required | Name of the event (e.g. activity.created) |
| subscriptions[].eventsData[].eventType | string | Required | Event type identifier (activity.created) |
| subscriptions[].eventsData[].eventVersion | number (integer) | Required | Version of the event (always 1) |
| subscriptions[].eventsData[].eventData | object | Required | Activity creation payload |
| eventData.assetId | string (UUID) | Required | Unique identifier of the asset |
| eventData.driverId | string (UUID) | Optional | Identifier of the driver (nullable) |
| eventData.activityId | string (UUID) | Required | Unique identifier of the activity |
| eventData.activityType | string (driving, standstill) | Required | Activity type |
| eventData.activityState | string (reliable, unreliable) | Required | Reliability state of the activity (see Note 2) |
| eventData.activityDefinitionId | string (UUID) | Optional | Activity definition ID |
| eventData.workflowSessionId | string (UUID) | Optional | Workflow session ID |
| eventData.startTime | string (ISO‑8601 datetime) | Required | Timestamp when the activity started |
| eventData.endTime | string (ISO‑8601 datetime) | Optional | Timestamp when the activity ended |
| eventData.hasDuration | boolean | Required | Indicates whether activity has a duration |
| eventData.modifiedOn | string (ISO‑8601 datetime) | Required | Last modification timestamp |
| eventData.registeredOn | string (ISO‑8601 datetime) | Required | Registration timestamp |
| eventData.startPosition | object | Optional | Position at activity start |
| eventData.startPosition.latitude | number (float) | Required | Start latitude |
| eventData.startPosition.longitude | number (float) | Required | Start longitude |
| eventData.endPosition | object | Optional | Position at activity end |
| eventData.endPosition.latitude | number (float) | Required | End latitude |
| eventData.endPosition.longitude | number (float) | Required | End longitude |
| eventData.startMileage | number (float) | Optional | Vehicle mileage at start |
| eventData.endMileage | number (float) | Optional | Vehicle mileage at end |
| eventData.extraInfo | object | Optional | Additional event‑specific information |
| eventData.extraInfo.coupledAssets | array | Optional | Assets coupled to the main asset during the activity |
| coupledAssets[].assetId | string (UUID) | Optional | Identifier of a coupled registered asset |
| coupledAssets[].unregisteredAssetName | string | Optional | Name of an unregistered coupled asset |
| coupledAssets[].startTime | string (ISO‑8601 datetime) | Required | Timestamp when coupling started |
| coupledAssets[].endTime | string (ISO‑8601 datetime) | Optional | Timestamp 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:
- Two different events at the exact same time Example: one message says “driving” and another says “standstill” at the same timestamp.
- Multiple candidate events for the same moment The system cannot determine with certainty which one is the real predecessor.
- Late or out-of-order messages Events arrive after newer events, creating ambiguity in the activity sequence.
- 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.
Updated about 1 month ago