<?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 Running multiple instances of same process (with Camel routes) in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/running-multiple-instances-of-same-process-with-camel-routes/m-p/149213#M104216</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;&amp;nbsp;&amp;nbsp; I'm having some difficulty running multiple instances of the same process at the same time.&amp;nbsp; I'm kicking them off on separate Java threads as suggested in other forum topics.&amp;nbsp; However, they seem to be running one after the other in a serial fashion, instead of in parallel.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My process flow is almost exactly the same as diagram with receive tasks shown here:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://bpmn20inaction.blogspot.com/2012/12/implement-parallel-execution-in-activiti.html" rel="nofollow noopener noreferrer"&gt;http://bpmn20inaction.blogspot.com/2012/12/implement-parallel-execution-in-activiti.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As a clarification, multiple instances of the same processes seem to be successfully going in parallel, until the receive tasks hit.&amp;nbsp; In other words I see a progression like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;03:26:41,857 [pool-19-thread-1] DEBUG org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerTake&amp;nbsp; - ProcessInstance[133] takes transition (startevent1)–sequenceflow1–&amp;gt;(parallelgateway1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;03:26:41,857 [pool-19-thread-2] DEBUG org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerTake&amp;nbsp; - ProcessInstance[134] takes transition (startevent1)–sequenceflow1–&amp;gt;(parallelgateway1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;…&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;03:26:41,857 [pool-19-thread-2] DEBUG org.activiti.engine.impl.persistence.entity.ExecutionEntity&amp;nbsp; - transitions to take concurrent: [(parallelgateway1)–flow1–&amp;gt;(servicetask1), (parallelgateway1)–flow3–&amp;gt;(servicetask2)]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;03:26:41,858 [pool-19-thread-1] DEBUG org.activiti.engine.impl.persistence.entity.ExecutionEntity&amp;nbsp; - transitions to take concurrent: [(parallelgateway1)–flow1–&amp;gt;(servicetask1), (parallelgateway1)–flow3–&amp;gt;(servicetask2)]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;…&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;…&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;03:26:41,858 [pool-19-thread-2] DEBUG org.activiti.engine.impl.persistence.entity.ExecutionEntity&amp;nbsp; - new ScopeExecution[139] with parent ProcessInstance[134] created to take transition (parallelgateway1)–flow1–&amp;gt;(servicetask1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;03:26:41,858 [pool-19-thread-1] DEBUG org.activiti.engine.impl.persistence.entity.ExecutionEntity&amp;nbsp; - new ScopeExecution[140] with parent ProcessInstance[133] created to take transition (parallelgateway1)–flow1–&amp;gt;(servicetask1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;…&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;…&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;03:26:41,858 [pool-19-thread-2] DEBUG org.activiti.engine.impl.persistence.entity.ExecutionEntity&amp;nbsp; - new ScopeExecution[141] with parent ProcessInstance[134] created to take transition (parallelgateway1)–flow3–&amp;gt;(servicetask2)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;03:26:41,858 [pool-19-thread-1] DEBUG org.activiti.engine.impl.persistence.entity.ExecutionEntity&amp;nbsp; - new ScopeExecution[142] with parent ProcessInstance[133] created to take transition (parallelgateway1)–flow3–&amp;gt;(servicetask2)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;…&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;03:26:41,860 [pool-19-thread-1] DEBUG org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerTake&amp;nbsp; - ConcurrentExecution[140] takes transition (parallelgateway1)–flow1–&amp;gt;(servicetask1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;03:26:41,860 [pool-19-thread-2] DEBUG org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerTake&amp;nbsp; - ConcurrentExecution[139] takes transition (parallelgateway1)–flow1–&amp;gt;(servicetask1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;…&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;…&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;03:26:41,863 [pool-19-thread-1] DEBUG org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerTake&amp;nbsp; - ConcurrentExecution[140] takes transition (servicetask1)–flow8–&amp;gt;(receivetask1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;03:26:41,864 [pool-19-thread-2] DEBUG org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerTake&amp;nbsp; - ConcurrentExecution[139] takes transition (servicetask1)–flow8–&amp;gt;(receivetask1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;…&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;…&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;03:26:41,866 [pool-19-thread-1] DEBUG org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerTake&amp;nbsp; - ConcurrentExecution[142] takes transition (parallelgateway1)–flow3–&amp;gt;(servicetask2)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;03:26:41,867 [pool-19-thread-2] DEBUG org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerTake&amp;nbsp; - ConcurrentExecution[141] takes transition (parallelgateway1)–flow3–&amp;gt;(servicetask2)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;…&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;…&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;03:26:41,869 [pool-19-thread-1] DEBUG org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerTake&amp;nbsp; - ConcurrentExecution[142] takes transition (servicetask2)–flow4–&amp;gt;(receivetask2)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;03:26:41,870 [pool-19-thread-2] DEBUG org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerTake&amp;nbsp; - ConcurrentExecution[141] takes transition (servicetask2)–flow4–&amp;gt;(receivetask2)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;…&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;…&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;03:26:51,901 [Camel (camelContext) thread #7 - seda://receiveQueue1] DEBUG org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerTake&amp;nbsp; - ConcurrentExecution[140] takes transition (receivetask1)–flow9–&amp;gt;(parallelgateway2)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;…&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;…&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;03:26:51,931 [Camel (camelContext) thread #7 - seda://receiveQueue1] DEBUG org.activiti.engine.impl.persistence.entity.ExecutionEntity&amp;nbsp; - transitions to take concurrent: [(parallelgateway2)–flow7–&amp;gt;(endevent1)]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;…&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;…&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;03:26:51,939 [Camel (camelContext) thread #7 - seda://receiveQueue1] DEBUG org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerTake&amp;nbsp; - ProcessInstance[133] takes transition (parallelgateway2)–flow7–&amp;gt;(endevent1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;…&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;… =================================&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;… NOTE LONG GAP IN TIME HERE (ABOUT 10 SECONDS)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;… =================================&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;…&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;03:27:01,922 [Camel (camelContext) thread #7 - seda://receiveQueue1] DEBUG org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerTake&amp;nbsp; - ConcurrentExecution[139] takes transition (receivetask1)–flow9–&amp;gt;(parallelgateway2)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;…&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;…&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;03:27:01,948 [Camel (camelContext) thread #7 - seda://receiveQueue1] DEBUG org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerTake&amp;nbsp; - ConcurrentExecution[141] takes transition (receivetask2)–flow6–&amp;gt;(parallelgateway2)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;…&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;…&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;03:27:01,953 [Camel (camelContext) thread #7 - seda://receiveQueue1] DEBUG org.activiti.engine.impl.persistence.entity.ExecutionEntity&amp;nbsp; - transitions to take concurrent: [(parallelgateway2)–flow7–&amp;gt;(endevent1)]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;…&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;…&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;03:27:01,960 [Camel (camelContext) thread #7 - seda://receiveQueue1] DEBUG org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerTake&amp;nbsp; - ProcessInstance[134] takes transition (parallelgateway2)–flow7–&amp;gt;(endevent1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;+++++++++++++++++++++++++++++++&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So there is about a 10 second delay.&amp;nbsp; This looks to me like if one route is tied up in camel, then the other one can't take it until the first route returns.&amp;nbsp; I'm basically doing a 10 second sleep in the bean that does the work (to simulate real work), before returning…&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas how to work around this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My camel routes look like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;++++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;from("activiti&lt;img id="smileytongue" class="emoticon emoticon-smileytongue" src="https://connect.hyland.com/i/smilies/16x16_smiley-tongue.png" alt="Smiley Tongue" title="Smiley Tongue" /&gt;arallelProcessTest:servicetask1?copyVariablesToProperties=true").setHeader("destination", constant("activiti&lt;img id="smileytongue" class="emoticon emoticon-smileytongue" src="https://connect.hyland.com/i/smilies/16x16_smiley-tongue.png" alt="Smiley Tongue" title="Smiley Tongue" /&gt;arallelProcessTest:receivetask1")).to("seda:asyncQueue1a");&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;from("seda:asyncQueue1a").to("bean:longTask?method=runLongTask(10000)").to("seda:receiveQueue1");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;from("activiti&lt;img id="smileytongue" class="emoticon emoticon-smileytongue" src="https://connect.hyland.com/i/smilies/16x16_smiley-tongue.png" alt="Smiley Tongue" title="Smiley Tongue" /&gt;arallelProcessTest:servicetask2?copyVariablesToProperties=true").setHeader("destination", constant("activiti&lt;img id="smileytongue" class="emoticon emoticon-smileytongue" src="https://connect.hyland.com/i/smilies/16x16_smiley-tongue.png" alt="Smiley Tongue" title="Smiley Tongue" /&gt;arallelProcessTest:receivetask2")).to("seda:asyncQueue2a");&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;from("seda:asyncQueue2a").to("bean:longTask?method=runLongTask(10000)").to("seda:receiveQueue1");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;from("seda:receiveQueue1").recipientList(header("destination"));&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;+++++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 Sep 2013 22:50:12 GMT</pubDate>
    <dc:creator>ghollins</dc:creator>
    <dc:date>2013-09-23T22:50:12Z</dc:date>
    <item>
      <title>Running multiple instances of same process (with Camel routes)</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/running-multiple-instances-of-same-process-with-camel-routes/m-p/149213#M104216</link>
      <description>Hi,&amp;nbsp;&amp;nbsp; I'm having some difficulty running multiple instances of the same process at the same time.&amp;nbsp; I'm kicking them off on separate Java threads as suggested in other forum topics.&amp;nbsp; However, they seem to be running one after the other in a serial fashion, instead of in parallel.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; My process flow</description>
      <pubDate>Mon, 23 Sep 2013 22:50:12 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/running-multiple-instances-of-same-process-with-camel-routes/m-p/149213#M104216</guid>
      <dc:creator>ghollins</dc:creator>
      <dc:date>2013-09-23T22:50:12Z</dc:date>
    </item>
    <item>
      <title>Re: Running multiple instances of same process (with Camel routes)</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/running-multiple-instances-of-same-process-with-camel-routes/m-p/149214#M104217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think I figured this out myself after further investigation.&amp;nbsp; It turns out that the Camel route by default has a 'concurrentConsumers' setting of 1 (see &lt;/SPAN&gt;&lt;A href="http://camel.apache.org/jms.html" rel="nofollow noopener noreferrer"&gt;http://camel.apache.org/jms.html&lt;/A&gt;&lt;SPAN&gt;).&amp;nbsp; By bumping this up to a higher number (&amp;gt;= the number of processes I wanted to run concurrently), I was able to overcome this behavior.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Sep 2013 04:22:32 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/running-multiple-instances-of-same-process-with-camel-routes/m-p/149214#M104217</guid>
      <dc:creator>ghollins</dc:creator>
      <dc:date>2013-09-24T04:22:32Z</dc:date>
    </item>
    <item>
      <title>Re: Running multiple instances of same process (with Camel routes)</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/running-multiple-instances-of-same-process-with-camel-routes/m-p/149215#M104218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Great, thanks for sharing the solution!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Oct 2013 12:22:17 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/running-multiple-instances-of-same-process-with-camel-routes/m-p/149215#M104218</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2013-10-09T12:22:17Z</dc:date>
    </item>
  </channel>
</rss>

