cancel
Showing results for 
Search instead for 
Did you mean: 

How to process a set of object in cycle

alper
Champ in-the-making
Champ in-the-making
Hi, I have following problem:

suppose on some stage of my workflow I get an array (or set, or something else iterable) of some homogeneous objects. I need to send each member of this set to another task, process it, return to the set, take another member and repeat until everything in the set is processed; after that the workflow continues executing the following task.
Another option is to have heterogeneous objects and choose the task to process depending on the type of the given object.

How to accomplish that?
Thank you.
3 REPLIES 3

martin_grofcik
Confirmed Champ
Confirmed Champ

alper
Champ in-the-making
Champ in-the-making
I've seen this, thank you. But is there any example showing how to do that? Maybe I am missing the whole conception, but how to pass to the node the pool of objects? How to pass them further? I will have them as json string, or List of POJOs, whatever.
Should I write a class where everything will be done?
Should the set of objects passed as a json or somehow as POJO blob? If blob, then could you explain the mechanism?

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi,

Plenty of examples can be found in activiti jUnit test org.activiti.engine.test.bpmn.multiinstance.MultiInstanceTest.
Regards
Martin