Camunda task group assignation

1,763 views
Skip to first unread message

Facundo Farias

unread,
Jan 27, 2015, 5:47:52 AM1/27/15
to camunda-...@googlegroups.com
Hello there!
I am quite new with camunda 7.2, we are using the java API embedded on out platform, basically to handle workflows.
The thing is, I've modeled a new process by using the Eclipse Modeler, I am able to load it and everything goes good, but I am not able to assign any task to a given group. 
So far, I've set the following attributes:

camunda:assignee="test" camunda:candidateGroups="testGroup"

So afterwards, by using the taskService I am able to see that the task was assigned to the given user, but I cannot see the task if I ask for the group. Perhaps is because I don't understand what candidate group means, or how can I assign directly the task to a given group.
In our case, what we want is to create the process and by default, it should be assigned to a given group, so then the users can login and pick the tasks that are already on their group. Is this a valid use case?
Thanks a lot!

Facundo

Daniel Meyer

unread,
Jan 27, 2015, 5:52:56 AM1/27/15
to camunda-...@googlegroups.com
Hi Facundo,

How do you query for the tasks?

Regards,
Daniel

Facundo Farias

unread,
Jan 27, 2015, 5:55:48 AM1/27/15
to camunda-...@googlegroups.com
This what I am doing to get the group tasks:

        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;

Do you find some mistake in it? 

Sebastian Menski

unread,
Jan 27, 2015, 5:57:19 AM1/27/15
to camunda-...@googlegroups.com
Hi Facundo,

please note if a task is assigned to a user it is not returned for the candidate group, because it is already assigned. This post had a similar problem [1].

Cheers,
Sebastian

Facundo Farias

unread,
Jan 27, 2015, 5:59:28 AM1/27/15
to camunda-...@googlegroups.com
Right, so you recommend no to assign the task to a given user at the very beginning and in this way, it will be available for the group?

Facundo Farias

unread,
Jan 27, 2015, 6:16:14 AM1/27/15
to camunda-...@googlegroups.com
Thanks, Sebastian, you were right.

Now I have another question, is there a way to query all the tasks of a given group, it doesn't matter if it is assigned or not?
Example: The help desk group want to see all the tasks that are enqueued on their task-list (assigned or not).

Thanks!


El martes, 27 de enero de 2015, 11:57:19 (UTC+1), Sebastian Menski escribió:

Sebastian Menski

unread,
Jan 27, 2015, 6:16:31 AM1/27/15
to camunda-...@googlegroups.com
Hi Facundo,

if you want to specify that a user of a group should complete a task set the candidate group for this task in your process. If a user then starts to work
on this task it should be assigned to him and so the other users of the candidate group can't see the task anymore and so two users will not work on
the same task.

Cheers,
Sebastian

Sebastian Menski

unread,
Jan 27, 2015, 6:48:43 AM1/27/15
to camunda-...@googlegroups.com
Hi Facundo,

I'm sorry but I'm currently not aware if this is possible with the Java API. Maybe somebody else has a solution for this.

Cheers,
Sebastian

Daniel Meyer

unread,
Jan 27, 2015, 11:05:16 AM1/27/15
to camunda-...@googlegroups.com
Does this feature request correspond to your requirements?


If true, please vote for it

Daniel

Facundo Farias

unread,
Jan 27, 2015, 11:15:22 AM1/27/15
to camunda-...@googlegroups.com
Perfect, I've just voted the feature.
Thanks

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

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages