Multi-instance: isSequential as expression

Hi Team,

Would it be possible to extend the framework to support isSequential as expression in the future? For now the value could be “true” or “false”, but not expression. Maybe add flowable:isSequential with expression support additionally to the current isSequential?

At the moment within our project we have a couple of processes which include embedded multi-instance sub-processes.
The decision about sequential or parallel is made during process creation.

What I do as workaround (the same applies to Activiti 5.22 from which we are migrating now) is modify the MultiInstanceActivityBehavior before the Activity element is created.

Also, there is no way to add values to the multiInstanceLoopCharacteristics:collection once created (in our case users to sign the document), I have the workaround too by providing custom MultiInstanceActivityBehavior’s for parallel and sequential sub-processes which has the method to modify the NUMBER_OF_INSTANCES, NUMBER_OF_ACTIVE_INSTANCES etc as it is done in original createInstances() method.

I don’t see this possibility in Activiti, Flowable and also Camunda.

Kind regards
Alexander

Hi Alexander,

I think it would be fine to add support for expressions for the isSequential attribute.
We have on our todo list to make the multi instance execution more dynamic and add the possibility to add and remove executions from the multi instance execution. So it will come, but still needs to be developed.

Best regards,

Tijs

Note that the behaviour is set at parse time and not at runtime. So it’s a bit trickier than making it an expression.
A solution could be to have a wrapper at parse time … that delegates to the right behavior at runtime. @alex.chabatar is this something you’d like to drive with a PR, we can help where needed?

at runtime,i alse need add or remove person/s to the multi-instance user candidate.

That should be possible by changing the identity links that are associated with the user task, this is independent from the multi-instance.