6 Replies Latest reply on Jul 23, 2007 8:45 AM by harpritt k

    Task assignment

    harpritt k Novice

      is it leagal to assign a task to both an actor and a group.

      The reason i ask is because i want the group users to be able to pick up a task on behalf of the assigned user if he/she is away or leave the company.

      Many thanks

      H

        • 1. Re: Task assignment
          Ronald van Kuijk Master

          whether is is legal or not, I do not know ;-)

          Technically if a task has both an actor and a pooled-actors, it only shows up in the actor tasklist. It can be reassigned though, but you have to build your own query to have a task list of tasks assigned to both a group and an actor

          • 2. Re: Task assignment
            Jason Greiner Newbie

            What might help you in this case is to assign a task to a group, then only assign to the actor when they are ready to work the task.

            J

            • 3. Re: Task assignment
              harpritt k Novice

              Gentlemen

              Thank you for your replies.

              Ive been on the SEAM forum trying to resolve other issues, and forgot about this one.

              i think the group assignment before user is going to be a useable option, the only problem will be the case where a user goes away on holiday and task assignment needs to be moved to another user.

              PS JBPM is very cool

              • 4. Re: Task assignment
                Ronald van Kuijk Master

                J,

                But what if that user suddenly dies? quits his job? or whatever... that was the initial (valid) question

                • 5. Re: Task assignment
                  Jason Greiner Newbie

                  Well here is how I handle it in my app. Certainly not a fool proof solution, but should get you pretty close.

                  When a process enters a task node, I have a swimlane setup with an assignment handler. That assignment handler queries the database and selects a group of users that could work this task and does a group assignment to the task.

                  Then the user sits at their workstation and sees a lists of tasks that they could work...

                  jbpmContext.getGroupTaskList("tasomeone");


                  They would then click on a task to work. When they do I assign the task to them and open the form that they will use to complete the task. I hoping they will live the 1min (and much longer in most cases) it takes to complete the task .

                  taskInstance.start(actorId);


                  Assuming they live long enough to complete the task everything should be fine. Now I understand that like myself through years of drinking, smoking and other activities that I will not mention to keep it PG-13, the users may not be a picture of health. In that case you can call this method on the taskInstance to reassign the user.

                  taskInstance.setActorId("newuser", true);


                  However finding the correct taskInstance is a issue that I am looking into at the moment.

                  Sorry for the long winded explanation, but wanted to give you the full picture of what I was talking about so you can decide how far you wanted to take it. I need to do re-assignments as well because sometimes I will only have 1 actor in a group.....:( Just found that out....

                  Hope this helps.

                  • 6. Re: Task assignment
                    harpritt k Novice

                    thanks for the replies gent

                    they have been very helpful