ENGINE-02025 Variable is not from type 'Collection'

Hi,

I am new to Camunda ,and I am trying to implement multiple instance.
I have an issue, I am not able to set the Collection for a multi Instance Task. I got the error
ENGINE-02025 Variable ‘assigneeList’ is not from type ‘Collection’

<bpmn2:userTask id="validation2" name="Validation_2" camunda:assignee="${assigneeInstance}">
  <bpmn2:incoming>SequenceFlow_17n480w</bpmn2:incoming>
  <bpmn2:outgoing>SequenceFlow_1ib9q56</bpmn2:outgoing>
  <bpmn2:multiInstanceLoopCharacteristics camunda:collection="assigneeList" camunda:elementVariable="assigneeInstance">
    <bpmn2:completionCondition xsi:type="bpmn2:tFormalExpression"><![CDATA[${nrOfCompletedInstances/nrOfInstances >= 0.5 }]]></bpmn2:completionCondition>
  </bpmn2:multiInstanceLoopCharacteristics>
</bpmn2:userTask>

The code to generate the

        Collection<String> assigneeList = new ArrayList<String>();
        assigneeList.add("chef1")
        assigneeList.add("chef2")
        assigneeList.add("chef3")
        runtimeService.setVariable(executionId, "assigneeList", assigneeList)

The error message:

ERROR engine.context - ENGINE-16004 Exception while closing command context: ENGINE-02025 Variable ‘assigneeList’ is not from type ‘Collection’.

Need a help.

Regards,

Alioune.

Hi @abadiane,

Could you please share the entire stacktrace? When do you add the process variable assigneeList to the process instance before the multi instance task is executed?

Cheers,
Roman

Hi Roman,

parallele_gateway_multipleInstances.bpmn (6.8 KB)

Hi Roman,

Please find attached the bpmn.
Now it works perfectly after a full restart. I don’t know what was wrong.
The multi instances parallel tasks are created successfully using the collection below.

        Collection<String> assigneeList = new ArrayList<String>();
        assigneeList.add("chef1")
        assigneeList.add("chef2")
        assigneeList.add("chef3")
        runtimeService.setVariable(executionId, "assigneeList", assigneeList)

Thank you again for your help.

Regards,

Alioune.

How can we do this on camunda-external-task-client-js ?