MultiInstance loopDataInputRef through Expression resolves the expression for each Execution created

I’m using the ParallelMultiInstanceBehavior where the loopDataInputRef is an Expression of a Spring Bean that defines an elaborate algorithm for retrieving the Input collection.
Works great, except for the fact that this bean is called each time the execution is initialized.
Now i have to execute the bean method elsewhere to store the collection. ScriptTask doesn’t allow it unless i include secure scripting which i’m not too sure about including for this application.
So now im back to a specially written ServiceTask which has to accompany the MultiInstance pattern at all times. And since it has to be a collection of Object that Object for me is a Map to cart the variables to and fro. Which means there is some unpacking to be done as well on the parallel execution side as well.
Is there a pattern/solution i’m missing?

Example from docs for convenience:
<userTask id="miTasks" name="My Task" flowable:assignee="${assignee}"> <multiInstanceLoopCharacteristics isSequential="true" flowable:collection="${myService.resolveUsersForTask()}" flowable:elementVariable="assignee" > </multiInstanceLoopCharacteristics> </userTask>

It is indeed by design this is done, to allow for dynamic changes at runtime to the multi instance and things like that.

There isn’t a way I can think of that doesn’t involve caching the result (e.g. in a variable). Perhaps with an automatic execution listener that gets added during parse time automatically?

But why would you cater for changes at the point where the multi instances are spawned?
The Collection should be final at that point. Can you imagine if the collection result changes mid-flight and LoopCount no longer reflects the original value?