Hello guys,
I’m trying to set a json process variable through the external task client.
According to the docs I have to create a JsonValue Object:
JsonValue jsonValue = SpinValues.jsonValue(jsonString).create();
externalTaskService.complete(externalTask, Collections.singletonMap("order", jsonValue));
above code results in following error:
org.camunda.bpm.client.exception.ValueMapperException: TASK/CLIENT-01025 Cannot serialize variable 'order'
at org.camunda.bpm.client.impl.ExternalTaskClientLogger.cannotSerializeVariable(ExternalTaskClientLogger.java:199)
at org.camunda.bpm.client.variable.impl.TypedValues.serializeVariables(TypedValues.java:60)
at org.camunda.bpm.client.impl.EngineClient.complete(EngineClient.java:83)
at org.camunda.bpm.client.task.impl.ExternalTaskServiceImpl.complete(ExternalTaskServiceImpl.java:62)
at org.camunda.bpm.client.task.impl.ExternalTaskServiceImpl.complete(ExternalTaskServiceImpl.java:56)
at de.netcombw.orderspring.adapter.CreateContractGdata.lambda$init$0(CreateContractGdata.java:73)
at org.camunda.bpm.client.topic.impl.TopicSubscriptionManager.handleExternalTask(TopicSubscriptionManager.java:152)
at org.camunda.bpm.client.topic.impl.TopicSubscriptionManager.lambda$acquire$0(TopicSubscriptionManager.java:108)
at java.base/java.util.Arrays$ArrayList.forEach(Arrays.java:4390)
at org.camunda.bpm.client.topic.impl.TopicSubscriptionManager.acquire(TopicSubscriptionManager.java:103)
at org.camunda.bpm.client.topic.impl.TopicSubscriptionManager.run(TopicSubscriptionManager.java:87)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: org.camunda.bpm.client.exception.ValueMapperException: TASK/CLIENT-01023 Cannot find serializer for value 'Value 'null' of type 'json', isTransient=false'
at org.camunda.bpm.client.impl.ExternalTaskClientLogger.valueMapperExceptionDueToSerializerNotFoundForTypedValue(ExternalTaskClientLogger.java:189)
at org.camunda.bpm.client.variable.impl.DefaultValueMappers.findMapperForTypedValue(DefaultValueMappers.java:70)
at org.camunda.bpm.client.variable.impl.TypedValues.findSerializer(TypedValues.java:114)
at org.camunda.bpm.client.variable.impl.TypedValues.toTypedValueField(TypedValues.java:92)
at org.camunda.bpm.client.variable.impl.TypedValues.serializeVariables(TypedValues.java:56)
... 10 more