ProcessEngineException: ENGINE-02025 Variable 'numList' is not from type 'Collection'

I’m beginner to camunda and exploring few options related to sequential using multi-instance activity for a javascript task. …

i am using java script to delegated variables . attached BPMN file numList’ is not from type ‘Collection’
How to resolve this issue

child1.bpmn (2.9 KB)
parent.bpmn (3.4 KB)

When you run Javascript in the JVM then you’ll have to understand a little bit of the JVM’s scripting engine called Nashorn and how it integrates Java and Javascript. In particular, when you create a Javascript array and pass that to a Java method (DelegateExecution#setVariable), then the resulting object does not implement java.util.Collection. You can use Nashorn-specific methods to create Java collections from javascript which should do the job.

Resources: