Hi all!
In my project i use externalTaskService java api
List<LockedExternalTask> taskList = camunda.getExternalTaskService()
.fetchAndLock(100, EXTERNAL_WORKER_ID)
.topic(topic, 1L)
.execute();
ExternalTaskDataDto dto = ExternalTaskDataDto.builder()
.taskId(lockedExternalTask.getId())
.processDefinitionId(lockedExternalTask.getProcessDefinitionId())
.processInstanceId(lockedExternalTask.getProcessInstanceId())
.activityId(lockedExternalTask.getActivityId())
.activityInstanceId(lockedExternalTask.getActivityInstanceId())
.variables(lockedExternalTask.getVariables())
.build();
then ExternalTaskDataDto send to apache kafka topic, which is used by opposite side
on remote side i want to receive the message from kafka and handle it.
but, i have an error message about deserialize
2023-09-27 21:03:01.204 ERROR 69701 --- [container-0-C-1] o.s.integration.handler.LoggingHandler : org.springframework.messaging.MessageHandlingException: error occurred in message handler [org.springframework.cloud.stream.function.FunctionConfiguration$FunctionToDestinationBinder$1@15256482]; nested exception is java.lang.RuntimeException: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot find a deserializer for non-concrete Map type [map type; class org.camunda.bpm.engine.variable.VariableMap, [simple type, class java.lang.String] -> [simple type, class java.lang.Object]]
on serviceA I use the following starter
<dependency>
<groupId>org.camunda.community.rest</groupId>
<artifactId>camunda-platform-7-rest-client-spring-boot-starter</artifactId>
<version>7.19.0</version>
</dependency>
so i can use VariableMap class from camunda.
Help please, how to deserialize VariableMap?
Thanks for any ideas.
ps. i hope you understand me, sorry for my english