Tasks with candidate group or no candidate group

I’d like to create a taskquery that returns all tasks with a candidate group that I will provide or without any candidate group. So something like:

List candidateGroups = Arrays.asList(“curators”, “”); // so the curators group or an empty string to indicate no candidate group
List tasks = taskService.createTaskQuery().taskCandidateGroupIn(candidateGroups).list();

Is this possible does anyone know?

Thanks in advance, Mat

No. having no group would be null in the database so the empty string won’t work. Right now, the only way is probably by doing 2 queries.

Thanks @joram ! Do you know what he query would be to get tasks with no candidate group then? I tried taskService.createTaskQuery().taskCandidateGroup(null).list() which caused an exception and also with an empty string which I now know wont work. Thanks again - Mat