Multiple assignee in advanced workflow - Alfresco community 5.2

cancel
Showing results for 
Search instead for 
Did you mean: 
abhinavmishra14
Advanced

Re: Multiple assignee in advanced workflow - Alfresco community 5.2

I suggest you to use activiti:candidateGroups. Create a group and all the users to the group. When the task starts it goes to the pool. This particular process uses a "pooled assignment".


Suppose, for example, a Sales_Team group contains 3 people. You could iterate through the group and assign a task to each and every member of the group and then not consider the task complete until some or all group members have taken action. The other and easy to use alternative is pooled assignment which can be achieved using activiti:candidateGroups attribute of userTask 
Using a pool, all members of a group are notified of the task, but as soon as 1 member takes "ownership" of the task, it is removed from everyone else's to do list. The owner can then complete the task or return it to the pool again.

If it is returned to the pool, all members of the group will see the task in their to do list until another person takes ownership or completes the task.

Here is an example from my project:


<serviceTask id="submitDocServiceTask1" name="Submit Document"
activiti:class="org.alfresco.repo.workflow.activiti.script.AlfrescoScriptDelegate">

<extensionElements>
<activiti:field name="script">
<activiti:string><![CDATA[execution.setVariable('cmsWorkflow_approveCount', 0);]]></activiti:string>
</activiti:field>
</extensionElements>
</serviceTask>


<userTask id="salesReviewUsertask1" name="Sales Team Review"
activiti:candidateGroups="GROUP_Sales_Team" activiti:formKey="cmsWorkflow:activitiSalesReview">

<extensionElements>
<activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
<activiti:field name="script">
<activiti:string>
<![CDATA[
if(task.getVariableLocal('cmsWorkflow_approveRejectOutcome') == 'Approve') {
var finalApprovalCount = cmsWorkflow_approveCount + 1;
execution.setVariable('cmsWorkflow_approveCount', finalApprovalCount);
}
]]>

</activiti:string>
</activiti:field>
</activiti:taskListener>
</extensionElements>
</userTask>‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

Notice this part: <userTask id="salesReviewUsertask1" name="Sales Team Review"
activiti:candidateGroups="GROUP_Sales_Team".....

~Abhinav
(ACSCE, AWS SAA, Azure Admin)
anuradha1
Active Member II

Re: Multiple assignee in advanced workflow - Alfresco community 5.2

Hi panchal,

Where to get this <listOfAssignees> ??

Regards,

Madhu

vidhipanchal
Established Member

Re: Multiple assignee in advanced workflow - Alfresco community 5.2

Hi Madhu,

You can get <<listOfAssignees>> in this task as well. 

But i want to know from you that from where you get the list of assignees? Like you want to get specific group of users and want to assign tasks to this users.

Regards,

Vidhi  

Regards,
Vidhi