I have a requirement to assign a task to set of one or more users and every user must have the ability to accept the task and to work with the task. Only after all assigned users have finished her work the task is completed.
I can assign mutiple users to an task, but the Problem is, when the first user accept the Task the other users cannot accept the task too.
When an user opens a task to work on it, do not accept the task. i.e., disable auto accept on open and auto accept on modification
When the uses completes his work, if there is a need to update task data - you can use below line of code to achieve it
get<TaskName>().applyChangesNoAccept();
When the last user completes his work, you can call completeTask() - which accepts and completes the task
One way to achieve this is, you could maintain the decision of the users in task business data. Inside a document list you can maintain user name and decision (approve/reject) fields.
Also create fields for ānumber of approversā and āno of completed approversā etc (also ālast approverā field , which you said is required).
You can update these business data fields whenever an user acts on the task. When ānumber of approversā ==āno of completed approversā, you can complete the task.
Hi Guys,
Itās really interesting discussion. And in this area Iām curious about your opinion as to whether the scenario described by Mario, may be implemented with Collaboration Tasks? Requester starts ParentTask and then requester creates n Child Tasks. Each ChildTask is assigned to given user. When users completes their ChildTask, requester can view results of each ChildTask and completes ParentTask. What do you think ? In advance, thanks for the feedback:)
thanks for all your answers. I have solved this issue based of the last answer of Mervin. So Iāve created to Serices. One to creat a List with the people that have make a dicision and an other that will compare this list with the initial list of approvers and when both lists are equal the Task will copleted.
@Slawak: for further work I will try to use the collaboration Task