Multiple assignee in advanced workflow - Alfresco community 5.2

cancel
Showing results for 
Search instead for 
Did you mean: 
anuradha1
Active Member II

Multiple assignee in advanced workflow - Alfresco community 5.2

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.

12 Replies
vidhipanchal
Established Member

Re: Multiple assignee in advanced workflow - Alfresco community 5.2

Hi Anuradha,

We can add multiple assignee in a single task by assigning parallel task. For achieving that you need to create User task as follows : 

<userTask id="unitMemberApprover" name="UnitMemberApproval" activiti:assignee="${assignee}" activiti:formKey="jnuwmSmiley SurprisedthersTask">
      <multiInstanceLoopCharacteristics isSequential="false" activiti:collection="<list of assignee>"             activiti:elementVariable="assignee"></multiInstanceLoopCharacteristics>
</userTask>

Replace your assignee list with "<list of assignee>".

Thanks,

Vidhi

ContCentric

Regards,
Vidhi
anuradha1
Active Member II

Re: Multiple assignee in advanced workflow - Alfresco community 5.2

Thank you for the reply panchal,

I did this, but i don't have list of users assigned from backend. I need to config it to get from user when running the workflow. How can i do that??

Is anything i need to do in share-config-custom.xml and scWorkflowModel.xml ??

thanks.

vidhipanchal
Established Member

Re: Multiple assignee in advanced workflow - Alfresco community 5.2

No, there is no need to change in share-config-custom.xml and scWorkflowModel.xml.

But you have to provide the list of assignee in the execution listener or in the task listener of the previous task of which you want to get the assignee.

execution.setVariable("unitmembers", unitMembers);

or

delegateTask.setVariable("unitmembers", unitMembers);

unitMembers is the list of assignee.

Regards,

Vidhi

ContCentric

Regards,
Vidhi
anuradha1
Active Member II

Re: Multiple assignee in advanced workflow - Alfresco community 5.2

Dear panchal,

I can understand what u're saying to do. I tried so many ways but i am missing something. I got the assignee from previous task. It gives me an error. This workflow is a previous one i developed for single assignee. Now i just need to make it to assign multiple persons to one task. 

My error log: 

INFO: Starting ProtocolHandler ["http-bio-8080"]
2019-06-22 08:20:56,410 INFO [solr.component.AsyncBuildSuggestComponent] [Suggestor-alfresco-1] Loaded suggester shingleBasedSuggestions, took 1462 ms
2019-06-22 08:22:03,820 INFO [web.site.EditionInterceptor] [http-bio-8080-exec-4] Successfully retrieved license information from Alfresco.
2019-06-22 08:22:59,023 INFO [web.scripts.ImapServerStatus] [http-bio-8080-exec-2] Successfully retrieved IMAP server status from Alfresco: disabled
2019-06-22 08:23:25,593 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-9] doclist.get.js - NodeRef: alfresco://company/home Query: +@cm\:modified:[2019\-6\-15T00\:00\:00.000 TO 2019\-6\-22T23\:59\:59.999] +@cm\:modifier:"admin" +TYPE:"cm:content" -TYPE:"cm:systemfolder" -TYPE:"fm:forums" -TYPE:"fm:forum" -TYPE:"fm:topic" -TYPE:"fm:post" +(TYPE:"content" OR TYPE:"app:filelink" OR TYPE:"folder")
2019-06-22 08:23:29,191 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-9] doclist.get.js - query results: 0
2019-06-22 08:23:29,196 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-9] doclist.get.js - totalRecords: 0
2019-06-22 08:24:32,451 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-9] Generating form for item:
2019-06-22 08:24:32,459 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-9] kind = workflow
2019-06-22 08:24:32,460 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-9] id = activiti$reviewAssign
2019-06-22 08:24:32,461 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-9] fields = bpm:workflowDescription,packageItems,bpm:assignees,transitions,bpm:status,bpm:sendEMailNotifications
2019-06-22 08:24:32,489 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-9] formModel = {"item": "api\/workflow-definitions\/activiti$reviewAssign:1:1604", "submissionUrl": "\/api\/workflow\/activiti%24reviewAssign\/formprocessor", "type": "activiti$reviewAssign", "fields": "[Lorg.alfresco.repo.forms.FieldDefinition;@11f21a78", "formData": {"assoc_packageItems": "", "assoc_bpm_assignees": "", "prop_bpm_status": "Not Yet Started", "prop_bpm_sendEMailNotifications": false, "prop_bpm_packageActionGroup": "add_package_item_actions", "prop_bpm_packageItemActionGroup": "start_package_item_actions"}}
2019-06-22 08:24:35,897 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-5] children type = node
2019-06-22 08:24:35,902 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-5] argsSelectableType = cm:content
2019-06-22 08:24:35,907 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-5] argsFilterType = null
2019-06-22 08:24:35,908 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-5] argsSearchTerm =
2019-06-22 08:24:35,910 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-5] argsMaxResults = 100
2019-06-22 08:24:35,917 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-5] argsXPath = null
2019-06-22 08:24:35,918 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-5] argsSelectableMimeType = null
2019-06-22 08:24:35,925 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-5] lastPathElement = children
2019-06-22 08:24:36,039 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-5] Found 7 results
2019-06-22 08:24:37,930 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-2] children type = node
2019-06-22 08:24:38,097 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-2] argsSelectableType = cm:content
2019-06-22 08:24:38,141 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-2] argsFilterType = null
2019-06-22 08:24:38,148 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-2] argsSearchTerm =
2019-06-22 08:24:38,151 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-2] argsMaxResults = 100
2019-06-22 08:24:38,157 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-2] argsXPath = null
2019-06-22 08:24:38,163 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-2] argsSelectableMimeType = null
2019-06-22 08:24:38,174 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-2] lastPathElement = children
2019-06-22 08:24:38,326 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-2] Found 22 results
2019-06-22 08:24:39,900 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-4] children type = node
2019-06-22 08:24:39,911 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-4] argsSelectableType = cm:content
2019-06-22 08:24:39,923 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-4] argsFilterType = null
2019-06-22 08:24:39,940 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-4] argsSearchTerm =
2019-06-22 08:24:39,952 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-4] argsMaxResults = 100
2019-06-22 08:24:39,963 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-4] argsXPath = null
2019-06-22 08:24:39,972 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-4] argsSelectableMimeType = null
2019-06-22 08:24:39,980 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-4] lastPathElement = children
2019-06-22 08:24:40,251 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-4] Found 6 results
2019-06-22 08:24:41,965 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-4] children type = node
2019-06-22 08:24:41,967 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-4] argsSelectableType = cm:content
2019-06-22 08:24:41,971 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-4] argsFilterType = null
2019-06-22 08:24:41,972 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-4] argsSearchTerm =
2019-06-22 08:24:41,973 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-4] argsMaxResults = 100
2019-06-22 08:24:41,974 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-4] argsXPath = null
2019-06-22 08:24:41,974 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-4] argsSelectableMimeType = null
2019-06-22 08:24:41,976 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-4] lastPathElement = children
2019-06-22 08:24:42,026 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-4] Found 7 results
2019-06-22 08:25:20,681 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-4] children type = authority
2019-06-22 08:25:20,702 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-4] argsSelectableType = cm:person
2019-06-22 08:25:20,721 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-4] argsFilterType = null
2019-06-22 08:25:20,721 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-4] argsSearchTerm = _
2019-06-22 08:25:20,722 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-4] argsMaxResults = 100
2019-06-22 08:25:20,723 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-4] argsXPath = null
2019-06-22 08:25:20,724 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-4] argsSelectableMimeType = null
2019-06-22 08:25:20,726 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-4] lastPathElement = children
2019-06-22 08:25:21,364 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-4] found personRefs = workspace://SpacesStore/dc103838-645f-43c1-8a2a-bc187e13c343,workspace://SpacesStore/fcd26149-9393-452e-a7ec-2d65f3e9109c,workspace://SpacesStore/d93c3e60-d0b8-4bae-a66b-18ff0f222b62,workspace://SpacesStore/4ab4284f-8583-4c92-9a66-d1abda657af3,workspace://SpacesStore/9e4fba86-50b4-4524-bb0b-96d92605384f,workspace://SpacesStore/b6d80d49-21cc-4f04-9c92-e7063037543f
2019-06-22 08:25:21,383 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-4] User not added to results not enabledabeecher
2019-06-22 08:25:21,389 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-4] found personRefs = workspace://SpacesStore/dc103838-645f-43c1-8a2a-bc187e13c343,workspace://SpacesStore/fcd26149-9393-452e-a7ec-2d65f3e9109c,workspace://SpacesStore/d93c3e60-d0b8-4bae-a66b-18ff0f222b62,workspace://SpacesStore/4ab4284f-8583-4c92-9a66-d1abda657af3,workspace://SpacesStore/9e4fba86-50b4-4524-bb0b-96d92605384f,workspace://SpacesStore/b6d80d49-21cc-4f04-9c92-e7063037543f
2019-06-22 08:25:21,399 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-4] found personRefs = workspace://SpacesStore/dc103838-645f-43c1-8a2a-bc187e13c343,workspace://SpacesStore/fcd26149-9393-452e-a7ec-2d65f3e9109c,workspace://SpacesStore/d93c3e60-d0b8-4bae-a66b-18ff0f222b62,workspace://SpacesStore/4ab4284f-8583-4c92-9a66-d1abda657af3,workspace://SpacesStore/9e4fba86-50b4-4524-bb0b-96d92605384f,workspace://SpacesStore/b6d80d49-21cc-4f04-9c92-e7063037543f
2019-06-22 08:25:21,425 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-4] found personRefs = workspace://SpacesStore/dc103838-645f-43c1-8a2a-bc187e13c343,workspace://SpacesStore/fcd26149-9393-452e-a7ec-2d65f3e9109c,workspace://SpacesStore/d93c3e60-d0b8-4bae-a66b-18ff0f222b62,workspace://SpacesStore/4ab4284f-8583-4c92-9a66-d1abda657af3,workspace://SpacesStore/9e4fba86-50b4-4524-bb0b-96d92605384f,workspace://SpacesStore/b6d80d49-21cc-4f04-9c92-e7063037543f
2019-06-22 08:25:21,447 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-4] found personRefs = workspace://SpacesStore/dc103838-645f-43c1-8a2a-bc187e13c343,workspace://SpacesStore/fcd26149-9393-452e-a7ec-2d65f3e9109c,workspace://SpacesStore/d93c3e60-d0b8-4bae-a66b-18ff0f222b62,workspace://SpacesStore/4ab4284f-8583-4c92-9a66-d1abda657af3,workspace://SpacesStore/9e4fba86-50b4-4524-bb0b-96d92605384f,workspace://SpacesStore/b6d80d49-21cc-4f04-9c92-e7063037543f
2019-06-22 08:25:21,463 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-4] User not added to results not enabledguest
2019-06-22 08:25:21,466 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-4] found personRefs = workspace://SpacesStore/dc103838-645f-43c1-8a2a-bc187e13c343,workspace://SpacesStore/fcd26149-9393-452e-a7ec-2d65f3e9109c,workspace://SpacesStore/d93c3e60-d0b8-4bae-a66b-18ff0f222b62,workspace://SpacesStore/4ab4284f-8583-4c92-9a66-d1abda657af3,workspace://SpacesStore/9e4fba86-50b4-4524-bb0b-96d92605384f,workspace://SpacesStore/b6d80d49-21cc-4f04-9c92-e7063037543f
2019-06-22 08:25:21,488 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-4] User not added to results not enabledmjackson
2019-06-22 08:25:21,493 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-4] Found 6 results
2019-06-22 08:25:35,251 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-16] json form submission for item:
2019-06-22 08:25:35,268 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-16] kind = workflow
2019-06-22 08:25:35,279 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-16] id = activiti$reviewAssign
2019-06-22 08:25:36,070 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-16] org.alfresco.service.cmr.workflow.WorkflowException: 05220030 Failed to start workflow activiti$reviewAssign:1:1604.
2019-06-22 08:25:36,072 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-16] Returning 500 status code
2019-06-22 08:28:30,082 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-1] json form submission for item:
2019-06-22 08:28:30,097 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-1] kind = workflow
2019-06-22 08:28:30,102 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-1] id = activiti$reviewAssign
2019-06-22 08:28:30,287 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-1] org.alfresco.service.cmr.workflow.WorkflowException: 05220031 Failed to start workflow activiti$reviewAssign:1:1604.
2019-06-22 08:28:30,288 DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-1] Returning 500 status code

part of my bpmn :

 <process id="reviewAssign" name="Review Assign" isExecutable="true">
<startEvent id="startevent1" name="Start" activiti:formKey="scwf:submitDocTask"></startEvent>
<serviceTask id="alfrescoScripttask1" name="Submit Document" activiti:class="org.alfresco.repo.workflow.activiti.script.AlfrescoScriptDelegate">
<extensionElements>
<activiti:field name="script">
<activiti:string><![CDATA[execution.setVariable('scwf_approveCount', 0);
execution.setVariable('scwf_tpApproved', false);
execution.setVariable('scwf_reSubmit1', false);]]>
</activiti:string>
</activiti:field>
</extensionElements>
</serviceTask>
<sequenceFlow id="flow4" sourceRef="startevent1" targetRef="alfrescoScripttask1"></sequenceFlow>
<userTask id="usertask3" name="Review" activiti:formKey="scwf:activitiReviewDoc" activiti:assignee="${assignee}">
<extensionElements>
<activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
<activiti:field name="script">
<activiti:string><![CDATA[if(task.getVariableLocal('scwf_okReassignOutcome') == 'Accepted') {
var newApprovedCount = scwf_approveCount + 1;
execution.setVariable('scwf_approveCount', newApprovedCount);
} else {
execution.setVariable("bpm_assignees", task.getVariable("bpm_assignees"));

}]]>
</activiti:string>
</activiti:field>
</activiti:taskListener>
</extensionElements>
<multiInstanceLoopCharacteristics isSequential="false" activiti:collection="bpm_assignees" activiti:elementVariable="assignee"></multiInstanceLoopCharacteristics>
</userTask>
<sequenceFlow id="flow5" sourceRef="alfrescoScripttask1" targetRef="usertask3"></sequenceFlow>
<userTask id="usertask4" name="Assign" activiti:assignee="${initiator.properties.userName}" activiti:formKey="scwf:activitiAssignDoc">
<extensionElements>
<activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
<activiti:field name="script">
<activiti:string><![CDATA[var setWebFlagAction = actions.create("set-web-flag");]]></activiti:string>
</activiti:field>
</activiti:taskListener>
</extensionElements>
</userTask>
<endEvent id="endevent3" name="End"></endEvent>
<sequenceFlow id="flow8" sourceRef="usertask4" targetRef="endevent3"></sequenceFlow>
<exclusiveGateway id="exclusivegateway1" name="Exclusive Gateway"></exclusiveGateway>
<sequenceFlow id="flow10" sourceRef="usertask3" targetRef="exclusivegateway1"></sequenceFlow>
<sequenceFlow id="flow11" sourceRef="exclusivegateway1" targetRef="usertask4">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${scwf_approveCount == 1}]]></conditionExpression>
</sequenceFlow>
<sequenceFlow id="flow13" sourceRef="exclusivegateway1" targetRef="alfrescoScripttask1"></sequenceFlow>
</process>

share-config-custom.xml :

<config evaluator="string-compare" condition="activiti$reviewAssign">
<forms>
<form>
<field-visibility>
<show id="bpm:workflowDescription" />
<show id="packageItems" />
<show id="bpm:assignees" />
<show id="transitions" />
<show id="bpm:status" />
<show id="bpm:sendEMailNotifications" />
</field-visibility>
<appearance>
<set id="" appearance="title" label-id="workflow.set.general" />
<set id="items" appearance="title" label-id="workflow.set.items" />
<set id="assignee" appearance="title" label-id="workflow.set.assignee" />
<set id="progress" appearance="title" label-id="workflow.set.task.progress" />
<set id="other" appearance="title" label-id="workflow.set.other" />

<field id="bpm:workflowDescription" label-id="workflow.field.message">
<control template="/org/alfresco/components/form/controls/textarea.ftl">
<control-param name="style">width: 95%</control-param>
</control>
</field>
<field id="packageItems" set="items" />
<field id="bpm:assignees" label-id="workflow.field.assign_to" set="assignee" />
<field id="bpm:status" set="progress" />
<field id="bpm:sendEMailNotifications" set="other" />
</appearance>
</form>
</forms>
</config>
<config evaluator="task-type" condition="scwf:submitDocTask">
<forms>
<form id="workflow-details">
<field-visibility>
<show id="bpm:workflowDescription" />
<show id="packageItems" />
<show id="bpm:assignees" />
<show id="transitions" />
<show id="bpm:status" />
<show id="bpm:sendEMailNotifications" />

</field-visibility>
<appearance>
<set id="" appearance="title" label-id="workflow.set.general" />
<set id="items" appearance="title" label-id="workflow.set.items" />
<set id="assignee" appearance="title" label-id="workflow.set.assignee" />
<set id="progress" appearance="title" label-id="workflow.set.task.progress" />
<set id="other" appearance="title" label-id="workflow.set.other" />

<field id="bpm:workflowDescription" label-id="workflow.field.message">
<control template="/org/alfresco/components/form/controls/textarea.ftl">
<control-param name="style">width: 95%</control-param>
</control>
</field>
<field id="packageItems" set="items" />
<field id="bpm:assignees" label-id="workflow.field.assign_to" set="assignee" />
<field id="bpm:status" set="progress" />
<field id="bpm:sendEMailNotifications" set="other" />
</appearance>
</form>
</forms>
</config>

<config evaluator="task-type" condition="scwf:activitiReviewDoc">
<forms>
<form id="workflow-details">
<field-visibility>
<show id="bpm:workflowDescription" />
<show id="packageItems" />
<show id="bpm:assignees" />
<show id="scwf:okReassignOutcome" />
<show id="bpm:comment" />
<show id="transitions" />
<show id="bpm:status" />
<show id="bpm:sendEMailNotifications" />

</field-visibility>
<appearance>
<set id="" appearance="title" label-id="workflow.set.task.info" />
<set id="info" appearance="" template="/org/alfresco/components/form/2-column-set.ftl" />
<set id="assignee" appearance="title" label-id="workflow.set.assignee" />
<set id="items" appearance="title" label-id="workflow.set.items" />
<set id="progress" appearance="title" label-id="workflow.set.task.progress" />
<set id="response" appearance="title" label-id="workflow.set.response" />
<set id="other" appearance="title" label-id="workflow.set.other" />

<field id="message">
<control template="/org/alfresco/components/form/controls/info.ftl" />
</field>
<field id="packageItems" set="items" />
<field id="bpm:assignees" label-id="workflow.field.assign_to" set="assignee" />
<field id="scwf:okReassignOutcome" set="response" />
<field id="bpm:comment" label-id="workflow.field.comment" set="response">
<control template="/org/alfresco/components/form/controls/textarea.ftl" />
</field>
<field id="transitions" set="response" />
<field id="bpm:status" set="progress" />
<field id="bpm:sendEMailNotifications" set="other" />

</appearance>
</form>
<form>
<field-visibility>
<show id="bpm:workflowDescription" />
<show id="packageItems" />
<show id="bpm:assignees" />
<show id="scwf:okReassignOutcome" />
<show id="bpm:comment" />
<show id="transitions" />
<show id="bpm:status" />
<show id="bpm:sendEMailNotifications" />

</field-visibility>
<appearance>
<set id="" appearance="title" label-id="workflow.set.task.info" />
<set id="info" appearance="" template="/org/alfresco/components/form/2-column-set.ftl" />
<set id="assignee" appearance="title" label-id="workflow.set.assignee" />
<set id="items" appearance="title" label-id="workflow.set.items" />
<set id="progress" appearance="title" label-id="workflow.set.task.progress" />
<set id="response" appearance="title" label-id="workflow.set.response" />
<set id="other" appearance="title" label-id="workflow.set.other" />

<field id="message">
<control template="/org/alfresco/components/form/controls/info.ftl" />
</field>
<field id="packageItems" set="items" />
<field id="bpm:assignees" label-id="workflow.field.assign_to" set="assignee" />
<field id="scwf:okReassignOutcome" set="response" />
<field id="bpm:comment" label-id="workflow.field.comment" set="response">
<control template="/org/alfresco/components/form/controls/textarea.ftl" />
</field>
<field id="transitions" set="response" />
<field id="bpm:status" set="progress" />
<field id="bpm:sendEMailNotifications" set="other" />

</appearance>
</form>
</forms>
</config>
<config evaluator="task-type" condition="scwf:activitiAssignDoc">
<forms>
<form>
<field-visibility>
<show id="bpm:workflowDescription" />
<show id="packageItems" />
<show id="transitions" />
<show id="bpm:status" />
</field-visibility>
<appearance>
<set id="" appearance="title" label-id="workflow.set.general" />
<set id="info" appearance="" template="/org/alfresco/components/form/2-column-set.ftl" />
<set id="items" appearance="title" label-id="workflow.set.items" />
<set id="progress" appearance="title" label-id="workflow.set.task.progress" />
<set id="response" appearance="title" label-id="workflow.set.response" />

<field id="bpm:workflowDescription" label-id="workflow.field.message">
<control template="/org/alfresco/components/form/controls/textarea.ftl">
<control-param name="style">width: 95%</control-param>
</control>
</field>
<field id="packageItems" set="items" />
<field id="transitions" set="response" />
<field id="bpm:status" set="progress" />
</appearance>
</form>
</forms>
</config>

scWorkflowModel.xml :

<type name="scwf:activitiReassignTask">
<parent>bpm:activitiOutcomeTask</parent>
<properties>
<property name="scwf:okReassignOutcome">
<type>d:text</type>
<default>Reassign</default>
<constraints>
<constraint type="LIST">
<parameter name="allowedValues">
<list>
<value>Accepted</value>
<value>Reassign</value>
</list>
</parameter>
</constraint>
</constraints>
</property>
</properties>
<overrides>
<property name="bpm:packageActionGroup">
<default>add_package_item_actions</default>
</property>
<property name="bpm:outcomePropertyName">
<default>{http://www.someco.com/model/workflow/1.0}okReassignOutcome</default>
</property>
</overrides>
</type>
<type name="scwf:submitDocTask">
<parent>bpm:startTask</parent>
<mandatory-aspects>
<aspect>bpm:assignees</aspect>
</mandatory-aspects>
</type>
<type name="scwf:activitiReviewDoc">
<parent>scwf:activitiReassignTask</parent>
<mandatory-aspects>
<aspect>bpm:assignees</aspect>
</mandatory-aspects>
</type>
<type name="scwf:activitiAssignDoc">
<parent>bpm:workflowTask</parent>

</type>
</types>

<aspects>
<aspect name="scwf:thirdPartyReviewable">
<title>Someco Third Party Reviewable</title>
<properties>
<property name="scwf:reviewerEmail">
<type>d:text</type>
<mandatory>false</mandatory>
<multiple>false</multiple>
</property>
</properties>
<overrides>
<property name="bpm:packageActionGroup">
<default>add_package_item_actions</default>
</property>
<property name="bpm:outcomePropertyName">
<default>{http://www.someco.com/model/workflow/1.0}okReassignOutcome</default>
</property>
</overrides>
</aspect>
</aspects>

Please help me panchal. I know i done some silly mistake. Please help me to find it.

Regads,

Madhushani

vidhipanchal
Established Member

Re: Multiple assignee in advanced workflow - Alfresco community 5.2

You have to assign the value "bpm_assinees"  before the task is created.

here the task gets the null value of "bpm_assinees"( task.getVariable("bpm_assignees")) so it triggers error.

Regards,
Vidhi
anuradha1
Active Member II

Re: Multiple assignee in advanced workflow - Alfresco community 5.2

Thanks panchaal,

can u give me a sample for that. How to do it.  did this to one assignee in this way. it worked. 

please help me.

vidhipanchal
Established Member

Re: Multiple assignee in advanced workflow - Alfresco community 5.2

Where do you get the list of assignee?

Regards,
Vidhi
anuradha1
Active Member II

Re: Multiple assignee in advanced workflow - Alfresco community 5.2

In first time, From the person who started the workflow. Then it get from the person who done the job. When the decision is accepted, it again goes to the workflow started person, then finish.

vidhipanchal
Established Member

Re: Multiple assignee in advanced workflow - Alfresco community 5.2

Hi

I updated your code please check.

You need to provide the list of assignees.

<serviceTask id="alfrescoScripttask1" name="Submit Document" activiti:class="org.alfresco.repo.workflow.activiti.script.AlfrescoScriptDelegate">
      <extensionElements>
        <activiti:field name="script">
          <activiti:string><![CDATA[execution.setVariable('scwf_approveCount', 0);
              execution.setVariable('scwf_tpApproved', false);
              execution.setVariable('scwf_reSubmit1', false);

              execution.setVariable('bpm_assignees',<listOfAssignees>);

 ]]></activiti:string>
        </activiti:field>
      </extensionElements>
    </serviceTask>

 

Regards,

Vidhi

Regards,
Vidhi