use of org.jbpm.services.task.impl.model.GroupImpl in project jbpm by kiegroup.
the class CollectionUtils method readOrganizationalEntityList.
public static List<OrganizationalEntity> readOrganizationalEntityList(ObjectInput in) throws IOException, ClassNotFoundException {
int size = in.readInt();
List<OrganizationalEntity> list = new ArrayList<OrganizationalEntity>(size);
for (int i = 0; i < size; i++) {
short type = in.readShort();
if (type == 0) {
User user = new UserImpl();
user.readExternal(in);
list.add(user);
} else {
Group group = new GroupImpl();
group.readExternal(in);
list.add(group);
}
}
return list;
}
use of org.jbpm.services.task.impl.model.GroupImpl in project jbpm by kiegroup.
the class TaskFluent method addPotentialGroup.
public TaskFluent addPotentialGroup(String groupId) {
if (assignments.getPotentialOwners().isEmpty()) {
List<OrganizationalEntity> potentialOwners = new ArrayList<OrganizationalEntity>();
assignments.setPotentialOwners(potentialOwners);
}
assignments.getPotentialOwners().add(new GroupImpl(groupId));
return this;
}
Aggregations