Team,
I have followed the below example
https://github.com/camunda/camunda-bpm-examples/tree/7.20/spring-boot-starter/external-task-client/loan-granting-spring-boot-webapp
to create external task workers for executing services.
However I am facing issue while setting the variable from execute() .
I have tried multiple ways but no luck.
What I want to achieve →
Create a list from external task to pass to collection in multi-instance.
What I tried →
Passing the TypedValue variable by created an ObjectValue of List.
I was closely following this article
https://forum.camunda.io/t/serialization-issue-with-external-tasks/26047
and found out the deserialization issue between client and worker.
Is this resolved now on 7.20.3 or do we have to still do workaround for custom serialization-deserialization ?
PS - I am relatively new to Camunda hence may have missed few details.
Best Regards,
Shubham


Hello @shubham-s1ngh and welcome to the forum,
What eternal task client do you use?
Can you provide a code snippet of the client and the BPMN file?
What Camunda 7 distribution are you using? Embedded Spring Boot client? Camunda Run?
I tried to reproduce the error using the following process:
diagram_1.bpmn (3.1 KB)
I completed the external service task with Postman sending the following body:
{
"id": "ad8df8c5-ccba-11ee-8465-b04f13d97055",
"workerId": "postman",
"variables": {
"var": {
"value": ["test1", "test2"],
}
}
}
Everything worked as expected.
Kind regards
Stephan
Hi Stephan,
Below are the details –
I am writing services in spring-boot-starter-external-task-client which is running as an application independently of Camunda Engine. (connected using camunda.bpm.client.client.base_url )
Camunda version 7.20.3-ee and Spring-boot version 3.2.2
Below is the code snippet –
execute(ExternalTask externalTask, ExternalTaskService externalTaskService)
{
//some business logic implementation returning an ArrayList
List filenamesList = new ArrayList<>();
filenamesList.add("name1.txt");
filenamesList.add("name2.txt");
ObjectValue filenamesObj = Variables.objectValue(filenamesList).create();
externalTaskService.complete(
externalTask, Variables.putValue(“filenames”, filenamesObj));
}
This issue is resolved, after adding spin-dataformat-all dependency to the Engine repository.
I am able to propagate List now through different external tasks.