Assign task to group & getting task assigned to group and user specific

Hi,

  1. I would like to assign task to a group. How do I do it ??? I mean, When the task/request is submitted, it will be assigned to a group. So in flowable design plugin there is a property candidate group. Shall I set it to a dynamic variable or what value ??? This group won’t change and task/request will always go for an approval to this group.
  2. Where do I set this group users so that when users tries to get task, how do I query to get task belonging to the group ???

I am using this below query to get all the task specific to user/assignee

List<HistoricTaskInstance> historicTaskInstance = historyService.createHistoricTaskInstanceQuery().taskAssignee(assignee).list();

I would like to query this as well. This query will get all the task assigned directly to assignee.

So do I have to fire 2 separate queries to get task assigned to groups and then directly assigned to him???

Please suggest me way to go and queries that will be required…

Thanks

  1. Flowable uses the information you’ve set in the candidate group attribute for the queries. So if you set candidateGroup=“sales”, you can later create a TaskQuery using “sales”. Typically, when your request comes in you’ll know or look up to which groups your user belong, and pass that in the query and retrieve/validate the tasks like that.
  2. For the engine this is just a metadata string, it doesn’t do anything with it except storing it.

Yes, those would be two different queries, unless you use the taskCandidateOrAssigned method, but this only works with the internal IDM engine and not when using an external identity store).