# Querying candidate users / groups from TaskService

**URL:** <https://forum.flowable.org/t/querying-candidate-users-groups-from-taskservice/5255>\
**Category:** Flowable Engine\
**Created:** [January 17, 2020, 9:58am UTC](https://forum.flowable.org/t/querying-candidate-users-groups-from-taskservice/5255 "2020-01-17T09:58:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![snic](https://avatars.discourse-cdn.com/v4/letter/s/839c29/32.png) [@snic](https://forum.flowable.org/u/snic)\
**Post date:** [January 17, 2020, 9:58am UTC](https://forum.flowable.org/t/querying-candidate-users-groups-from-taskservice/5255/1 "2020-01-17T09:58:37Z")

</div>

Hi,

I’m trying to integrate flowable into an existing application, the application already has it’s own users, groups, etc.  
I’m using the TaskService to query the active tasks for a process instance, for each task (org.flowable.task.api.Task) returned I want to be able to use the candidate users/groups attributes to raise notifications about the tasks to users within my application.

I can see that org.flowable.bpmn.model.UserTask has access to these attributes, but I can’t see how I can get from a Task to a UserTask.

I’ve seen this [post](https://forum.flowable.org/t/how-to-retrieve-a-task-candidate-groups/887) which is doing something similar, but I’d prefer not to have to pass all possible user groups into the query if possible.

Is there a way to do this? Or do I have to load the process definition XML and parse it to get this information?

Thanks.
