AnsweredAssumed Answered

multiple instance using Collection process variable

Question asked by lojian on Apr 8, 2011
Latest reply on Apr 8, 2011 by lojian
Hi,

I am doing an testing on using Multi-instance activity.

<callActivity id="callPublisherdeploy" name="Deploy All Publishers" calledElement="Publisherdeploy">
    <multiInstanceLoopCharacteristics isSequential="true">
        <loopDataInputRef>ALLPUBLISHERS</loopDataInputRef>
        <inputDataItem name="PUBLISHER" />
    </multiInstanceLoopCharacteristics>
</callActivity>
      

I am using following code to start the process instance:


Collection publishers = new ArrayList();
publishers.add("pub1");
publishers.add("pub2");
publishers.add("pub3");
HashMap<String, Object> params = new HashMap<String, Object>();
params.put("ALLPUBLISHERS",publishers)
runtime.startProcessInstanceByKey("testforeach",params);

It is strange that Activiti reports that:

Variable ALLPUBLISHERS' is not a Collection

Any idea?

Outcomes