-
1. Re: Human Task Assignment -- restrict based on process variables
garys Jan 5, 2012 12:45 PM (in response to jemmerling)I have the same requirement ( Re: How do I exclude User in a swimlane ). For my project, performing a task in the same role by a different user is an essential requirement.
-
2. Re: Human Task Assignment -- restrict based on process variables
jemmerling Jan 5, 2012 4:43 PM (in response to garys)Gary,
It seems the concept of potentialOwner and excludedOwner are both addressed in the WS-HumanTask specification but not in the BPMN2 specification (it only addresses potentialOwner).
I don't know whether jBPM5 has the potential to extend BPMN2 or has already done so.
Nor do I know whether this is information you didn't already have.
Does anybody know if the above information suggests a generic way to access this? In my case I am not specifically concerned with swim lanes if that makes any difference.
--JE
-
3. Re: Human Task Assignment -- restrict based on process variables
jemmerling Jan 11, 2012 11:28 AM (in response to jemmerling)OK,
I believe I have at least partially answered this question for myself.
From looking at code, it appears to me that most logic associated with with "task assignment" is in
org.jbpm.task.service.TaskServiceSession
.So it appears that the method
executeTaskAddRules
has the purpose of allowing the developer (or analyst?) to define any rule he or she wants using any content they have defined. So, for example, if you have a process consisting of two approval steps, and you want to define a rule that states that an the actor that completed the first approval step may not be assigned the second approval step (even if both actors, in general, are eligible to perform that step) you would simply keep track of whatever actor approved the first step then define a rule that prevents that actor from being assigned to the second step.Note that this method is one of the few in jBPM5 that I have encountered so far which has any JavaDoc, so I am guessing it's an important method to understand.
Taking note of the fact that this method throws an exception when a rule is violated, I need to investigate further to determine how to leverage this functionality in such a way that the routine application of a rule does not case a user to experience an error message.
If somebody can confirm that this is the correct general approach, please reply and I will update this thread to "Answered". Also if you know of any example for implementing such a rule, please point me to it, if you don't mind, thanks!
--JE
P.S. I recognized after initially posting this, that my concern is with adding a task to a list of tasks that a user may claim, not with directly assigning a task to a user. I have not yet identified where in the code where this logic is performed.
Message was edited by: John Emmerling
-
4. Re: Human Task Assignment -- restrict based on process variables
jemmerling Jan 11, 2012 4:14 PM (in response to jemmerling)Never mind -- this looks like a dead end.
-
5. Re: Human Task Assignment -- restrict based on process variables
jemmerling Jan 13, 2012 10:47 AM (in response to jemmerling)If interested, please look at my post from today entitled "Proposed temporary and limited approach to supporting excluded owners" for a possibly solution to this problem.