In our project we are using multi-instance CallActivity which iterates over a collection of elements.
Now everything is working fine in the project.
We have requirement to make project extendable by other projects which can “plug” in it.
It means that other projects can re-use the flowable diagram and add other kind of elements in the multi-instance collection.
It depends on “plugin” projects what kind of elements can put in the collection and the collection could comprise of different kind of elements. “Plugin” projects must define how to deal with their own elements their own diagrams.
The result should be some kind polymorphism in multi-instance Call Activity.
As far as I can see now such scenario is not supported.
I was looking at DynamicBpmnService and thinking of idea to change called element in Call Activity dynamically depending on some pre-processing of the element.
Other idea is multi-instance collection to accept a map of element names and types, not just list of element names.
Please provide your comments how we can continue and if there is something existing in Flowable so far.
We know what are the elements in the collection before reaching the CallActiviti.
The question is how calledElement can be changed depending the element type.
I can see it similar as DynamicBpmnService::changeServiceTaskDelegateExpression.
For example, we have two types of elements where each of them represents different process definition X and Y.
Multi-instance accepts collection of 3 elements A, B and C, where A represents X, B - Y and C - X.
As a result, we would like that calledElements to be X for first iteration, Y for the second and X for the third.