03-15-2016 07:42 PM
public List<Task> findAvailableTasks(String user, List<String> groups) {
Set<Task> availableTasks = new HashSet<Task>();
if (groups!= null && !groups.isEmpty()) {
List<Task> candidateGroupTasks = taskService.createTaskQuery()
.taskCandidateGroupIn(groups)
.list();
availableTasks.addAll(candidateGroupTasks);
}
List<Task> candidateUserTasks = taskService.createTaskQuery()
.taskCandidateUser(user)
.list();
availableTasks.addAll(candidateUserTasks);
List<Task> unassignedTasks = taskService.createTaskQuery()
.taskUnassigned()
.list();
availableTasks.addAll(unassignedTasks);
/* This compiles but returns nothing.
I don't know what I am doing here for sure!
availableTasks = taskService.createTaskQuery()
.taskCandidateGroupIn(groups)
.or()
.taskCandidateUser(user)
.endOr()
.or()
.taskUnassigned()
.endOr()
.orderByTaskPriority()
.desc()
.list();
*/
return new ArrayList<Task>(availableTasks);
}
03-15-2016 09:52 PM
03-15-2016 10:24 PM
03-16-2016 12:07 AM
03-16-2016 02:06 PM
03-16-2016 02:28 PM
03-17-2016 11:34 AM
03-23-2016 01:15 AM
03-25-2016 08:56 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.