<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to assign task to the group from a variable in Workflow in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/how-to-assign-task-to-the-group-from-a-variable-in-workflow/m-p/86361#M26126</link>
    <description>&lt;P&gt;you'll have to provide the &lt;STRONG&gt;ID&amp;nbsp;&lt;/STRONG&gt;of the group which your are assigning the task to in your varaible&amp;nbsp;&lt;STRONG&gt;wf142_grouprevisor&lt;/STRONG&gt; then simple pass the variable as expression &lt;STRONG&gt;${&lt;SPAN&gt;wf142_grouprevisor&lt;/SPAN&gt;}. &lt;/STRONG&gt;Activiti cannot resolve groups based on names. FYI&amp;nbsp;&lt;STRONG&gt;${wf142_grouprevisor.properties.Name} &lt;/STRONG&gt;&amp;lt;&amp;lt; this type of expression can only be used if&amp;nbsp;&lt;STRONG&gt;wf142_grouprevisor&lt;/STRONG&gt; is an instance of ScriptNode&lt;/P&gt;</description>
    <pubDate>Thu, 20 Feb 2020 09:47:19 GMT</pubDate>
    <dc:creator>abbask01</dc:creator>
    <dc:date>2020-02-20T09:47:19Z</dc:date>
    <item>
      <title>How to assign task to the group from a variable in Workflow</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-assign-task-to-the-group-from-a-variable-in-workflow/m-p/86360#M26125</link>
      <description>&lt;P&gt;This is one workflow in which I want to assign the task to the group depending on the condition, So in the initial check I am getting that condition true or false based on that I have also assigned group names to one variable "wf142_grouprevisor" but now I want to pass that variable name in the&amp;nbsp;activiti:candidateGroups="${wf142_grouprevisor.properties.Name}" .&amp;nbsp; &amp;nbsp;I have tried the below code but it is not working means it is not taking the group name from the variable.. Can anyone help me in this issue.&lt;/P&gt;&lt;P&gt;Thanks in Advance..&lt;/P&gt;&lt;P&gt;&amp;lt;serviceTask id="workflow142InitialCheck" name="Payroll Check"&lt;BR /&gt;activiti:class="org.alfresco.repo.workflow.activiti.script.AlfrescoScriptDelegate"&amp;gt;&lt;BR /&gt;&amp;lt;extensionElements&amp;gt;&lt;BR /&gt;&amp;lt;activiti:field name="runAs"&amp;gt;&lt;BR /&gt;&amp;lt;activiti:string&amp;gt;&lt;BR /&gt;&amp;lt;![CDATA[admin]]&amp;gt;&lt;BR /&gt;&amp;lt;/activiti:string&amp;gt;&lt;BR /&gt;&amp;lt;/activiti:field&amp;gt;&lt;BR /&gt;&amp;lt;activiti:field name="script"&amp;gt;&lt;BR /&gt;&amp;lt;activiti:string&amp;gt;&lt;BR /&gt;logger.error("Payroll Task starts");&lt;BR /&gt;var destinationFolder = companyhome.childByNamePath("Staging");&lt;BR /&gt;var docs = bpm_package.children;&lt;BR /&gt;var docType = docs[0].properties["hr:documentType"];&lt;BR /&gt;var keyNo = docs[0].properties["hr:keyNumber"];&lt;BR /&gt;var process = "";&lt;BR /&gt;var docTypeStr = "";&lt;BR /&gt;var checkSecured = "";&lt;BR /&gt;&lt;BR /&gt;var nodes = search.luceneSearch("@\\{http\\://&lt;A href="http://www.bpost.be/model/hr/1.0\\}DocumentTypesDataList" target="_blank" rel="nofollow noopener noreferrer"&gt;www.bpost.be/model/hr/1.0\\}DocumentTypesDataList&lt;/A&gt; @hr\\:dldocType:"+docType+"\*");&lt;BR /&gt;logger.error("--------Length of nodes is-------------"+nodes.length);&lt;BR /&gt;if(nodes.length &amp;gt; 0){&lt;BR /&gt;&lt;BR /&gt;logger.error("------------Node is-------------"+nodes[0].id);&lt;BR /&gt;&lt;BR /&gt;var dataLists = search.findNode("workspace://SpacesStore/"+nodes[0].id);&lt;BR /&gt;var dataListItemProps = dataLists.getProperties(); //Read all the properties of the current datalistitem&lt;BR /&gt;&lt;BR /&gt;docTypeStr = dataListItemProps["hr:dldocType"]&lt;BR /&gt;logger.log("-----docTypeStr-------"+docTypeStr);&lt;BR /&gt;&lt;BR /&gt;process = dataListItemProps["hr:dlprocess"];&lt;BR /&gt;logger.log("+++++Process+++++"+process);&lt;BR /&gt;&lt;BR /&gt;&lt;FONT size="4"&gt;&lt;STRONG&gt;checkSecured = dataListItemProps["hr:dlsecured"];&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="4"&gt;&lt;STRONG&gt;logger.error("-------CHECK SECURED---------"+checkSecured);&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="4"&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT size="4"&gt;&lt;STRONG&gt;if(checkSecured == true){&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="4"&gt;&lt;STRONG&gt;execution.setVariable('wf142_grouprevisor',"GROUP_GU_CMS_HR_PAYROLLSECWF_TEAM");&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="4"&gt;&lt;STRONG&gt;logger.error("--------wf142_grouprevisor---------------"+wf142_grouprevisor);&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="4"&gt;&lt;STRONG&gt;}else{&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="4"&gt;&lt;STRONG&gt;execution.setVariable('wf142_grouprevisor',"GROUP_GU_CMS_HR_NONSECWF_TEAM");&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="4"&gt;&lt;STRONG&gt;logger.error("--------wf142_grouprevisor---------------"+wf142_grouprevisor);&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="4"&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;if(!docType || !keyNo){&lt;BR /&gt;&lt;BR /&gt;execution.setVariable('wf142_initialFlag',true);&lt;BR /&gt;docs[0].move(destinationFolder);&lt;BR /&gt;logger.log("Here it is....")&lt;BR /&gt;}else{&lt;BR /&gt;execution.setVariable('wf142_initialFlag',false);&lt;BR /&gt;}&lt;BR /&gt;logger.error("Payroll Task ends");&lt;BR /&gt;&amp;lt;/activiti:string&amp;gt;&lt;BR /&gt;&amp;lt;/activiti:field&amp;gt;&lt;BR /&gt;&amp;lt;/extensionElements&amp;gt;&lt;BR /&gt;&amp;lt;/serviceTask&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;exclusiveGateway id="exclusiveGateway" name="Exclusive Gateway" /&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;sequenceFlow id="flow11" targetRef="workflow142Review"&lt;BR /&gt;sourceRef="exclusiveGateway"&amp;gt;&lt;BR /&gt;&amp;lt;conditionExpression xsi:type="tFormalExpression"&amp;gt;&amp;lt;![CDATA[${wf142_initialFlag == false}]]&amp;gt;&amp;lt;/conditionExpression&amp;gt;&lt;BR /&gt;&amp;lt;/sequenceFlow&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;sequenceFlow id="flow12" targetRef="endevent" sourceRef="exclusiveGateway"&amp;gt;&lt;BR /&gt;&amp;lt;conditionExpression xsi:type="tFormalExpression"&amp;gt;&amp;lt;![CDATA[${wf142_initialFlag == true}]]&amp;gt;&amp;lt;/conditionExpression&amp;gt;&lt;BR /&gt;&amp;lt;/sequenceFlow&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;userTask id="workflow142Review" name="Payroll"&lt;BR /&gt;&lt;FONT size="4"&gt;&lt;STRONG&gt;activiti:candidateGroups="${wf142_grouprevisor.properties.Name}"&lt;/STRONG&gt;&lt;/FONT&gt; activiti:formKey="wf142:workflow142Review"&amp;gt;&lt;BR /&gt;&amp;lt;extensionElements&amp;gt;&lt;BR /&gt;&amp;lt;activiti:taskListener event="create"&lt;BR /&gt;class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener"&amp;gt;&lt;BR /&gt;&amp;lt;activiti:field name="script"&amp;gt;&lt;BR /&gt;&amp;lt;activiti:string&amp;gt;&lt;BR /&gt;&amp;lt;![CDATA[&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2020 07:24:55 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-assign-task-to-the-group-from-a-variable-in-workflow/m-p/86360#M26125</guid>
      <dc:creator>Rahul_Nathwani</dc:creator>
      <dc:date>2020-02-20T07:24:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign task to the group from a variable in Workflow</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-assign-task-to-the-group-from-a-variable-in-workflow/m-p/86361#M26126</link>
      <description>&lt;P&gt;you'll have to provide the &lt;STRONG&gt;ID&amp;nbsp;&lt;/STRONG&gt;of the group which your are assigning the task to in your varaible&amp;nbsp;&lt;STRONG&gt;wf142_grouprevisor&lt;/STRONG&gt; then simple pass the variable as expression &lt;STRONG&gt;${&lt;SPAN&gt;wf142_grouprevisor&lt;/SPAN&gt;}. &lt;/STRONG&gt;Activiti cannot resolve groups based on names. FYI&amp;nbsp;&lt;STRONG&gt;${wf142_grouprevisor.properties.Name} &lt;/STRONG&gt;&amp;lt;&amp;lt; this type of expression can only be used if&amp;nbsp;&lt;STRONG&gt;wf142_grouprevisor&lt;/STRONG&gt; is an instance of ScriptNode&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2020 09:47:19 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-assign-task-to-the-group-from-a-variable-in-workflow/m-p/86361#M26126</guid>
      <dc:creator>abbask01</dc:creator>
      <dc:date>2020-02-20T09:47:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign task to the group from a variable in Workflow</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-assign-task-to-the-group-from-a-variable-in-workflow/m-p/86362#M26127</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN class=""&gt;&lt;A href="https://hub.alfresco.com/t5/user/viewprofilepage/user-id/16524" target="_self" rel="nofollow noopener noreferrer"&gt;abbask01,&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Thanks for the solution. It helped to solve my issue. Now the workflow is taking the group name as per the condition.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Once Again Thanks.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Mar 2020 07:09:05 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-assign-task-to-the-group-from-a-variable-in-workflow/m-p/86362#M26127</guid>
      <dc:creator>Rahul_Nathwani</dc:creator>
      <dc:date>2020-03-05T07:09:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign task to the group from a variable in Workflow</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-assign-task-to-the-group-from-a-variable-in-workflow/m-p/86363#M26128</link>
      <description>&lt;P&gt;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/79991"&gt;@Rahul_Nathwani&lt;/A&gt;,&lt;/P&gt;
&lt;P&gt;Thanks for the feedback and accepting the solution - helpful to other users.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Mar 2020 09:40:52 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-assign-task-to-the-group-from-a-variable-in-workflow/m-p/86363#M26128</guid>
      <dc:creator>EddieMay</dc:creator>
      <dc:date>2020-03-05T09:40:52Z</dc:date>
    </item>
  </channel>
</rss>

