<?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 set Assinees variable in alfresco execution script in workflow in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/how-to-set-assinees-variable-in-alfresco-execution-script-in/m-p/291596#M244726</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are trying to store a native JavaScript array. You must use a Java list for setting multi-valued attributes. Unfortunately creating a Java list is not possible using an inline script in a workflow definition.&lt;/P&gt;&lt;P&gt;Also, bpm:assignees / bpm_assignees typically is a variable on tasks - setting it on the execution can have unintentional side effects.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a reason you cannot set the assignees directly on the task using BPMN constructs? As long as they are static like this there is no reason to use a script.&lt;/P&gt;&lt;P&gt;Also, if you want to set assignees on a task dynamically, you can use the corresponding task API operations, e.g. setAssignee(String) for a single assignee, addCandidateUser(String) to add one of multiple assignees or addCandidateUsers(Collection&amp;lt;String&amp;gt;) to add all in one (in this case the script should be able to automatically convert an array into a collection).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 Nov 2016 11:28:30 GMT</pubDate>
    <dc:creator>afaust</dc:creator>
    <dc:date>2016-11-30T11:28:30Z</dc:date>
    <item>
      <title>How to set Assinees variable in alfresco execution script in workflow</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-set-assinees-variable-in-alfresco-execution-script-in/m-p/291595#M244725</link>
      <description>Hello, i'm trying to assign bpm_assignees variable in the sequence flow, and added this code(Alfresco execution script):var approvers = ["admin","jack"];execution.setVariable('bpm_assignees',approvers);And i get a error like this &amp;nbsp;"Cannot serialize native javascript array to variable".HELP PLEASE, w</description>
      <pubDate>Wed, 30 Nov 2016 09:19:51 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-set-assinees-variable-in-alfresco-execution-script-in/m-p/291595#M244725</guid>
      <dc:creator>alex_russ</dc:creator>
      <dc:date>2016-11-30T09:19:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to set Assinees variable in alfresco execution script in workflow</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-set-assinees-variable-in-alfresco-execution-script-in/m-p/291596#M244726</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are trying to store a native JavaScript array. You must use a Java list for setting multi-valued attributes. Unfortunately creating a Java list is not possible using an inline script in a workflow definition.&lt;/P&gt;&lt;P&gt;Also, bpm:assignees / bpm_assignees typically is a variable on tasks - setting it on the execution can have unintentional side effects.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a reason you cannot set the assignees directly on the task using BPMN constructs? As long as they are static like this there is no reason to use a script.&lt;/P&gt;&lt;P&gt;Also, if you want to set assignees on a task dynamically, you can use the corresponding task API operations, e.g. setAssignee(String) for a single assignee, addCandidateUser(String) to add one of multiple assignees or addCandidateUsers(Collection&amp;lt;String&amp;gt;) to add all in one (in this case the script should be able to automatically convert an array into a collection).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Nov 2016 11:28:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-set-assinees-variable-in-alfresco-execution-script-in/m-p/291596#M244726</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2016-11-30T11:28:30Z</dc:date>
    </item>
  </channel>
</rss>

