camunda:assignee="test" camunda:candidateGroups="testGroup"
FilterService filterSvc = engine.getFilterService();
TaskService taskSvc = engine.getTaskService();
IdentityService identitySvc = engine.getIdentityService();
// create a taskQuery
List<Group> groups = identitySvc.createGroupQuery().groupMember(username).list();
String groupId = groups.size() != 0 ? groups.get(0).getId() : "";
TaskQuery myTasksQuery = taskSvc.createTaskQuery().taskCandidateGroup(groupId).active();
// save taskQuery as filter
Filter myTasksFilter = filterSvc.newTaskFilter("My Group Tasks");
myTasksFilter.setOwner("john.doe");
myTasksFilter.setQuery(myTasksQuery);
String filterId = filterSvc.saveFilter(myTasksFilter).getId();
// execute the filter
List<Task> tasks = filterSvc.list(filterId);
return tasks;
--
You received this message because you are subscribed to a topic in the Google Groups "camunda BPM users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/camunda-bpm-users/viNYOP2AHX4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to camunda-bpm-us...@googlegroups.com.
To post to this group, send email to camunda-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/camunda-bpm-users/b3d0ab96-c1b1-4920-82d3-7d38a7887dd9%40googlegroups.com.