<?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: org.activiti.engine.ActivitiOptimisticLockingException: TimerEntity[] was updated by another transaction concurrently in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/org-activiti-engine-activitioptimisticlockingexception/m-p/151273#M106045</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Do you have multiple engines running on the same DB? If so, this can be ignored, as it' one of the 2 job-executors that is getting an exception because the timer is already executed by the other one. If it's not the case, it means that while the timer 'fires', another thread (possibly your app) has completed a task/signalled/… that particular process, before the "timer fire" transaction is committed. The timer-execution is rolled back, so it actually never happened because the process has moved on since.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 05 Aug 2013 08:20:30 GMT</pubDate>
    <dc:creator>frederikherema1</dc:creator>
    <dc:date>2013-08-05T08:20:30Z</dc:date>
    <item>
      <title>org.activiti.engine.ActivitiOptimisticLockingException: TimerEntity[] was updated by another transaction concurrently</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/org-activiti-engine-activitioptimisticlockingexception/m-p/151272#M106044</link>
      <description>I get a Optimistic lock exception in the scenario where the timer expires i.e. 'waitForUpdate' takes more than 10 seconds.At this stage the workflow continues with the next step defined with boundaryEvent 'setDefaultIfNoDispatchUpdate'.Now the response is received after 20 seconds (say). It signals</description>
      <pubDate>Fri, 02 Aug 2013 13:02:59 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/org-activiti-engine-activitioptimisticlockingexception/m-p/151272#M106044</guid>
      <dc:creator>aman1</dc:creator>
      <dc:date>2013-08-02T13:02:59Z</dc:date>
    </item>
    <item>
      <title>Re: org.activiti.engine.ActivitiOptimisticLockingException: TimerEntity[] was updated by another transaction concurrently</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/org-activiti-engine-activitioptimisticlockingexception/m-p/151273#M106045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Do you have multiple engines running on the same DB? If so, this can be ignored, as it' one of the 2 job-executors that is getting an exception because the timer is already executed by the other one. If it's not the case, it means that while the timer 'fires', another thread (possibly your app) has completed a task/signalled/… that particular process, before the "timer fire" transaction is committed. The timer-execution is rolled back, so it actually never happened because the process has moved on since.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Aug 2013 08:20:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/org-activiti-engine-activitioptimisticlockingexception/m-p/151273#M106045</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2013-08-05T08:20:30Z</dc:date>
    </item>
    <item>
      <title>Re: org.activiti.engine.ActivitiOptimisticLockingException: TimerEntity[] was updated by another transaction concurrently</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/org-activiti-engine-activitioptimisticlockingexception/m-p/151274#M106046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;&amp;lt;receiveTask id="waitForDispatchUpdate" /&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;boundaryEvent attachedToRef="waitForDispatchUpdate"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; id="setDefaultIfNoDispatchUpdate"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &amp;lt;timerEventDefinition&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;timeDuration&amp;gt;PT20S&amp;lt;/timeDuration&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &amp;lt;/timerEventDefinition&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;/boundaryEvent&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;sequenceFlow id="flow3" sourceRef="sendDispatchMessage"&amp;nbsp; targetRef="waitForDispatchUpdate"&amp;nbsp; /&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;sequenceFlow id="flow8" sourceRef="setDefaultIfNoDispatchUpdate" targetRef="setColourToPink" /&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your reply.&amp;nbsp; I do not have multiple engines running. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;After the 'sendDispatchMessage' the control&amp;nbsp; comes to RecieveTask and waits there for response . Suppose the response doesn't comes in 20S. Then flow 8 executes and goes thru this breanch setDefaultIfNoDispatchUpdate -&amp;gt;setColourToPink. At this stage i see that the Activiti updates its tables (TimerEntity) which is correct. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Now if the response comes back in java code , we have an api that tries to signal back the workflow bpmn that the response is recieved.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;the code snippet to do this is below&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Execution execution =runtimeService.createExecutionQuery()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; .processInstanceId(processId).activityId('waitForDispatchUpdate')&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; .singleResult();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if (execution != null) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; runtimeService.signal(execution.getId());&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Should this execution not be null as the 'waitForDispatchUpdate' has already expired now. As it doesn't return null and proceed to execute runtimeService.signal(execution.getId()) , it throws a Optimistic Lock exception on the TimerEntity.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;My point is that the execution should have been returnned null as the timer had expired. Please suggest.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Aug 2013 14:06:35 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/org-activiti-engine-activitioptimisticlockingexception/m-p/151274#M106046</guid>
      <dc:creator>aman1</dc:creator>
      <dc:date>2013-08-08T14:06:35Z</dc:date>
    </item>
    <item>
      <title>Re: org.activiti.engine.ActivitiOptimisticLockingException: TimerEntity[] was updated by another transaction concurrently</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/org-activiti-engine-activitioptimisticlockingexception/m-p/151275#M106047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;With only part of the process definition listed it's difficult to get a full understanding of the issue.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you create a unit test showing your problem or include the full process definition and show exactly what Java code you are executing?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Aug 2013 13:09:18 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/org-activiti-engine-activitioptimisticlockingexception/m-p/151275#M106047</guid>
      <dc:creator>trademak</dc:creator>
      <dc:date>2013-08-09T13:09:18Z</dc:date>
    </item>
  </channel>
</rss>

