Multi-instance to users and groups

I have a variable ‘xxx’ that is an array of groupId or the userId, for example [‘management’, ‘developer’, ‘user01’, ‘service’, ‘user02’, ‘user03’]. The task must be sequentially assigned to the users or groups according to how they are written in the array. How can i tell to flowable that the assigment is a user or a group according to the value of element variabile of the collection (multi instance)?
I use flowable modeler and this is the example that i wrote, but i don’t know what write in assignment box.
Can you help me?

How do you find out that element is group or user?


If you only have an array with mixed userId/groupId, that’s impossible. You will need to be able to tell from the String whether it’s a group or user to do the right assignment.