jBPM Task Management: A look at the participation model
30 Mar 2009The revisited task management model in jBPM introduces a new concept: task participation. The participation model describes identities (user or groups) and the type of involvement in the actual completion of task:
Example 1: User and business administrator participation
A common use case where this model fit’s quiet nicely is the distinction between a user that actually performs the task and a business administrator monitoring progress. Depending on the participation type some principals will actually do the work, while others make sure tasks are executed within given constraints (i.e. priority, duedate, etc).
Example 2: Task stakeholders with different participation types
Another example could be stakeholders monitoring the actual outcome of task, or delegation between different participants that co-operate on a task. In this case a “initiator” of task, a “candidate” performing the work and the “final recepient” might be different participation types.
The TaskService API already reflects those changes:
org.jbpm.TaskService
{
[...]
/**
* retrieves a list of tasks for a user
* and a particular {@link org.jbpm.task.Participation} type
*
* @see org.jbpm.TaskQuery
*/
List<task> findTasksByParticipation(String participation, UserRef user);
/**
* retrieves a list of tasks for a group
* and a particular {@link org.jbpm.task.Participation} type
*
* @see org.jbpm.TaskQuery
*/
List<task> findTasksByParticipation(String participation, GroupRef... groups);
}
Currently we ship some default participation types, out of which only type ‘candidate’ is supported, but you can expect this to be extended in the near future.
org.jbpm.task.Participation
{
[...]
String CANDIDATE = "candidate";
IdentityRef getIdentityRef();
/** see constants for default participations */
String getType();
}
Stay tuned.