Querying candidate users / groups from TaskService


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 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?


1 Like