Batching a List Parameter

What is the easiest and most efficient way to batch a List received in a microflow as a parameter? I know I can batch using retrieve but this will not work for my application. I would like to take a single list as input and then count the number of elements in that list. Then i would like to break the list in to x batches and do calculations on each batch because of a limitation of an external API, the batching is also needed to help with application performance. I can not batch using a retrieve as not all the data in the database is being used to do the calculations and there is no way of determining the list of parameters that should be included in a batch as they may grow or change depending on what happens in the application. So is there a way to batch a list in mendix without using retrieve? Or should I implement a java action, note that this option is there but will greatly impact application performance and wait time.
1 answers

You could take a look at the community commons. We still have the AddToBatch and CommitBatch function. So you could iterate over the list and use a counter to add each item to a batchset and do a CommitBatch when the counter reaces a value.