<?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 Parallel task completion issue in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/parallel-task-completion-issue/m-p/148141#M103406</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 recently ran into a issue where two users completed one task at same time.&amp;nbsp; Process after this task is rather complex, including parallel gateways and call activities, where some data are updated in external system, so it runs for 20-30 seconds. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Problem is that when two users completed this task within 5 seconds, one failed due to data inconsistency in external system (which is expected), but also the first one failed with OptimisticLockingException&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;org.activiti.engine.ActivitiOptimisticLockingException: TaskEntity[13195361] was updated by another transaction concurrently &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;at org.activiti.engine.impl.db.DbSqlSession$DeletePersistentObjectOperation.execute(DbSqlSession.java:238) &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;at org.activiti.engine.impl.db.DbSqlSession.flushDeletes(DbSqlSession.java:667) &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;at org.activiti.engine.impl.db.DbSqlSession.flush(DbSqlSession.java:461) &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;at org.activiti.engine.impl.interceptor.CommandContext.flushSessions(CommandContext.java:167) &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;at org.activiti.engine.impl.interceptor.CommandContext.close(CommandContext.java:114) &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is on Activiti 5.11 on Oracle. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would expect that first execution would survive correctly. I don't know whether it is more db or activiti issue and only idea I have is to create some locking mechanism in application that would block such calls or claim task for individual user before calling task complete, but since the users are not used to claiming task I could get into problems when complete fails and task got stuck on individual user.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any idea for some clean solution is welcomed &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 May 2013 10:11:32 GMT</pubDate>
    <dc:creator>mpradny</dc:creator>
    <dc:date>2013-05-02T10:11:32Z</dc:date>
    <item>
      <title>Parallel task completion issue</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/parallel-task-completion-issue/m-p/148141#M103406</link>
      <description>Hi, I recently ran into a issue where two users completed one task at same time.&amp;nbsp; Process after this task is rather complex, including parallel gateways and call activities, where some data are updated in external system, so it runs for 20-30 seconds. Problem is that when two users completed this ta</description>
      <pubDate>Thu, 02 May 2013 10:11:32 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/parallel-task-completion-issue/m-p/148141#M103406</guid>
      <dc:creator>mpradny</dc:creator>
      <dc:date>2013-05-02T10:11:32Z</dc:date>
    </item>
    <item>
      <title>Re: Parallel task completion issue</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/parallel-task-completion-issue/m-p/148142#M103407</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hmm your assumption is correct: one should get the optimistic locking exception, the other should just execute.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;20-30 secs does sound long for keeping one transaction open. Especially oracle (at least in the past) is known for not coping with that well. So maybe it's an oracle configuration setting? Unless it's a bug, Activiti should execute the way you describe.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 May 2013 08:57:12 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/parallel-task-completion-issue/m-p/148142#M103407</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2013-05-06T08:57:12Z</dc:date>
    </item>
    <item>
      <title>Re: Parallel task completion issue</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/parallel-task-completion-issue/m-p/148143#M103408</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;you can set task assignee before completing the task and always check if task assignee is not null before completing the task&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;* assuming you are not maintaining task assignee. if not you need to change taskAssignee to some other value with which you can determine that the task is under processing.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Aug 2013 07:48:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/parallel-task-completion-issue/m-p/148143#M103408</guid>
      <dc:creator>touseefrafique</dc:creator>
      <dc:date>2013-08-27T07:48:47Z</dc:date>
    </item>
  </channel>
</rss>

