Iterate on a list - best practice

Hi.

In a process I have a list on which I need to iterate.
For each value in this list, I need to do 4 tasks (2 human and 2 script).

What is the best practice between :

  1. create a sub-process that is multi-instanciate and each instance do only once the 4 tasks
  2. create a single process that iterate on the list (with an iterator and gateway) ?

If I have a lot of values in my list, I dont know if it is good to instantiate many time th sub-process.

Hi,

I would recommend to go for option 1) using sub-processes. It will help for readability and maintenance and should not have a too strong impact on performance (it should mainly impact volume of data but in a reasonable level). Note that process data you transfer for parent to child process will be duplicated.

If you need to identify the exact difference between the two option it’s possible to setup a benchmark infrastructure using Engine API.

Thanks for this quick answer.
That’s the solution I was planning to use.
As you said, this is easier to maintain.