cancel
Showing results for 
Search instead for 
Did you mean: 

List tasks assigned to specific group

army81
Champ in-the-making
Champ in-the-making
I want to know how to get a list of tasks associated with a group.
I tried to make the filter through the class WorkflowTaskQuery using the following code:
WorkflowTaskQuery query = new WorkflowTaskQuery();
Map<QName, Object> filter = new HashMap<QName, Object>();
filter.put(QName.createQName("{http://www.alfresco.org/model/bpm/1.0}pooledActors"), new NodeRef ("workspace://SpacesStore/a6fb5aeb-3612-48ed-950f-d6a74ca0f00d"));
query.setProcessCustomProps(filter); (or query.setTaskCustomProps(filter))
List<WorkflowTask> tasks =  conAlfresco.getConnection().getAlfrescoCore().getServiceRegistry().getWorkflowService().queryTasks(query);
but the list is always empty, how can I do?
1 REPLY 1

patil
Champ on-the-rise
Champ on-the-rise
Hi,

Alfresco provides api for fetching pooled tasks

getWorkflowService().getPooledTasks(authority)

Try this, in place of authority pass the group name.
Hope it works

Thanks,
Patil