<?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: Exception catching in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/exception-catching/m-p/117459#M82953</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The easiest way is to wrap all of the API-calls you do to activiti in a try-catch block and use the stack trace, this covers all synchronous errors. When you want to have job-executor-errors (e.g.. timers) you'll have to add custom JobHandlers in the configuration.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Another way, a bit deeper into activiti, is to include an additional Interceptor in the activiti command-stack. For example, see the "org.activiti.engine.impl.interceptor.LogInterceptor", which logs every command that happens in activiti. In your case, it would be something like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;try {&lt;BR /&gt;&amp;nbsp; return next.execute(command);&lt;BR /&gt;} catch(Throwable t) {&lt;BR /&gt; // insert magic here&lt;BR /&gt;}&lt;BR /&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;And plug your interceptor in, into the configuration using JAVA or wiring the property in spring:&lt;/SPAN&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt; public ProcessEngineConfigurationImpl setCustomPreCommandInterceptorsTxRequired(List&amp;lt;CommandInterceptor&amp;gt; customPreCommandInterceptorsTxRequired) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.customPreCommandInterceptorsTxRequired = customPreCommandInterceptorsTxRequired;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return this;&lt;BR /&gt;&amp;nbsp; }&lt;BR /&gt;&lt;/CODE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Oct 2012 13:27:45 GMT</pubDate>
    <dc:creator>frederikherema1</dc:creator>
    <dc:date>2012-10-19T13:27:45Z</dc:date>
    <item>
      <title>Exception catching</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/exception-catching/m-p/117458#M82952</link>
      <description>Hi, i would like to know if there is an easy way to catch exceptions in execution of one workflow. To be more specific i would like to have access to the info that is displayed in the console of the activiti server when something is going wrong.</description>
      <pubDate>Fri, 19 Oct 2012 09:46:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/exception-catching/m-p/117458#M82952</guid>
      <dc:creator>fchatzia</dc:creator>
      <dc:date>2012-10-19T09:46:50Z</dc:date>
    </item>
    <item>
      <title>Re: Exception catching</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/exception-catching/m-p/117459#M82953</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The easiest way is to wrap all of the API-calls you do to activiti in a try-catch block and use the stack trace, this covers all synchronous errors. When you want to have job-executor-errors (e.g.. timers) you'll have to add custom JobHandlers in the configuration.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Another way, a bit deeper into activiti, is to include an additional Interceptor in the activiti command-stack. For example, see the "org.activiti.engine.impl.interceptor.LogInterceptor", which logs every command that happens in activiti. In your case, it would be something like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;try {&lt;BR /&gt;&amp;nbsp; return next.execute(command);&lt;BR /&gt;} catch(Throwable t) {&lt;BR /&gt; // insert magic here&lt;BR /&gt;}&lt;BR /&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;And plug your interceptor in, into the configuration using JAVA or wiring the property in spring:&lt;/SPAN&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt; public ProcessEngineConfigurationImpl setCustomPreCommandInterceptorsTxRequired(List&amp;lt;CommandInterceptor&amp;gt; customPreCommandInterceptorsTxRequired) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.customPreCommandInterceptorsTxRequired = customPreCommandInterceptorsTxRequired;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return this;&lt;BR /&gt;&amp;nbsp; }&lt;BR /&gt;&lt;/CODE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2012 13:27:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/exception-catching/m-p/117459#M82953</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2012-10-19T13:27:45Z</dc:date>
    </item>
    <item>
      <title>Re: Exception catching</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/exception-catching/m-p/117460#M82954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2012 14:54:36 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/exception-catching/m-p/117460#M82954</guid>
      <dc:creator>fchatzia</dc:creator>
      <dc:date>2012-10-19T14:54:36Z</dc:date>
    </item>
  </channel>
</rss>

