How to send cloudEvent object to camunda process

I am consuming messages from a kafka topics, the messages consumed from the queue are standards CloudEvent instance.
So how could I send this message in CloudEvent format in camunda ???
I tried to assign the type to object but it doesn’t work, still a parsing error.
However I tried sending other variable of type string for example and it works, but not if I send an “Object” type.

I created the following variables and called the following endpoint:

POST /process-definition/key/

{
“variables”:{
“event_source”:{
“value”:“CloudEvent{id=‘uuid’, source=xxxx, type=‘xxxx.Person’, datacontenttype=‘application/json’, subject=‘SUBJECT’, time=2021-08-12T08:00:05.608Z, data=BytesCloudEventData{value=[123, 34, 118, 101, 114, 115, 105, 111, 110, 34, 58, 34, 49, 46, 49, 46, 48, 34, 44, 34, 105, 100, 34, 58, 34, 98, 57, 102, 101, 55, 56, 97, 57, 45, 53, 52, 52, 54, 45, 52, 53, 53, 100, 45, 56, 52, 55, 53, 45, 100, 53, 100, 56, 49, 100, 56, 54, 49, 53, 102, 102, 34, 44, 34, 114, 101, 102, 101, 114, 101, 110, 99, 101, 34, 58, 34, 65, 84, 95, 80, 82, 69, 80, 82, 79, 68, 95, 49, 49, 49, 53, 34, 44, 34, 110, 117, 109, 98, 101, 114, 34, 58, 49, 49, 49, 53, 44, 34, 99, 117, 114, 114, 101, 110, 99, 121, 95, 99, 111, 100, 101, 34, 58, 34, 69, 85, 82, 34, 44, 34, 115, 116, 97, 116, 117, 115, 95, 99, ]}, extensions={host=localhost:8080, dataversion=1.1.0}}”,
“type”:“object”
},
“source”:{
“value”:"{“lastname”:“Six”,“name”:“Monarc”}",
“type”:“Object”,
“valueInfo”:{
“objectTypeName”:“io.cloudevents.CloudEvent”,
“serializationDataFormat”:“application/cloudevents+json”
}
}
},
“businessKey”:“mon_business_key”
}

So, for now I can send the variable in camunda but it can’t deserialize the Object so I have this error on camunda when I try to see the variable =>

Object Type Name: io.cloudevents.CloudEvent
Serialization Data Format: application/cloudevents+json
Deserialization Error: Cannot deserialize object in variable ‘source’: SPIN-PLUGIN-01002 Fallback serializer cannot handle deserialized objects

an idea?

Thank you

Hi @Volalpi! This thread may have some answers for you in regards to the error you’re seeing. In particular, I would take a look at Process Variables | docs.camunda.org.

I hope this information helps! :slight_smile:

Thnka you for your reply, I already check on this page before, but it seems that none of these answers corresponds to my concern, for the sending of the variables of type, string, integer or a Java Object, I have no problem, but if I send a type of CloudEvent object which has the content-type “application/cloudevents+json”, there’s an error in camunda process when I try click on current process and see the deserialize the deserialize tab


an idea?

Thank you