Heiko Braun Software Engineer

jBPM Task Management: A look at the participation model

Since 4.0.0.Beta1

The 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:

<img style=”float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 306px;” src=”http://2.bp.blogspot.com/_QxIFVLQdHS0/SdDNEjfRblI/AAAAAAAAACo/-WXy3CulUr0/s320/participation.jpg” border=”0” alt=”“id=”BLOGGER_PHOTO_ID_5318976638054133330” />


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.