[jboss-user] [jBPM] - Dynamic User Task assignment

Franck cdsosi do-not-reply at jboss.com
Fri Dec 28 09:08:18 EST 2012

Franck cdsosi [https://community.jboss.org/people/cdsosi] created the discussion

"Dynamic User Task assignment"

To view the discussion, visit: https://community.jboss.org/message/785210#785210

Hi community,

I am digging into jBPM5 and I have a question dealing with User Task Assignment. I went through several posts about something similar but can not really find an answer to my question...
The simple and usual way with User Taks is to assign fixed actor(s) or group(s) but if my User Task assignment relies on process data or even event?
I know you can do something like what is done with Evaluation.bpmn process that is to say use a #{employee} as potentionalOwner and set value of employee variable at process start.
What would be the solution if I want to assign a User Task to an actor dynamically and based a specific algorithm not just an input field value. Some questions about this situation to get best practise or orientation from community :
1. Is the use of a variable as potential owner (e.g.  #{employee}) the "good" way to handle this kind of situation?* is possible to set it as group id?
* other way or solution to set dynamically my actor or group ID? Can a User Task actor or group id be left blank and assigned programmatically? => I've read somewhere that when a user Task is reached at process runtime it must assigned to an actor or group at least Administrator. => "By default, jBPM registers a special user with userId "Administrator" as the administrator of each task. You should therefor make sure that you always define at least a user "Adminstrator" when registering the list of valid users at the task service." This sentence let me think that no specific actor can be set when modeling a BPMN process? Is it correct?

2. Where do I have to plug my specific User Task assignment algorithm? Can it be for instance in an On-Entry script of the User Task or is it too late? If too late is the answer where can I plug it (I hope there is no need to model a specific Task (Service Task) before the User Task?
3. Is it possible to make a User Task assignment with a Drools rule?
4. Are there any example available showing these kind of situation?

This makes quite a lot of questions but any help or advices would be appreciated  ;) 

Kind Regards

Reply to this message by going to Community

Start a new discussion in jBPM at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20121228/f9712f12/attachment.html 

More information about the jboss-user mailing list