1 Reply Latest reply on Sep 28, 2010 4:28 AM by Jimmy Smith

    Find Members of a Group for Auto-Assigning a Task

    Adwait Chitaley Newbie



      Please peruse the following:


      1) I want to assign a task automatically to one of the member in a group. I propose using Assignment Handlers to perform this task using the following steps:


      a) Find all members of the group to which this task can be assigned.

      b) Check the current count of tasks assigned to every such user.

      c) For the user with the lowest workload, assign the current task.


      I am however unable to obtain the list of members forming the group.



      My Queries on above situation:


      1) How can I derive a list of members of a Group?

      2) Is there any other method of achieving this than using Assignment handlers?

        • 1. Re: Find Members of a Group for Auto-Assigning a Task
          Jimmy Smith Newbie

          You'll have to do this in an AssignmentHandler, but should be pretty easy.


          You will have to look at the IdentityService and providing your custom implementation of that.


          Specifically, you will need to implement:


          public List<User> findUsersByGroup(String groupId)


          to get the users in your group. Once you have those, you can easily use:




          to get the tasks for every user in the group and assign your new task to the user with the fewest tasks.


          When automatically assigning tasks, you also have to have a mechanism that checks that the user is capable of processing the task. Its no use assigning tasks to a user who just went on a 6-month maternaty leave! Typically we try to avoid auto-assigning of tasks. But we do have proper reporting that indicates which tasks are left unattended and which users are underperforming.