-
1. Re: Task assignment via pooled actor
appendix Sep 12, 2006 4:32 AM (in response to appendix)Here's a follow-up to my previous post....
I've started the debugger to look into PooledTaskInstanceList.getPooledTaskInstanceList() to see why the task is never assigned if the actorId is used instead of a group of the actor.public List<TaskInstance> getPooledTaskInstanceList() { List<TaskInstance> pooledTaskInstanceList = new ArrayList<TaskInstance>(); Set<String> actorIds = Actor.instance().getGroupActorIds(); for (String actorId: actorIds ) { pooledTaskInstanceList.addAll( ManagedJbpmContext.instance().getTaskMgmtSession().findPooledTaskInstances(actorId) ); } return pooledTaskInstanceList; }
Please correct me if I'm wrong, but with this code there seems to be no assignment via the actorId itself. Just the groupIds of the actor are used, despite the userguide documentation (Chapter 16.4.26 assignment) states a different fact.
Is the userguide outdated or do I miss something here? I'm using Seam 1.0.1.GA
Thanks for any help. -
2. Re: Task assignment via pooled actor
gavin.king Sep 13, 2006 1:14 PM (in response to appendix)Look at the DVD store example to see how to do this.
-
3. Re: Task assignment via pooled actor
appendix Sep 14, 2006 3:06 AM (in response to appendix)Thank you Gavin for your answer.
Looking at the process definitions in the DVD store example there are two different ways of assignment:
1) pooled-actors="#{shipperAssignment.pooledActors}"
2) pooled-actors="reviewers"
As far as I understood both ways work via groups assigned to the actor (in LoginAction) and not the actorId itself as stated as possible in the documentation. Because I've tried this, this has been the initial question of my post.
Ad 1)
shipperAssignment.pooledActors returns a comma separated list of Ids, which I do understand as groupId's (because they match the groups assigned to the actor after login) and not the actorIds ("manager")
Ad 2)
"reviewers" is not an actorId, it's a groupId
Maybe I'm missing a point, but I don't see any example of assigning a pooled task through an actorId.
Again, thank you for sticking to the topic.
Regards, Kurt -
4. Re: Task assignment via pooled actor
gavin.king Sep 14, 2006 4:50 AM (in response to appendix)By *definition*, a pooled task is assigned to an actor id, not a group id!
You assign a pooled task to a particular actor via the pooled task list.
You can of course assign a task immediately to an actor id, but then it appears in the task list, not the pooled task list. -
5. Re: Task assignment via pooled actor
appendix Sep 15, 2006 10:23 AM (in response to appendix)Hi Gavin,
thanks again for trying to clearify this issue.
I've read in the documentation that a pooled task is assigned to an actorId as well, but I've tried it with the very plain example (my initial post). Also the DVD store example is using a groupId [1] to get the task on the pooledTaskInstanceList.
Please don't get me wrong, I don't want to be picky! I just would like to understand, why the code from my initial post wouldn't get the task to the pooledTaskInstanceList (for the currently logged in user=actor="admin").
Have a great weekend!
Regards, Kurt
[1] snippet in LoginAction.login():(actor.getGroupActorIds().add("reviewers");