<?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: How to create a CUSTOM ActivitiEventType in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/how-to-create-a-custom-activitieventtype/m-p/242873#M196003</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You mention you dont want to use a try/catch block because you would have to change all your code, but even if you create a custom event type, you will need to change your code to throw such an event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To be perfectly honest, the best approach is to wrap your script code in a try/catch block and throw a BpmnError. You can then catch this with a boundary error catch event and handle any roll back. using this approach, you can also take advantage of compensation events although it sounds as though your use case is relatively simple.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, if you must dispatch a custom event, take a look at the &amp;nbsp;&lt;SPAN class=""&gt;ActivitiEventDispatcherTest.java test case.&lt;BR /&gt;This demonstrates how to dispatch a custom ActivitiEvent.&lt;BR /&gt;&lt;BR /&gt;Also, the&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;EventListenersConfigurationTest.java test case demonstrates how to build a listener for CUSTOM ActivitiEvent's.&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Greg&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;A href="https://migration33.stage.lithium.com/t5/tag/bp3/tg-p"&gt;&lt;/A&gt;‌&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 24 Feb 2017 23:19:30 GMT</pubDate>
    <dc:creator>gdharley</dc:creator>
    <dc:date>2017-02-24T23:19:30Z</dc:date>
    <item>
      <title>How to create a CUSTOM ActivitiEventType</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-create-a-custom-activitieventtype/m-p/242872#M196002</link>
      <description>Good morning,I am having a problem and I think my best solution is creating a custom ActivitiEventType to handle it. The issue is, in my process, I have an script task after process starts and I want to know if the task fails to handle the error. For example, if there are compilation errors and I do</description>
      <pubDate>Fri, 28 Oct 2016 09:46:25 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-create-a-custom-activitieventtype/m-p/242872#M196002</guid>
      <dc:creator>rutenioh</dc:creator>
      <dc:date>2016-10-28T09:46:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a CUSTOM ActivitiEventType</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-create-a-custom-activitieventtype/m-p/242873#M196003</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You mention you dont want to use a try/catch block because you would have to change all your code, but even if you create a custom event type, you will need to change your code to throw such an event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To be perfectly honest, the best approach is to wrap your script code in a try/catch block and throw a BpmnError. You can then catch this with a boundary error catch event and handle any roll back. using this approach, you can also take advantage of compensation events although it sounds as though your use case is relatively simple.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, if you must dispatch a custom event, take a look at the &amp;nbsp;&lt;SPAN class=""&gt;ActivitiEventDispatcherTest.java test case.&lt;BR /&gt;This demonstrates how to dispatch a custom ActivitiEvent.&lt;BR /&gt;&lt;BR /&gt;Also, the&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;EventListenersConfigurationTest.java test case demonstrates how to build a listener for CUSTOM ActivitiEvent's.&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Greg&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;A href="https://migration33.stage.lithium.com/t5/tag/bp3/tg-p"&gt;&lt;/A&gt;‌&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Feb 2017 23:19:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-create-a-custom-activitieventtype/m-p/242873#M196003</guid>
      <dc:creator>gdharley</dc:creator>
      <dc:date>2017-02-24T23:19:30Z</dc:date>
    </item>
  </channel>
</rss>

