-
1. Re: Question regarding jBPM and Actor assignment
gavin.king Nov 21, 2006 10:18 PM (in response to spambob)Correct on both.
Use the pooledTask component to do assignments (check the DVD store for an example).
Your use case is actually 2 different tasks. The approving the order ends the task, and a new task is created for the shipment. An EL value binding in the process definition does the assignment of the new task. -
2. Re: Question regarding jBPM and Actor assignment
spambob Nov 21, 2006 10:49 PM (in response to spambob)Thank you for your answer Gavin.
In the pooledTask component there's only a method to assign the current actor to a task ('assignToCurrentActor()'). Therefore: can we please have a 'assignToActor(String actorId)' method in the pooledTask component - i.e. for a supervisor to assign tasks to his subordinates?!
The 2nd part I probably didn't express clearly. I know that this are two different tasks. The reason I'm asking is because, when the process starts, I have to 'assign' myself to it to move it from the 'pooledTaskInstanceList' to the 'taskInstanceListForType['approve']' list. But, when i approve the task, it's automatically moved to the taskInstanceListForType['ship'].
Therefore I'm assuming that this process is still assigned to me, which means that it wont show up in the 'pooledTaskInstanceList' of other people - as far as I understand it, correct me please if this is wrong.
Now what i want to do is to 'retire' from the process after I finished the 'approve' task so this process shows up in the 'pooledTaskInstanceList' of other people so they can finish the process. How is this 'retiring' possible? -
3. Re: Question regarding jBPM and Actor assignment
spambob Nov 21, 2006 11:08 PM (in response to spambob)Shame on me I mixed it up (perhaps because it's 5am)!
The 2nd part is perfectly clear now, I have to assign myself too for the shipping task.
Sorry for wasting your time.
But i would really love to get a 'PooledTask.assignToActor(String actorId)' method - IMHO it would be very usefull. -
4. Re: Question regarding jBPM and Actor assignment
gavin.king Nov 22, 2006 12:02 AM (in response to spambob)To assign the new task to yourself, you just do <assignment actor-id="#{actor.id}"/>
Or, to assign it to someone else, outject subordinateActorId, and use <assignment actor-id="#{subordinateActorId}"/>
To reassign a task you can use@In JbpmContext jbpmContext; ... jbpmContext.getTaskMgmtSession().loadTaskInstance(taskId).assign(subordinateActorId);
But, just especially for you, I added a couple of new methods to the PooledTask class, so you can do it that way if you prefer. -
5. Re: Question regarding jBPM and Actor assignment
spambob Nov 22, 2006 12:18 AM (in response to spambob)Thank you very much Gavin, much appreciated :)
PS: I never thought of the possibility to outject the new actorId. Although I still have to get used to think this way it's just another proof how damn sweet this concept is.