<?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 Data list assignee variable to run script in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/data-list-assignee-variable-to-run-script/m-p/264079#M217209</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to run a script that will start a workflow every time I create a Issue in th eissue list. I created the rule and the script and everything works if the script looks as follows&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;var workflow = actions.create("start-workflow");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;workflow.parameters.workflowName = "jbpm$wf:adhoc";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;workflow.parameters["bpm:workflowDescription"] = document.properties.name+"-"+ document.properties.title + " - " + document.properties.description;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;workflow.parameters["bpm:assignee"] = people.getPerson("admin");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;workflow.execute(document);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I now want to change the &lt;/SPAN&gt;&lt;STRONG&gt;workflow.parameters["bpm:assignee"] = people.getPerson("admin");&lt;/STRONG&gt;&lt;SPAN&gt; so that it picks up the "assigned to" value in the issue list. Thus when I create a issue and assign it to a user it will start an adhoc workflow against that user. Can anybody help me with this problem&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Feb 2011 19:52:28 GMT</pubDate>
    <dc:creator>efvrvo</dc:creator>
    <dc:date>2011-02-22T19:52:28Z</dc:date>
    <item>
      <title>Data list assignee variable to run script</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/data-list-assignee-variable-to-run-script/m-p/264079#M217209</link>
      <description>HiI want to run a script that will start a workflow every time I create a Issue in th eissue list. I created the rule and the script and everything works if the script looks as followsvar workflow = actions.create("start-workflow");workflow.parameters.workflowName = "jbpm$wf:adhoc";workflow.paramete</description>
      <pubDate>Tue, 22 Feb 2011 19:52:28 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/data-list-assignee-variable-to-run-script/m-p/264079#M217209</guid>
      <dc:creator>efvrvo</dc:creator>
      <dc:date>2011-02-22T19:52:28Z</dc:date>
    </item>
    <item>
      <title>Re: Data list assignee variable to run script</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/data-list-assignee-variable-to-run-script/m-p/264080#M217210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Assigned to in the issue datalist is a association&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;so this is how you need to get the username from the association&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;var person=document.assocs["dl:issueAssignedTo"][0];&lt;BR /&gt;var username=person.properties["{&lt;A href="http://www.alfresco.org/model/content/1.0}userName" rel="nofollow noopener noreferrer"&gt;http://www.alfresco.org/model/content/1.0}userName&lt;/A&gt;"];&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Now you can use the username as variable to people.getPerson() as &lt;/SPAN&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt; people.getPerson(username);&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt;Hope this helps&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Pavani&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Feb 2011 10:53:06 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/data-list-assignee-variable-to-run-script/m-p/264080#M217210</guid>
      <dc:creator>pavaniakella</dc:creator>
      <dc:date>2011-02-24T10:53:06Z</dc:date>
    </item>
    <item>
      <title>Re: Data list assignee variable to run script</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/data-list-assignee-variable-to-run-script/m-p/264081#M217211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks alot you have made my day. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We are using this feature now in an engineering project enviroment so that once we have a change order we can log it in the data list and then assign an engineer to the task (workflow).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Feb 2011 15:21:20 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/data-list-assignee-variable-to-run-script/m-p/264081#M217211</guid>
      <dc:creator>efvrvo</dc:creator>
      <dc:date>2011-02-24T15:21:20Z</dc:date>
    </item>
    <item>
      <title>Re: Data list assignee variable to run script</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/data-list-assignee-variable-to-run-script/m-p/264082#M217212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Im new to Alfresco. My requirement is somewhat similar to yours. I want to start a Workflow whenever i create my new custom datalist. I understood from your post that it is possible by creating a rule and&amp;nbsp; script. But im not sure how to do it. Can you please help me on this. A tutorial or a detailed reply would help on this.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jul 2011 11:08:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/data-list-assignee-variable-to-run-script/m-p/264082#M217212</guid>
      <dc:creator>n_blessing</dc:creator>
      <dc:date>2011-07-08T11:08:45Z</dc:date>
    </item>
    <item>
      <title>Re: Data list assignee variable to run script</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/data-list-assignee-variable-to-run-script/m-p/264083#M217213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Create a script and upload the script into scripts folder in Data Dictionary. No go to data lists folder&amp;nbsp; in the site you have created and go to the folder that is your custom datalist. Now create rule on that folder to execute the created script on every new item into the folder.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Pavani&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jul 2011 13:45:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/data-list-assignee-variable-to-run-script/m-p/264083#M217213</guid>
      <dc:creator>pavaniakella</dc:creator>
      <dc:date>2011-07-18T13:45:30Z</dc:date>
    </item>
    <item>
      <title>Re: Data list assignee variable to run script</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/data-list-assignee-variable-to-run-script/m-p/264084#M217214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi I am wondering how did you set rule?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I mean what condition did you applied to check datalist?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jan 2013 09:46:02 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/data-list-assignee-variable-to-run-script/m-p/264084#M217214</guid>
      <dc:creator>krups</dc:creator>
      <dc:date>2013-01-14T09:46:02Z</dc:date>
    </item>
  </channel>
</rss>

