<?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: listen to events when a task is conplete in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/listen-to-events-when-a-task-is-conplete/m-p/177543#M130673</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Check out the &lt;/SPAN&gt;&lt;EM&gt;3.18. Event handlers&lt;/EM&gt;&lt;SPAN&gt; section of the user guide&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://activiti.org/userguide/index.html" rel="nofollow noopener noreferrer"&gt;http://activiti.org/userguide/index.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To be notified only when a task completes, set the typedEventListeners property of &lt;/SPAN&gt;&lt;EM&gt;processEngineConfiguration&lt;/EM&gt;&lt;SPAN&gt; to a &lt;/SPAN&gt;&lt;EM&gt;Map&lt;/EM&gt;&lt;SPAN&gt; with a key &lt;/SPAN&gt;&lt;EM&gt;TASK_COMPLETED&lt;/EM&gt;&lt;SPAN&gt; and value of &lt;/SPAN&gt;&lt;EM&gt;List&lt;/EM&gt;&lt;SPAN&gt; containing your class that implements &lt;/SPAN&gt;&lt;EM&gt;org.activiti.engine.delegate.event.ActivitiEventListener&lt;/EM&gt;&lt;SPAN&gt;. Your class's &lt;/SPAN&gt;&lt;EM&gt;onEvent&lt;/EM&gt;&lt;SPAN&gt; method will get called with an instance of &lt;/SPAN&gt;&lt;EM&gt;org.activiti.engine.delegate.event.ActivitiEvent&lt;/EM&gt;&lt;SPAN&gt; each time a task completes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The &lt;/SPAN&gt;&lt;EM&gt;ActivitiEvent&lt;/EM&gt;&lt;SPAN&gt; has a &lt;/SPAN&gt;&lt;EM&gt;getProcessDefinitionId&lt;/EM&gt;&lt;SPAN&gt; that you can use to differentiate between different process definitions. To differentiate between tasks, cast &lt;/SPAN&gt;&lt;EM&gt;ActivitiEvent&lt;/EM&gt;&lt;SPAN&gt; to &lt;/SPAN&gt;&lt;EM&gt;org.activiti.engine.delegate.event.impl.ActivitiEntityEventImpl&lt;/EM&gt;&lt;SPAN&gt;. You can then get the task instance using the &lt;/SPAN&gt;&lt;EM&gt;getEntity&lt;/EM&gt;&lt;SPAN&gt; method of &lt;/SPAN&gt;&lt;EM&gt;ActivitiEntityEventImpl&lt;/EM&gt;&lt;SPAN&gt; (which, of course, you will need to cast). From the task instance you can use the task name or task definition key to differentiate between tasks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 03 May 2015 21:37:43 GMT</pubDate>
    <dc:creator>balsarori</dc:creator>
    <dc:date>2015-05-03T21:37:43Z</dc:date>
    <item>
      <title>listen to events when a task is conplete</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/listen-to-events-when-a-task-is-conplete/m-p/177542#M130672</link>
      <description>Hi. How do I listen for tasks being completed, and how can I differentiate between the various tasks that might exist for a process definition?</description>
      <pubDate>Sun, 03 May 2015 19:49:12 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/listen-to-events-when-a-task-is-conplete/m-p/177542#M130672</guid>
      <dc:creator>viggo_navarsete</dc:creator>
      <dc:date>2015-05-03T19:49:12Z</dc:date>
    </item>
    <item>
      <title>Re: listen to events when a task is conplete</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/listen-to-events-when-a-task-is-conplete/m-p/177543#M130673</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Check out the &lt;/SPAN&gt;&lt;EM&gt;3.18. Event handlers&lt;/EM&gt;&lt;SPAN&gt; section of the user guide&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://activiti.org/userguide/index.html" rel="nofollow noopener noreferrer"&gt;http://activiti.org/userguide/index.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To be notified only when a task completes, set the typedEventListeners property of &lt;/SPAN&gt;&lt;EM&gt;processEngineConfiguration&lt;/EM&gt;&lt;SPAN&gt; to a &lt;/SPAN&gt;&lt;EM&gt;Map&lt;/EM&gt;&lt;SPAN&gt; with a key &lt;/SPAN&gt;&lt;EM&gt;TASK_COMPLETED&lt;/EM&gt;&lt;SPAN&gt; and value of &lt;/SPAN&gt;&lt;EM&gt;List&lt;/EM&gt;&lt;SPAN&gt; containing your class that implements &lt;/SPAN&gt;&lt;EM&gt;org.activiti.engine.delegate.event.ActivitiEventListener&lt;/EM&gt;&lt;SPAN&gt;. Your class's &lt;/SPAN&gt;&lt;EM&gt;onEvent&lt;/EM&gt;&lt;SPAN&gt; method will get called with an instance of &lt;/SPAN&gt;&lt;EM&gt;org.activiti.engine.delegate.event.ActivitiEvent&lt;/EM&gt;&lt;SPAN&gt; each time a task completes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The &lt;/SPAN&gt;&lt;EM&gt;ActivitiEvent&lt;/EM&gt;&lt;SPAN&gt; has a &lt;/SPAN&gt;&lt;EM&gt;getProcessDefinitionId&lt;/EM&gt;&lt;SPAN&gt; that you can use to differentiate between different process definitions. To differentiate between tasks, cast &lt;/SPAN&gt;&lt;EM&gt;ActivitiEvent&lt;/EM&gt;&lt;SPAN&gt; to &lt;/SPAN&gt;&lt;EM&gt;org.activiti.engine.delegate.event.impl.ActivitiEntityEventImpl&lt;/EM&gt;&lt;SPAN&gt;. You can then get the task instance using the &lt;/SPAN&gt;&lt;EM&gt;getEntity&lt;/EM&gt;&lt;SPAN&gt; method of &lt;/SPAN&gt;&lt;EM&gt;ActivitiEntityEventImpl&lt;/EM&gt;&lt;SPAN&gt; (which, of course, you will need to cast). From the task instance you can use the task name or task definition key to differentiate between tasks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 May 2015 21:37:43 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/listen-to-events-when-a-task-is-conplete/m-p/177543#M130673</guid>
      <dc:creator>balsarori</dc:creator>
      <dc:date>2015-05-03T21:37:43Z</dc:date>
    </item>
  </channel>
</rss>

