<?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: Async Continuations with concurrent executions in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/async-continuations-with-concurrent-executions/m-p/75989#M50047</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;We can think about how to deal with this:&lt;BR /&gt;- simply accept it &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;&amp;nbsp; or&lt;BR /&gt;- implement exclusive jobs (some hooks in the code and database schema already there)&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there another solution?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;None of the solutions above will work for me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The requirements I have are as follows: given this process (same as the original post):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[img]&lt;/SPAN&gt;&lt;A href="http://dl.dropbox.com/u/175705/Screen%20shot%202011-10-30%20at%206.03.10%20PM.png" rel="nofollow noopener noreferrer"&gt;http://dl.dropbox.com/u/175705/Screen%20shot%202011-10-30%20at%206.03.10%20PM.png&lt;/A&gt;&lt;SPAN&gt;[/img]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Tasks A, B and C have to be parallel (the time it takes between the parallel gateways can't be time(A) + time(B) + time(C)).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Task A, B, and C can be called only once (can't be rolled back)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So the A, B and C tasks need to be parallel (activiti:async="true" activiti:exclusive="false").&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The solution is very well explained in the activity 5.9 user guide &lt;/SPAN&gt;&lt;A href="http://www.activiti.org/userguide/index.html#exclusiveJobs" rel="nofollow noopener noreferrer"&gt;http://www.activiti.org/userguide/index.html#exclusiveJobs&lt;/A&gt;&lt;SPAN&gt; and this is exactly was I was looking for except for the issues mentioned when joining the tasks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I understand the need for the optimistic locking and it will work for me if the retry will only retry the join transition and not call the execute on the service task again. Otherwise the task would book the flight again and again for every retry. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I guess that means the task transaction is separate from the activiti engine transition transaction.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there a difference if A, B and C are user tasks instead of service tasks and they're completed concurrently in different threads?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Would this solve the problem?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Looking forward for your input.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;TIA.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Ion&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Apr 2012 00:43:45 GMT</pubDate>
    <dc:creator>imoraru</dc:creator>
    <dc:date>2012-04-18T00:43:45Z</dc:date>
    <item>
      <title>Async Continuations with concurrent executions</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/async-continuations-with-concurrent-executions/m-p/75983#M50041</link>
      <description>See http://forums.activiti.org/en/viewtopic.php?f=6&amp;amp;t=2635&amp;amp;start=0The underlying problem is that in the case of the process shown in the linked forum post, we have one root execution and 3 concurrent child executions. The child executions are continued asynchronously in three different trans</description>
      <pubDate>Wed, 02 Nov 2011 09:14:09 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/async-continuations-with-concurrent-executions/m-p/75983#M50041</guid>
      <dc:creator>meyerd</dc:creator>
      <dc:date>2011-11-02T09:14:09Z</dc:date>
    </item>
    <item>
      <title>Re: Async Continuations with concurrent executions</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/async-continuations-with-concurrent-executions/m-p/75984#M50042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I totally agree with you and I think that the second choice is by far the right one, it will add a great value to the engine.&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Nov 2011 11:47:06 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/async-continuations-with-concurrent-executions/m-p/75984#M50042</guid>
      <dc:creator>filipearaujo</dc:creator>
      <dc:date>2011-11-04T11:47:06Z</dc:date>
    </item>
    <item>
      <title>Re: Async Continuations with concurrent executions</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/async-continuations-with-concurrent-executions/m-p/75985#M50043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;See: &lt;/SPAN&gt;&lt;A href="http://jira.codehaus.org/browse/ACT-989" rel="nofollow noopener noreferrer"&gt;http://jira.codehaus.org/browse/ACT-989&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 06 Nov 2011 18:20:03 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/async-continuations-with-concurrent-executions/m-p/75985#M50043</guid>
      <dc:creator>meyerd</dc:creator>
      <dc:date>2011-11-06T18:20:03Z</dc:date>
    </item>
    <item>
      <title>Re: Async Continuations with concurrent executions</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/async-continuations-with-concurrent-executions/m-p/75986#M50044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks, I will give it a try!&amp;nbsp; &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>Wed, 09 Nov 2011 00:16:14 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/async-continuations-with-concurrent-executions/m-p/75986#M50044</guid>
      <dc:creator>filipearaujo</dc:creator>
      <dc:date>2011-11-09T00:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: Async Continuations with concurrent executions</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/async-continuations-with-concurrent-executions/m-p/75987#M50045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi, sorry for the delayed reply but here's my conclusions:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- The example with the parallel gateway works fine&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- But a example with a loop, i.e., instead of a task a loop with a task and a exclusive gateway (I want to execute multiple times and when a certain value is true then finish the loop) it gives the same error and this exception:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;SEVERE: Error while closing command context&lt;BR /&gt;org.apache.ibatis.exceptions.PersistenceException: &lt;BR /&gt;### Error updating database.&amp;nbsp; Cause: org.h2.jdbc.JdbcSQLException: Referential integrity constraint violation: "ACT_FK_EXE_PROCINST: PUBLIC.ACT_RU_EXECUTION FOREIGN KEY(PROC_INST_ID_) REFERENCES PUBLIC.ACT_RU_EXECUTION(ID_)"; SQL statement:&lt;BR /&gt;delete from ACT_RU_EXECUTION where ID_ = ? [23003-132]&lt;BR /&gt;### The error may involve org.activiti.engine.impl.persistence.entity.ExecutionEntity.deleteExecution-Inline&lt;BR /&gt;### The error occurred while setting parameters&lt;BR /&gt;### Cause: org.h2.jdbc.JdbcSQLException: Referential integrity constraint violation: "ACT_FK_EXE_PROCINST: PUBLIC.ACT_RU_EXECUTION FOREIGN KEY(PROC_INST_ID_) REFERENCES PUBLIC.ACT_RU_EXECUTION(ID_)"; SQL statement:&lt;BR /&gt;delete from ACT_RU_EXECUTION where ID_ = ? [23003-132]&lt;BR /&gt; at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:8)&lt;BR /&gt; at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:120)&lt;BR /&gt; at org.apache.ibatis.session.defaults.DefaultSqlSession.delete(DefaultSqlSession.java:131)&lt;BR /&gt; at org.activiti.engine.impl.db.DbSqlSession$DeleteById.execute(DbSqlSession.java:146)&lt;BR /&gt; at org.activiti.engine.impl.db.DbSqlSession.flushDeletes(DbSqlSession.java:444)&lt;BR /&gt; at org.activiti.engine.impl.db.DbSqlSession.flush(DbSqlSession.java:349)&lt;BR /&gt; at org.activiti.engine.impl.interceptor.CommandContext.flushSessions(CommandContext.java:147)&lt;BR /&gt; at org.activiti.engine.impl.interceptor.CommandContext.close(CommandContext.java:103)&lt;BR /&gt; at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:49)&lt;BR /&gt; at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)&lt;BR /&gt; at org.activiti.engine.impl.RepositoryServiceImpl.deleteDeployment(RepositoryServiceImpl.java:55)&lt;BR /&gt; at org.activiti.engine.impl.test.TestHelper.annotationDeploymentTearDown(TestHelper.java:105)&lt;BR /&gt; at org.activiti.engine.test.ActivitiRule.finished(ActivitiRule.java:119)&lt;BR /&gt; at org.junit.rules.TestWatchman$1.evaluate(TestWatchman.java:54)&lt;BR /&gt; at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)&lt;BR /&gt; at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)&lt;BR /&gt; at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)&lt;BR /&gt; at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)&lt;BR /&gt; at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)&lt;BR /&gt; at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)&lt;BR /&gt; at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)&lt;BR /&gt; at org.junit.runners.ParentRunner.run(ParentRunner.java:236)&lt;BR /&gt; at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)&lt;BR /&gt; at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)&lt;BR /&gt; at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)&lt;BR /&gt; at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)&lt;BR /&gt; at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)&lt;BR /&gt; at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)&lt;BR /&gt;Caused by: org.h2.jdbc.JdbcSQLException: Referential integrity constraint violation: "ACT_FK_EXE_PROCINST: PUBLIC.ACT_RU_EXECUTION FOREIGN KEY(PROC_INST_ID_) REFERENCES PUBLIC.ACT_RU_EXECUTION(ID_)"; SQL statement:&lt;BR /&gt;delete from ACT_RU_EXECUTION where ID_ = ? [23003-132]&lt;BR /&gt; at org.h2.message.DbException.getJdbcSQLException(DbException.java:316)&lt;BR /&gt; at org.h2.message.DbException.get(DbException.java:167)&lt;BR /&gt; at org.h2.message.DbException.get(DbException.java:144)&lt;BR /&gt; at org.h2.constraint.ConstraintReferential.checkRow(ConstraintReferential.java:374)&lt;BR /&gt; at org.h2.constraint.ConstraintReferential.checkRowRefTable(ConstraintReferential.java:391)&lt;BR /&gt; at org.h2.constraint.ConstraintReferential.checkRow(ConstraintReferential.java:271)&lt;BR /&gt; at org.h2.table.Table.fireConstraints(Table.java:766)&lt;BR /&gt; at org.h2.table.Table.fireAfterRow(Table.java:783)&lt;BR /&gt; at org.h2.command.dml.Delete.update(Delete.java:79)&lt;BR /&gt; at org.h2.command.CommandContainer.update(CommandContainer.java:70)&lt;BR /&gt; at org.h2.command.Command.executeUpdate(Command.java:198)&lt;BR /&gt; at org.h2.jdbc.JdbcPreparedStatement.execute(JdbcPreparedStatement.java:179)&lt;BR /&gt; at org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:22)&lt;BR /&gt; at org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:51)&lt;BR /&gt; at org.apache.ibatis.executor.SimpleExecutor.doUpdate(SimpleExecutor.java:29)&lt;BR /&gt; at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:75)&lt;BR /&gt; at org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:43)&lt;BR /&gt; at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:118)&lt;BR /&gt; … 26 more&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;Maybe its not prepared for execute multiple times the same async task.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Filipe Araújo&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 Dec 2011 18:03:26 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/async-continuations-with-concurrent-executions/m-p/75987#M50045</guid>
      <dc:creator>filipearaujo</dc:creator>
      <dc:date>2011-12-10T18:03:26Z</dc:date>
    </item>
    <item>
      <title>Re: Async Continuations with concurrent executions</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/async-continuations-with-concurrent-executions/m-p/75988#M50046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Filipe,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;interesting… would it be possible to post a simplified version of your process-xml which would allow us to reproduce the behavior?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Dec 2011 14:36:14 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/async-continuations-with-concurrent-executions/m-p/75988#M50046</guid>
      <dc:creator>meyerd</dc:creator>
      <dc:date>2011-12-13T14:36:14Z</dc:date>
    </item>
    <item>
      <title>Re: Async Continuations with concurrent executions</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/async-continuations-with-concurrent-executions/m-p/75989#M50047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;We can think about how to deal with this:&lt;BR /&gt;- simply accept it &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;&amp;nbsp; or&lt;BR /&gt;- implement exclusive jobs (some hooks in the code and database schema already there)&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there another solution?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;None of the solutions above will work for me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The requirements I have are as follows: given this process (same as the original post):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[img]&lt;/SPAN&gt;&lt;A href="http://dl.dropbox.com/u/175705/Screen%20shot%202011-10-30%20at%206.03.10%20PM.png" rel="nofollow noopener noreferrer"&gt;http://dl.dropbox.com/u/175705/Screen%20shot%202011-10-30%20at%206.03.10%20PM.png&lt;/A&gt;&lt;SPAN&gt;[/img]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Tasks A, B and C have to be parallel (the time it takes between the parallel gateways can't be time(A) + time(B) + time(C)).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Task A, B, and C can be called only once (can't be rolled back)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So the A, B and C tasks need to be parallel (activiti:async="true" activiti:exclusive="false").&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The solution is very well explained in the activity 5.9 user guide &lt;/SPAN&gt;&lt;A href="http://www.activiti.org/userguide/index.html#exclusiveJobs" rel="nofollow noopener noreferrer"&gt;http://www.activiti.org/userguide/index.html#exclusiveJobs&lt;/A&gt;&lt;SPAN&gt; and this is exactly was I was looking for except for the issues mentioned when joining the tasks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I understand the need for the optimistic locking and it will work for me if the retry will only retry the join transition and not call the execute on the service task again. Otherwise the task would book the flight again and again for every retry. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I guess that means the task transaction is separate from the activiti engine transition transaction.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there a difference if A, B and C are user tasks instead of service tasks and they're completed concurrently in different threads?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Would this solve the problem?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Looking forward for your input.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;TIA.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Ion&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2012 00:43:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/async-continuations-with-concurrent-executions/m-p/75989#M50047</guid>
      <dc:creator>imoraru</dc:creator>
      <dc:date>2012-04-18T00:43:45Z</dc:date>
    </item>
    <item>
      <title>Re: Async Continuations with concurrent executions</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/async-continuations-with-concurrent-executions/m-p/75990#M50048</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 am also stuck in a similar design. Could you please let me know if you found any solution/workaround?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 May 2013 21:11:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/async-continuations-with-concurrent-executions/m-p/75990#M50048</guid>
      <dc:creator>jdev_hari</dc:creator>
      <dc:date>2013-05-22T21:11:30Z</dc:date>
    </item>
  </channel>
</rss>

