in [0] you described that camunda-spin can be used to serialize variables from/to json. Camunda-spin uses Jackson for the serialization. How is it possible to configure the Jackson ObjectMapper?
1. When creating the ProcessEngineConfigurationImpl you can define config.setDefaultSerializationFormat("application/json; implementation=tree");
With this configuration camunda-spin is used for serialization/deserialization.
2. To serialize/deserialize types like joda DateTime, the JodaModule [1] can be registered in the ObjectMapper.
ObjectMapper mapper = new ObjectMapper();
mapper.registerModule(new JodaModule());
3. Camunda uses org.camunda.spin.impl.json.tree.JsonJacksonTreeDataFormat#getConfiguredObjectMapper to get the already configured ObjectMapper. How can I define this configuration?
Theoretically you can use
JsonJacksonTreeDataFormat.INSTANCE.getConfiguredObjectMapper().registerModule()
to register a module, but camunda-spin returns spinjar.com.fasterxml.jackson.databind.ObjectMapper and not com.fasterxml.jackson.databind.ObjectMapper
Kind regards,
Stefan
[0] http://docs.camunda.org/latest/guides/user-guide/#process-engine-variable-serialization
[1] https://github.com/FasterXML/jackson-datatype-joda
I configured camunda-spin in my project and it seems to work as expected. I have one question about how the json string is mapped into the database.
The table ACT_RU_VARIABLE has 2 text columns (text_ and text2_). text_ seems to contain the json serialized variable content and text2_ contains the type information. text_ is restricted to varchar(4000) in h2 and to NVARCHAR2(2000) in oracle.
What happens when the json string is longer then the column length of text_?
Kind regards,
Stefan
thanks for the hint abount the renamed variable type!
Till when CAM-2693 will get fixed? We plan to use camunda-spin in our next release and so it has to work on an oracle installation.
Kind regards,
Stefan