Hello,
I am new to camunda, and using a spring boot generated project.
I’m trying to store a list in the context variables, and the easiest way I found was to use JSON arrays.
The problem I am having with JSON variables (before using arrays) is that the call of :
execution.setVariable(“myVariable”, myJSONObject);
in a java delegate doesn’t actually add this variable in the process instance variables.
(the variable myJSONObject being a “org.camunda.spin.plugin.variable.value.JsonValue”)
I found similar topics on the subject, but couldn’t find any solution to my problem.
I used to have an error like “Cannot serialize object in variable”, but it disappeared when I tried adding a default value of “application/json” for the property “defaultSerializationFormat” in my process.xml file. (is it really in this file that I was supposed to add this ?)
This only got rid of the error, and didn’t really solve the problem : now the process finishes, but without adding the variable.
I think it has something to do with the serialization of this object when I set it in the instance variables.
Does anyone have an idea please ?