<?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: Alfresco - Get username in workflow activiti in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/alfresco-get-username-in-workflow-activiti/m-p/212122#M165252</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Seems like you should be using a taskLstener rather than an executionListener since this will give you the TaskDelegate directly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But if for some reason you MUST use an executionListener then somethign like this should do the trick:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; String executionId = execution.getId();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Task theTask = execution.getEngineServices().getTaskService().createTaskQuery().executionId(executionId).singleResult();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; String theAssignee = theTask.getAssignee();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Nov 2015 17:53:34 GMT</pubDate>
    <dc:creator>gdharley</dc:creator>
    <dc:date>2015-11-20T17:53:34Z</dc:date>
    <item>
      <title>Alfresco - Get username in workflow activiti</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/alfresco-get-username-in-workflow-activiti/m-p/212121#M165251</link>
      <description>I'm searching for the username of assignees when I create on a workflow…I use this: public void notify(DelegateExecution execution){&amp;nbsp;&amp;nbsp; // get value of property mymodel:myproperty &amp;nbsp;&amp;nbsp; Object assignees = execution.getVariable("bpm_assignees");  }‍‍‍‍‍‍When I get bpm_assignees i get this:bpm_assignees m</description>
      <pubDate>Thu, 19 Nov 2015 09:14:59 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/alfresco-get-username-in-workflow-activiti/m-p/212121#M165251</guid>
      <dc:creator>pat9rv3sousa</dc:creator>
      <dc:date>2015-11-19T09:14:59Z</dc:date>
    </item>
    <item>
      <title>Re: Alfresco - Get username in workflow activiti</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/alfresco-get-username-in-workflow-activiti/m-p/212122#M165252</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Seems like you should be using a taskLstener rather than an executionListener since this will give you the TaskDelegate directly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But if for some reason you MUST use an executionListener then somethign like this should do the trick:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; String executionId = execution.getId();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Task theTask = execution.getEngineServices().getTaskService().createTaskQuery().executionId(executionId).singleResult();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; String theAssignee = theTask.getAssignee();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Nov 2015 17:53:34 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/alfresco-get-username-in-workflow-activiti/m-p/212122#M165252</guid>
      <dc:creator>gdharley</dc:creator>
      <dc:date>2015-11-20T17:53:34Z</dc:date>
    </item>
  </channel>
</rss>

