-
1. Re: Reassign Task Instance to Group
kukeltje May 11, 2006 6:36 PM (in response to hosierdm)setPooledActors() should notr be used WITH setActord(). If the latter is done, it is assigned to that actor. Set it to null to have it show up in the group tasklist (use a group name with pooledactors, not individual actor ids)
-
2. Re: Reassign Task Instance to Group
hosierdm May 11, 2006 6:47 PM (in response to hosierdm)Thanks for the response. Just to make sure I understand, are you saying I should do the following?
taskInstance.setActorId(null); taskInstance.setPooledActors(new String[] {groupName});
-
3. Re: Reassign Task Instance to Group
hosierdm May 12, 2006 1:03 AM (in response to hosierdm)Well, I tried the above code, and it didn't seem to work. My users in the new group do not have visibility of the task when I call JbpmContext.getGroupTaskList().
-
4. Re: Reassign Task Instance to Group
kukeltje May 12, 2006 2:50 AM (in response to hosierdm)that is what I meant, surprises me it does not work. I'll get back to you later
-
5. Re: Reassign Task Instance to Group
tom.baeyens May 12, 2006 3:59 AM (in response to hosierdm)Since this is a recurring question. I checked the docs and indeed the text for this part is really confusing. sorry :-)
So here's the meat of that crappy explanation:
* The actorId denotes the person to which this task is assigned. If a task instance has an actorId, that task will appear in the user's personal task list.
* The pooled actors denote the candidates for the task instance. This means that the task is offered to many users and one has to take it into his/her personal task list in order to start working on it. Taking a task means that the given actor will put his id in the task instance's actorId.
* Now here it comes: a pooled actorId, can be a reference to a user OR a group OR a system.
* So to fetch all the task instances for which a given actor is a candidate (= the user's grouptasklist) you need to do the following:
Make a collection that includes the user's actorId and all the ids of groups that the user belongs to. Then search for task instances that are not in a personal task list (actorId==null) and for which there is a match in the pooled actorIds.
The motivation behind this is that we want to separate the identity component from jBPM task assignment. jBPM only stores Strings as actorIds and doesn't know the relation between the users, groups and other identity information.
is this better ? then i'll replace the original with this in the userguide :-)
regards, tom. -
6. Re: Reassign Task Instance to Group
tom.baeyens May 12, 2006 4:02 AM (in response to hosierdm)ah, and one more thing for ronald,
the actorId can be combined with the pooledActorIds.
when an actorId is present, the pooledActorId is indeed ignored. But there might be a situation in which you want to identify a group of people that can do the job. And immediately select one of the group to do it.
Now if that user says "i'm not qualified" and he wants to put it back in the group, he can just do this by erasing the actorId. -
7. Re: Reassign Task Instance to Group
kukeltje May 12, 2006 4:22 AM (in response to hosierdm)"tom.baeyens@jboss.com" wrote:
when an actorId is present, the pooledActorId is indeed ignored. But there might be a situation in which you want to identify a group of people that can do the job. And immediately select one of the group to do it.
Oh, I agree. That is what we internally need. We are working assignmenthandler that sets the groupname in the pooledactors (we do not use actorid's there) and set the actorid with one person from that group (either random or based on workload etc)