Product/components used and version/fix level are you on:
Cumulocity 1015.0.309
Detailed explanation of the problem:
I have implemented a decoder microservice in Java that get called by an lwm2m custom action, queries an external API and then returns a DecoderResult object containing an Event with custom fragments. All seems to work fine, except that the custom fragments are missing in the created events. I used the following project as reference which suggests that custom fragments in events should be possible:
Is this a known issue or am i doing something wrong here?
Example
Decoder service log output showing DecoderResult:
{"alarms":null,"dataFragments":null,"message":null,"success":true,"alarmTypesToUpdate":null,"events":[{"source":{"id":"7660465"},"type":"c8y_LocationUpdate","time":"2023-05-24T08:39:09.683+02:00","text":"Location update","c8y_Position":{"alt":null,"lng":11.56999804,"uncertainty":2342,"fulfilledWith":"WIFI","lat":44.12599975}}],"measurements":null}
Resulting cumulocity event:
{
"creationTime": "2023-05-24T06:39:09.794Z",
"source": {
"name": "My LwM2M Device",
"self": "https://TENANT_URL/inventory/managedObjects/7660465",
"id": "7660465"
},
"type": "c8y_LocationUpdate",
"lastUpdated": "2023-05-24T06:39:09.794Z",
"self": "https://TENANT_URL/event/events/9365743",
"time": "2023-05-24T08:39:09.683+02:00",
"id": "9365743",
"text": "Location update"
}
As can be seen the âc8y_Positionâ custom fragment is missing in the created event. If i take the JSON of the event produced by my microservice and create the event manually via a POST to the â/event/eventsâ endpoint the custom fragments are preserved.
Is your question related to the free trial, or to a production (customer) instance?
Production instance