<?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 Overriding ReceiveTaskActivityBehavior in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/overriding-receivetaskactivitybehavior/m-p/21783#M9563</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there a way for me to extend ReceiveTaskActivityBehavior and override its behavior?&amp;nbsp;I am not sure how to create a single listener which can be used across all&amp;nbsp;Receive tasks for a workflow - in the same way as a ServiceTask listener can be configured to be used as a listener for many ServiceTasks - so I am trying to see if this can be an option.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your answers in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 22 Jun 2017 00:41:27 GMT</pubDate>
    <dc:creator>erwincc</dc:creator>
    <dc:date>2017-06-22T00:41:27Z</dc:date>
    <item>
      <title>Overriding ReceiveTaskActivityBehavior</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/overriding-receivetaskactivitybehavior/m-p/21783#M9563</link>
      <description>Is there a way for me to extend ReceiveTaskActivityBehavior and override its behavior?&amp;nbsp;I am not sure how to create a single listener which can be used across all&amp;nbsp;Receive tasks for a workflow - in the same way as a ServiceTask listener can be configured to be used as a listener for many ServiceTasks</description>
      <pubDate>Thu, 22 Jun 2017 00:41:27 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/overriding-receivetaskactivitybehavior/m-p/21783#M9563</guid>
      <dc:creator>erwincc</dc:creator>
      <dc:date>2017-06-22T00:41:27Z</dc:date>
    </item>
    <item>
      <title>Re: Overriding ReceiveTaskActivityBehavior</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/overriding-receivetaskactivitybehavior/m-p/21784#M9564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; I am not sure how to create a single listener which can be used across all Receive tasks for a workflow - in the same way as a ServiceTask listener can be configured to be used as a listener for many ServiceTasks - so I am trying to see if this can be an option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use ActivitiEventListener.&lt;BR /&gt;&lt;A class="jive-link-external-small" href="https://www.activiti.org/userguide/#eventDispatcherListener" rel="nofollow noopener noreferrer" target="_blank"&gt;https://www.activiti.org/userguide/#eventDispatcherListener&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Make ActivitiEventListener that will be executed in only recive task.&lt;BR /&gt;I attached tha sample java code.&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;@Override&lt;BR /&gt;public void onEvent(ActivitiEvent event) {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; if( (event instanceof ActivitiActivityEvent)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;&amp;amp;("receiveTask".equals( ((ActivitiActivityEvent) event).getActivityType()) )&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;&amp;amp;( ActivitiEventType.ACTIVITY_COMPLETED.equals( event.getType() ) ) &lt;BR /&gt;&amp;nbsp; &amp;nbsp; ){&lt;BR /&gt;・・・・・・・・・・・・・・・・・&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. SetEventListeners to ProcessEngineConfiguration&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;ProcessEngineConfiguration processEngineConfiguration = ProcessEngineConfiguration.createStandaloneInMemProcessEngineConfiguration();&lt;BR /&gt;List&amp;lt;ActivitiEventListener&amp;gt; eventListeners = new ArrayList&amp;lt;ActivitiEventListener&amp;gt;();&lt;BR /&gt;eventListeners.add(new YourActivitiEventListener());&lt;BR /&gt;((ProcessEngineConfigurationImpl)processEngineConfiguration).setEventListeners(eventListeners);&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jun 2017 09:29:52 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/overriding-receivetaskactivitybehavior/m-p/21784#M9564</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-22T09:29:52Z</dc:date>
    </item>
  </channel>
</rss>

