What are the steps to reproduce your problem?
A sample application is attached for quick reference.
Steps followed
- Installed Camunda spring boot starter 7.15.0-ee
- Created Java Delegate with the name SomeDelegate which sets an object variable in Java API.
- Deployed sample BPMN recreate_error.bpmn
which calls this Java delegate via process application
- Started the server
- Go to tasklist, and start the process instance
- Now in Tasklist, go to the User Task, claim the task and "Load the variable" in generic User Task form
- Submit the generic user task form
- An exception is thrown as shown in the screenshot below
Stack trace shows following as cause:Caused by: com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot construct instance of `test.camunda.DeliveryInformation` (although at least one Creator exists): no String-argument constructor/factory method to deserialize from String value ('{"id":"f8d791db-924e-4def-a63a-da069298b26d","packages":[{"id":"id1","storageAreaId":"areaa1","storageId":"storage1","article":null}],"carrier":"carrier1"}') at [Source: UNKNOWN; line: -1, column: -1] at com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:63) ~[jackson-databind-2.11.3.jar:2.11.3] at com.fasterxml.jackson.databind.DeserializationContext.reportInputMismatch(DeserializationContext.java:1455) ~[jackson-databind-2.11.3.jar:2.11.3] at com.fasterxml.jackson.databind.DeserializationContext.handleMissingInstantiator(DeserializationContext.java:1081) ~[jackson-databind-2.11.3.jar:2.11.3] at com.fasterxml.jackson.databind.deser.ValueInstantiator._createFromStringFallbacks(ValueInstantiator.java:371) ~[jackson-databind-2.11.3.jar:2.11.3] at com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.createFromString(StdValueInstantiator.java:323) ~[jackson-databind-2.11.3.jar:2.11.3] at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromString(BeanDeserializerBase.java:1408) ~[jackson-databind-2.11.3.jar:2.11.3] at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeOther(BeanDeserializer.java:176) ~[jackson-databind-2.11.3.jar:2.11.3] at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:166) ~[jackson-databind-2.11.3.jar:2.11.3] at com.fasterxml.jackson.databind.ObjectMapper._readValue(ObjectMapper.java:4497) ~[jackson-databind-2.11.3.jar:2.11.3] at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2799) ~[jackson-databind-2.11.3.jar:2.11.3] at org.camunda.spin.impl.json.jackson.format.JacksonJsonDataFormatMapper.mapInternalToJava(JacksonJsonDataFormatMapper.java:98) ~[camunda-spin-dataformat-json-jackson-1.10.1.jar:1.10.1] ... 248 common frames omitted
What is the problem?
Deserialization fails for object
What would be the expected behavior:
No error in saving serialized object
Hints (optional):
- This always happens when you submit an object variable from the task form (you can also create a new one and look up the variable in the history, it cannot be deserialized as well).
- The quotation marks used in the serialized String are not handled correctly. This works all fine in the "Add Variable to Process Instance" dialog in Cockpit
This bug makes using the generic task form and using objects in process variables mutually exclusive. Since its mostly about removing one level of escaping, it would be great if this can be fixed soon