Details
-
Task
-
Resolution: Fixed
-
L3 - Default
-
None
-
None
-
None
Description
Environment (Required on creation):
Java tomcat
Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket):
Basically what I am trying to do is store a complex type (containing like 6 name, value pairs) in a variable in the database and retrieve them later.
I'm trying to write a JSON object as a string into a SpinValue and getting an error when setting the variable.
Here's my code:
==============================================
String json = "{\"name\" : \"jonny\","
+ "\"address\" :
"
+ "}";
JsonValue jsonValue = SpinValues.jsonValue(json).create();
execution.setVariable("customerJonny", jsonValue);
=============================================
It throws this exception:
org.camunda.bpm.engine.ProcessEngineException: Cannot find serializer for value 'Value 'null' of type 'json', isTransient=false'.org.camunda.bpm.engine.ProcessEngineException: Cannot find serializer for value 'Value 'null' of type 'json', isTransient=false'. at org.camunda.bpm.engine.impl.variable.serializer.DefaultVariableSerializers.findSerializerForValue(DefaultVariableSerializers.java:88) at org.camunda.bpm.engine.impl.persistence.entity.util.TypedValueField.setValue(TypedValueField.java:122) at org.camunda.bpm.engine.impl.persistence.entity.VariableInstanceEntity.<init>(VariableInstanceEntity.java:129) at org.camunda.bpm.engine.impl.persistence.entity.VariableInstanceEntity.create(VariableInstanceEntity.java:148) at org.camunda.bpm.engine.impl.persistence.entity.VariableInstanceEntityFactory.build(VariableInstanceEntityFactory.java:31) at org.camunda.bpm.engine.impl.persistence.entity.VariableInstanceEntityFactory.build(VariableInstanceEntityFactory.java:25) at org.camunda.bpm.engine.impl.core.variable.scope.AbstractVariableScope.setVariableLocal(AbstractVariableScope.java:369) at org.camunda.bpm.engine.impl.core.variable.scope.AbstractVariableScope.setVariable(AbstractVariableScope.java:342) at org.camunda.bpm.engine.impl.core.variable.scope.AbstractVariableScope.setVariable(AbstractVariableScope.java:335) at org.camunda.bpm.engine.impl.core.variable.scope.AbstractVariableScope.setVariable(AbstractVariableScope.java:310) at jpl.cws.engine.CwsEngineProcessApplication$2.notify(CwsEngineProcessApplication.java:442)