06-20-2019 02:22 PM
Hi guys,
I am trying to create a custom workflow in alfresco. But i am struggling with this problem. I have a user task i need to add multiple assignee for that task. I tried to use candidate user in bpmn but it not succeeded. I need to know what i need to do to add multiple assignee for a one user task. What are the changes need to be done in share-config-custom.xm file, bpmn model file & scWorkflowModel.xml file.
I feel it's very easy but i can't find it.
Plz help me.
Thanks.
07-12-2019 03:50 AM
Hi panchal,
Where to get this <listOfAssignees> ??
Regards,
Madhu
07-12-2019 04:14 AM
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
06-27-2019 05:10 PM
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".....
Explore our Alfresco products with the links below. Use labels to filter content by product module.