<?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 Get Task Assignee Details in ExecutionListener in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/get-task-assignee-details-in-executionlistener/m-p/4845#M2280</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are using Enterprise Activiti 1.5, I'm trying get the assignee details in the java code that's invoked from "ExecutionListener" of the User Task but not able to get it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm able to get the assignee details in the java code using "TaskListener" of the User Task like below,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;String assignee = delegateTask.getAssignee()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to get the assignee details in "ExectionListener"? Please let me know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 04 Feb 2017 05:34:07 GMT</pubDate>
    <dc:creator>eramesh</dc:creator>
    <dc:date>2017-02-04T05:34:07Z</dc:date>
    <item>
      <title>Get Task Assignee Details in ExecutionListener</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/get-task-assignee-details-in-executionlistener/m-p/4845#M2280</link>
      <description>Hi,We are using Enterprise Activiti 1.5, I'm trying get the assignee details in the java code that's invoked from "ExecutionListener" of the User Task but not able to get it.I'm able to get the assignee details in the java code using "TaskListener" of the User Task like below,String assignee = deleg</description>
      <pubDate>Sat, 04 Feb 2017 05:34:07 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/get-task-assignee-details-in-executionlistener/m-p/4845#M2280</guid>
      <dc:creator>eramesh</dc:creator>
      <dc:date>2017-02-04T05:34:07Z</dc:date>
    </item>
    <item>
      <title>Re: Get Task Assignee Details in ExecutionListener</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/get-task-assignee-details-in-executionlistener/m-p/4846#M2281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;B&gt;eramesh _&lt;/B&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you set the candidate users for the user task?&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example,&amp;nbsp;&lt;/P&gt;&lt;DIV class="" style="color: #222222; background-color: #ffffff; margin: 0px 0px 1.25em;"&gt;&lt;DIV class=""&gt;&lt;PRE class="" style="color: black; background: #eeeeee; border: 1px dashed #666666; padding: 1.25em 1.5625em 1.125em;"&gt;&lt;CODE data-lang="xml" style="color: black;"&gt;&amp;lt;userTask id="task" name="My Task" activiti:candidateUsers="${ldapService.findAllSales()}"/&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;Then, if the assignee is within the candidate users,&amp;nbsp;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;delegateTask.getAssignee() &lt;SPAN style="color: #3d3d3d;"&gt;should return the Assignee correctly.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Thong Huynh&lt;/P&gt;&lt;P&gt;&lt;A href="https://migration33.stage.lithium.com/t5/tag/bp3/tg-p"&gt;&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Feb 2017 04:38:22 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/get-task-assignee-details-in-executionlistener/m-p/4846#M2281</guid>
      <dc:creator>thuynh</dc:creator>
      <dc:date>2017-02-07T04:38:22Z</dc:date>
    </item>
    <item>
      <title>Re: Get Task Assignee Details in ExecutionListener</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/get-task-assignee-details-in-executionlistener/m-p/4847#M2282</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI&amp;nbsp;&lt;B&gt;eramesh _&lt;/B&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Apologies, I didn't notice that you were specifically referring to ExecutionListener.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Did you try this?&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;public class MyExecutionListener implements ExecutionListener {&lt;/P&gt;&lt;P&gt;Logger logger = Logger.getLogger(MyExecutionListener.class);&lt;BR /&gt; &lt;BR /&gt; public void notify(DelegateExecution execution) throws Exception {&lt;BR /&gt; // TODO Auto-generated method stub&lt;BR /&gt; logger.info("Execution, task assignee: " + &lt;BR /&gt; &lt;SPAN style="color: #ff9900;"&gt;execution.getEngineServices()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff9900;"&gt; .getTaskService().createTaskQuery()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff9900;"&gt; .processInstanceId(execution.getProcessInstanceId()).singleResult().getAssignee());&lt;/SPAN&gt;&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As an alternative, you can create TaskListener to handle more actions upon task events, here's an example&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;public class MyTaskCreateListener implements TaskListener {&lt;/P&gt;&lt;P&gt;Logger logger = Logger.getLogger(MyTaskCreateListener.class);&lt;BR /&gt;&lt;BR /&gt; public void notify(DelegateTask delegateTask) {&lt;BR /&gt; // Custom logic goes here&lt;BR /&gt; logger.info("User task is created.");&lt;BR /&gt; logger.info("Listener executed."); &lt;BR /&gt; &lt;SPAN style="color: #ff9900;"&gt;logger.info("Delegate Task assignee: " + delegateTask.getAssignee());&lt;/SPAN&gt; &lt;BR /&gt; DelegateExecution execution = delegateTask.getExecution();&lt;BR /&gt; RuntimeService runtimeService = execution.getEngineServices().getRuntimeService(); &lt;BR /&gt; runtimeService.signalEventReceived("EMAIL_SUPPORT_SIGNAL");&lt;BR /&gt; }&lt;BR /&gt;}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Thong Huynh&lt;/P&gt;&lt;P&gt;&lt;A href="https://migration33.stage.lithium.com/t5/tag/bp3/tg-p"&gt;&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Feb 2017 05:52:31 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/get-task-assignee-details-in-executionlistener/m-p/4847#M2282</guid>
      <dc:creator>thuynh</dc:creator>
      <dc:date>2017-02-07T05:52:31Z</dc:date>
    </item>
  </channel>
</rss>

