ArrayList Deserialization error

Hi
I am adding a variable of type ArrayList using this Rest API Update/Delete Process Variables | docs.camunda.org

The variable is getting updated. But the transition to the next service task (which is an external task) gives me below deserialization error:

org.camunda.bpm.client.impl.EngineClientException: CAMUNDA_EXTERNAL_TASK_CLIENT-02010 Exception while deserializing variable cases: value does not match to the type object\r\n\tat org.camunda.bpm.client.impl.EngineClientLogger.exceptionWhileDeserializingVariablesWrongType(EngineClientLogger.java:72)\r\n\tat org.camunda.bpm.client.impl.variable.VariableMappers.deserializeVariables(VariableMappers.java:84)\r\n\tat org.camunda.bpm.client.topic.impl.TopicSubscriptionManager.lambda$acquire$1(TopicSubscriptionManager.java:98)\r\n\tat java.util.Arrays$ArrayList.forEach(Arrays.java:3880)\r\n\tat org.camunda.bpm.client.topic.impl.TopicSubscriptionManager.acquire(TopicSubscriptionManager.java:91)\r\n\tat org.camunda.bpm.client.topic.impl.TopicSubscriptionManager.run(TopicSubscriptionManager.java:65)\r\n\tat java.lang.Thread.run(Thread.java:745)\r\n

Which I understand is because I am adding an ArrayList but in cockpit the type shows as “Object”.

My variable “cases” is and Arraylist: [“abc”,“xyz”]

I cant serialize the variable as String/json , coz I need it to be an instance of Collection. Since I will be using this ArrayList as my collection to invoke multi-instances. So how can i make it happen.?

Please help me.

Hello @Urvashi_Prasad

Have to solved this problem? I have a similar issue Convert a variable of type java.util.ArrayList so I can access it with JS

Regards