Data type of variables changes during process execution: Object -> String

Hello everyone,

in the context of a process, variables that are first of type LinkedHashMap and ArrayList are converted to string in the context of process execution, which leads to errors in the context of further processing.

->Do you know how I can avoid this?

testProcess_demo.bpmn (16.6 KB)
ModifyImpactForm.form (613 Bytes)

My setup:
• Camunda Modeler v4.11.1
• Camunda BPM Run v7.16
• Configuration: default.yml → default-serialization-format: application/json (=>camunda.bpm:)
• OpenJDK v15.0.2
• OS: Windows 10

Walkthrough (Example):

  • First of all, the variables are correctly set as LinkedHashMap and ArrayList.

  • The variable values are also correct for LinkedHashMap and ArrayList.

  • Now, I fill in the User Task Form in the task list and submit it.

  • After that I can get the effect that the object variables (LinkedHashMap, ArrayList) are converted as String. If now an attempt is made to access the variables within the scripts, the following error occurs in the log:

java.lang.ClassCastException: class java.lang.String cannot be cast to class java.util.Collection (java.lang.String and java.util.Collection are in module java.base of loader 'bootstrap')
        at org.camunda.bpm.engine.impl.bpmn.behavior.MultiInstanceActivityBehavior.evaluateCollectionVariable(MultiInstanceActivityBehavior.java:90) ~[camunda-engine-7.16.0.jar!/:7.16.0]
        at org.camunda.bpm.engine.impl.bpmn.behavior.MultiInstanceActivityBehavior.performInstance(MultiInstanceActivityBehavior.java:78) ~[camunda-engine-7.16.0.jar!/:7.16.0]
        at org.camunda.bpm.engine.impl.bpmn.behavior.SequentialMultiInstanceActivityBehavior.complete(SequentialMultiInstanceActivityBehavior.java:58) ~[camunda-engine-7.16.0.jar!/:7.16.0]
        at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityEnd.execute(PvmAtomicOperationActivityEnd.java:105) ~[camunda-engine-7.16.0.jar!/:7.16.0]
        at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityEnd.execute(PvmAtomicOperationActivityEnd.java:35) ~[camunda-engine-7.16.0.jar!/:7.16.0]
        at org.camunda.bpm.engine.impl.interceptor.AtomicOperationInvocation.execute(AtomicOperationInvocation.java:99) ~[camunda-engine-7.16.0.jar!/:7.16.0]

Best Regards and many thanks for your effort in advance

LSchoenfeld