<?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 Concurrency exception on timer event in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/concurrency-exception-on-timer-event/m-p/66863#M42578</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have found that the time taken to start a process instance can be too long for my purposes when the process definition includes relatively slow (hundreds of milliseconds) activities immediately after the start event. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In order to force Activiti to return immediately after starting the process I have put a timer event as the first task with a very short (1 second) timeout. In unit tests this achieves my goal of a faster process start but in the tomcat environment I am seeing the following stack trace. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have two questions: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1. is there a better way to ensure the fastest possible process start? It seems like it would be good to have an Activiti flag to persist the process for async handling, does such a thing exist? &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Any ideas how to avoid the Job thread hitting this concurrency exception? I'd prefer to avoid simply trying longer delays in the timer event until it works&amp;nbsp; &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://connect.hyland.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks, Tim&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;SEVERE: Error while closing command context&lt;BR /&gt;org.activiti.engine.ActivitiOptimisticLockingException: TimerEntity[62760] was updated by another transaction concurrently&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at org.activiti.engine.impl.db.DbSqlSession.flushUpdates(DbSqlSession.java:425)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at org.activiti.engine.impl.db.DbSqlSession.flush(DbSqlSession.java:338)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at org.activiti.engine.impl.interceptor.CommandContext.flushSessions(CommandContext.java:147)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at org.activiti.engine.impl.interceptor.CommandContext.close(CommandContext.java:103)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:49)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at org.activiti.engine.impl.jobexecutor.JobAcquisitionThread.run(JobAcquisitionThread.java:63)&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 22 Aug 2011 13:58:26 GMT</pubDate>
    <dc:creator>tstephen</dc:creator>
    <dc:date>2011-08-22T13:58:26Z</dc:date>
    <item>
      <title>Concurrency exception on timer event</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/concurrency-exception-on-timer-event/m-p/66863#M42578</link>
      <description>Hi,I have found that the time taken to start a process instance can be too long for my purposes when the process definition includes relatively slow (hundreds of milliseconds) activities immediately after the start event. In order to force Activiti to return immediately after starting the process I</description>
      <pubDate>Mon, 22 Aug 2011 13:58:26 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/concurrency-exception-on-timer-event/m-p/66863#M42578</guid>
      <dc:creator>tstephen</dc:creator>
      <dc:date>2011-08-22T13:58:26Z</dc:date>
    </item>
    <item>
      <title>Re: Concurrency exception on timer event</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/concurrency-exception-on-timer-event/m-p/66864#M42579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;It seems like it would be good to have an Activiti flag to persist the process for async handling, does such a thing exist?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;A href="http://tinyurl.com/43v2uvo" rel="nofollow noopener noreferrer"&gt;http://tinyurl.com/43v2uvo&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Aug 2011 15:05:42 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/concurrency-exception-on-timer-event/m-p/66864#M42579</guid>
      <dc:creator>ronald_van_kuij</dc:creator>
      <dc:date>2011-08-22T15:05:42Z</dc:date>
    </item>
  </channel>
</rss>

