Posting Object type variable to process-definition start endpoint fails with

Hi,

I am not sure if it is related or not, but I am also having similar issue while posting to start process-definition endpoint.

POST: localhost/rest/process-definition/key/SampleObjectSerialisation/start
{
“variables”:{
  “TestVariable”:{
      “type”:“Object”,
      “value”:“{"foo":"Unfall"}”,
      “valueInfo”:{
               “objectTypeName”:“au.com.bar.model.Testobject”,
               “serializationDataFormat”:“application/json”
                 }
         }
    }
}

I get:

java.lang.IllegalStateException: Object is not deserialized.
at org.camunda.bpm.engine.variable.impl.value.ObjectValueImpl.getValue(ObjectValueImpl.java:86) ~[camunda-commons-typed-values-1.4.0.jar:1.4.0]
at org.camunda.bpm.engine.impl.variable.serializer.jpa.JPAVariableSerializer.canWriteValue(JPAVariableSerializer.java:50) ~[camunda-engine-7.6.0.jar:7.6.0]
at org.camunda.bpm.engine.impl.variable.serializer.AbstractTypedValueSerializer.canHandle(AbstractTypedValueSerializer.java:53) ~[camunda-engine-7.6.0.jar:7.6.0]
at org.camunda.bpm.engine.impl.variable.serializer.DefaultVariableSerializers.findSerializerForValue(DefaultVariableSerializers.java:67) ~[camunda-engine-7.6.0.jar:7.6.0]

My workaround at the moment is passing only primitives and doing all the work in the delegate. Is this the recommended approach?

thanks a lot.

Hi @rafaturtle,

Thanks for reporting this. There is a bug in the JPA variable handling that causes this exception when you submit a serialized object variable. I created a bug report. Workarounds would be using primitives like you already do or disable JPA variables.

Cheers,
Thorben

Hi @thorben,

thanks for the quick reply and fix.

I’m trying to test the fix. I’ve updated my pom to reference 7.7.0-alpha1 but I am still getting the same error.
Spring-Boot: (v1.5.2.RELEASE)
Camunda BPM: (v7.7.0-alpha1)
Camunda BPM Spring Boot Starter: (v2.0.0)

> java.lang.IllegalStateException: Object is not deserialized.
> 	at org.camunda.bpm.engine.variable.impl.value.ObjectValueImpl.getValue(ObjectValueImpl.java:86) ~[camunda-commons-typed-values-1.4.0.jar:1.4.0]
> 	at org.camunda.bpm.engine.impl.variable.serializer.jpa.JPAVariableSerializer.canWriteValue(JPAVariableSerializer.java:50) ~[camunda-engine-7.7.0-alpha1.jar:7.7.0-alpha1]
> 	at org.camunda.bpm.engine.impl.variable.serializer.AbstractTypedValueSerializer.canHandle(AbstractTypedValueSerializer.java:53) ~[camunda-engine-7.7.0-alpha1.jar:7.7.0-alpha1]
> 	at org.camunda.bpm.engine.impl.variable.serializer.DefaultVariableSerializers.findSerializerForValue(DefaultVariableSerializers.java:67) ~[camunda-engine-7.7.0-alpha1.jar:7.7.0-alpha1]
> 	at org.camunda.bpm.engine.impl.persistence.entity.util.TypedValueField.setValue(TypedValueField.java:110) ~[camunda-engine-7.7.0-alpha1.jar:7.7.0-alpha1]
> 	at org.camunda.bpm.engine.impl.persistence.entity.VariableInstanceEntity.<init>(VariableInstanceEntity.java:118) ~[camunda-engine-7.7.0-alpha1.jar:7.7.0-alpha1]

Hi @rafaturtle,

alpha1 is older than yesterday. You can try 7.7.0-SNAPSHOT or wait for the next alpha.

Cheers,
Thorben

Hi Rafael,

please not, that the extension currently does not officially suport Spring Boot 1.5x and camunda > 7.6.x.

There are open issues


Maybe, with your insight, you can have a look if you also experienced the problems described?

Jan