I am trying to setup multi-instance subprocess, It create the correct number of process but It doesn't assign to none.
I use one java service task to get all users
public class ListUsers implements JavaDelegate {
@Override
public void execute(DelegateExecution execution) throws Exception {
String group = (String) execution.getVariable("group");
List<User> lista = execution.getEngineServices().getIdentityService().createUserQuery().memberOfGroup(group).list();
List<String> usuarios = new ArrayList<>();
for (User user : lista) {
usuarios.add(user.getId());
}
execution.setVariable("listaUsuarios", usuarios);
execution.setVariable("listaUsuariosSize", usuarios.size());
}
}
My multi-instance definition
<subProcess id="subprocessConfirmacaoPresencaReuniao" name="Confirmação de Presença na Reuniao">
<multiInstanceLoopCharacteristics isSequential="false">
<loopDataInputRef>listaUsuarios</loopDataInputRef>
<inputDataItem name="assignee" />
</multiInstanceLoopCharacteristics>
<startEvent id="starteventConfirmacaoPresencaReuniao" name="Start"></startEvent>
<userTask id="confirmarPresenca" name="Confirmar Presença"></userTask>
</subProcess>
I have 4 users in the group, It starts 4 processes correctly but It is not assigned to the users.
Variables
NAME VALUE
group consuni
listaUsuarios [admin, cleo, fozzie, kermit]
listaUsuariosSize 4
Is there anything I am doing wrong? I am using Activiti 5.11.