Custom delegation is not working, if we select multiple Tasks to delegate

Hi All,

I have an issue while doing the custom delegation of Tasks. Below are the implementation steps we have done as part of this.

  1. i have created custom inbox for the user.

  2. In the Task Inbox Results portlet(default view) we have added the one select-check box to select the records from the async table.

  3. we have added an async command button and bind an action and below are the API’s we have used for the custom delegation in the binded action.

             List<ITaskInfo> itaskInfo = getSelectedTaskInfos();
    
             for(int it = 0;it< itaskInfo.size();it++)
     
                {
    
                              itaskInfo.get(it).setAssignedToList(selectedDelegationRoleList);
     				
     		tp = getTaskContentProvider(itaskInfo.get(it).getTaskID());
    
                             tp.applyChangesNoAccept();
    
    
              }
    

problem here is, if we select one task from the async table and submit the action, we can delegate the task to the respective user/role, but we select multiple tasks we cannot delegate and we dont see any error in the MWS full logs.

Can please some body throw some inputs on the above implementation and why it is happening for single selection and not for multiple selection.

FYI,

for every iteration , i see the logs generating

log(">>>>>>>>>>>>>>>>>>>>>>"+itaskInfo.get(it).getAssignedToList()[0].toString());// prints the mesage with the new user to whom the delegation happend// it holds the new user/role .

log(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> after change AssignedTo:::: " + tp.getTaskInfo().getAssignedToList()[0]);// here i dont see the logs gets print as expected, i mean it does not holds the delegated user/role

Thanks & Regards.

I don’t have straight answer for this question but I would suggest you to do multiple tasks delegation from the default task list management screen, and verify task audit view and debug logs to understand different actions being executed. You can then compare with what you have coded.

Senthil

multiple other TaskInfo fields such as delegated from, delegated to, etc., need to be updated when delegation is performed…

Hi Senthil,

Thanks for your inputs, but no luck still, i tried using the delegate from and delegate to , still the delegation is not happening for the multiple task selection.

I will try as you suggested above by doing the default delegation from the Task List management with the logging level increased.

Thanks & Regards.