JBoss Community

Re: Delegation of tasks

created by Thomas Setiabudi in jBPM - View the full discussion

Hi Roxy,

 

yes it is possible to delegate task from a user to a group.

 

1. If the group id is not in the Task's Potential Owner list (seen at database table PeopleAssignment_PotOwners), then you have to nominate that group to the Task's Potential owner first.

 

There are some ways to do this, if you use the taskClient then here is a sample code:

 

 BlockingTaskOperationResponseHandler blockingTaskOperationResponseHandler = new BlockingTaskOperationResponseHandler();
  taskClient.nominate(taskId, userLogon, potentialOwners,
    blockingTaskOperationResponseHandler);


 

where potentialOwners is a list of potential owner (user / group / both) that you want to nominate as the task's potential owner.

 

2. If the group has been in the Task Potential Owner, but the task status is still "Reserved", that means the user need to release that task in order to make it a group task which can be claimed by any member of the group.

 

There are some ways to do this, if you use the taskClient then here is a sample code:

BlockingTaskOperationResponseHandler blockingTaskOperationResponseHandler = new BlockingTaskOperationResponseHandler();
  taskClient.release(taskId, userLogon,
    blockingTaskOperationResponseHandler);

 

 

Regards,

Thomas Setiabudi

Reply to this message by going to Community

Start a new discussion in jBPM at Community