<?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 From Java, starting a workflow with several assignees in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/from-java-starting-a-workflow-with-several-assignees/m-p/243681#M196811</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;From Java, I can easily start a workflow after having defined its assignee using a HashMap:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;workflowProperties.put(WorkflowModel.ASSOC_ASSIGNEE, inviteeNodeRef);&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;That's good for a workflow that has a mandatory aspect "bpm:assignee".&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But my workflow has a mandatory aspect "bpm:assignee&lt;/SPAN&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;s&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN&gt;". Several assignees.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And unfortunately WorkflowModel.ASSOC_ASSIGNEE&lt;/SPAN&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;S&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN&gt; does not exist.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How to put the list of assignees into the workflow properties before calling startWorkflow?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Feb 2010 13:51:46 GMT</pubDate>
    <dc:creator>nicolasraoul</dc:creator>
    <dc:date>2010-02-09T13:51:46Z</dc:date>
    <item>
      <title>From Java, starting a workflow with several assignees</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/from-java-starting-a-workflow-with-several-assignees/m-p/243681#M196811</link>
      <description>From Java, I can easily start a workflow after having defined its assignee using a HashMap:workflowProperties.put(WorkflowModel.ASSOC_ASSIGNEE, inviteeNodeRef);‍That's good for a workflow that has a mandatory aspect "bpm:assignee".But my workflow has a mandatory aspect "bpm:assignees". Several assig</description>
      <pubDate>Tue, 09 Feb 2010 13:51:46 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/from-java-starting-a-workflow-with-several-assignees/m-p/243681#M196811</guid>
      <dc:creator>nicolasraoul</dc:creator>
      <dc:date>2010-02-09T13:51:46Z</dc:date>
    </item>
    <item>
      <title>Re: From Java, starting a workflow with several assignees</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/from-java-starting-a-workflow-with-several-assignees/m-p/243682#M196812</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I guessed the solution and tested it, it seems to work as expected:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;workflowProps.put(QName.createQName("{&lt;A href="http://www.alfresco.org/model/bpm/1.0}assignees" rel="nofollow noopener noreferrer"&gt;http://www.alfresco.org/model/bpm/1.0}assignees&lt;/A&gt;"), assignees);&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the full code if that can help someone:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;// Prepare workflow properties.&lt;BR /&gt;NodeRef wfPackage = this.workflowService.createPackage(file);&lt;BR /&gt;NodeRef assignee1NodeRef = personService.getPerson(selectedAssignee1);&lt;BR /&gt;NodeRef assignee2NodeRef = personService.getPerson(selectedAssignee2);&lt;BR /&gt;ArrayList&amp;lt;NodeRef&amp;gt; assignees = new ArrayList&amp;lt;NodeRef&amp;gt;(2);&lt;BR /&gt;assignees.add(assignee1NodeRef);&lt;BR /&gt;assignees.add(assignee2NodeRef);&lt;BR /&gt;Map&amp;lt;QName, Serializable&amp;gt; workflowProps = new HashMap&amp;lt;QName, Serializable&amp;gt;(16);&lt;BR /&gt;workflowProps.put(WorkflowModel.ASSOC_PACKAGE, wfPackage);&lt;BR /&gt;workflowProps.put(QName.createQName("{&lt;A href="http://www.alfresco.org/model/bpm/1.0}assignees" rel="nofollow noopener noreferrer"&gt;http://www.alfresco.org/model/bpm/1.0}assignees&lt;/A&gt;"), assignees);&lt;BR /&gt;&lt;BR /&gt;// Get the workflow definition.&lt;BR /&gt;WorkflowDefinition workflowDefinition = this.workflowService.getDefinitionByName("jbpm$sawaflow2");&lt;BR /&gt;&lt;BR /&gt;// Start a workflow instance.&lt;BR /&gt;WorkflowPath workflowPath = getWorkflowService().startWorkflow(workflowDefinition.getId(), workflowProps);&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Feb 2010 05:17:34 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/from-java-starting-a-workflow-with-several-assignees/m-p/243682#M196812</guid>
      <dc:creator>nicolasraoul</dc:creator>
      <dc:date>2010-02-10T05:17:34Z</dc:date>
    </item>
  </channel>
</rss>

