<?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 loopCardinality in multi instance subprocess unchecked in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/loopcardinality-in-multi-instance-subprocess-unchecked/m-p/153079#M107675</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a multi-instance, non-sequential, subpprocess that has an activiti:collection with (currently) two elements in it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, when setting multiInstanceLoopCharacteristics, I set the loopCardinality value to 5 (doing what have gleaned to mean a maximum of 5 instances/threads can run concurrently) and receive an exception when the two iterations conclude:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;ERROR org.activiti.engine.impl.interceptor.CommandContext:close:140 - Error while closing command context&lt;BR /&gt;java.util.NoSuchElementException&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at java.util.AbstractList$Itr.next(AbstractList.java:350)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.activiti.engine.impl.bpmn.behavior.MultiInstanceActivityBehavior.executeOriginalBehavior(MultiInstanceActivityBehavior.java:162)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.activiti.engine.impl.bpmn.behavior.ParallelMultiInstanceBehavior.createInstances(ParallelMultiInstanceBehavior.java:82)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.activiti.engine.impl.bpmn.behavior.MultiInstanceActivityBehavior.execute(MultiInstanceActivityBehavior.java:89)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityExecute.execute(AtomicOperationActivityExecute.java:45)&lt;BR /&gt;&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;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried adding a&amp;nbsp; &amp;lt;completionCondition&amp;gt;${nrOfCompletedInstances/nrOfInstances == 1 }&amp;lt;/completionCondition&amp;gt; to make it break out forcefully even through the loop would have completed anyway, to no avail.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Only once I changed the loopCardinality to be &amp;lt;= the number of iterations being performed did it not error at the end of the process.&amp;nbsp; Either there is a misnomer about what loopCardinality is in relation to "instances" described in the user guide, or there is an issue with how the number of threads are being allocated.&amp;nbsp; I would feel that if it truly is a "maximum number of concurrent processes" then I should be able to define a number greater than the size of the iterator.&amp;nbsp; A maximum should not be constraining as a minimum.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please let me know if I am interpreting these properties correctly and if this is a bug/valid complaint.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Dec 2013 16:07:13 GMT</pubDate>
    <dc:creator>page80</dc:creator>
    <dc:date>2013-12-12T16:07:13Z</dc:date>
    <item>
      <title>loopCardinality in multi instance subprocess unchecked</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/loopcardinality-in-multi-instance-subprocess-unchecked/m-p/153079#M107675</link>
      <description>I have a multi-instance, non-sequential, subpprocess that has an activiti:collection with (currently) two elements in it.However, when setting multiInstanceLoopCharacteristics, I set the loopCardinality value to 5 (doing what have gleaned to mean a maximum of 5 instances/threads can run concurrently</description>
      <pubDate>Thu, 12 Dec 2013 16:07:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/loopcardinality-in-multi-instance-subprocess-unchecked/m-p/153079#M107675</guid>
      <dc:creator>page80</dc:creator>
      <dc:date>2013-12-12T16:07:13Z</dc:date>
    </item>
    <item>
      <title>Re: loopCardinality in multi instance subprocess unchecked</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/loopcardinality-in-multi-instance-subprocess-unchecked/m-p/153080#M107676</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm not a BPMN expert but I thought loopCardinality is meant to "hardcode" the number of times to run the step and is not intended to have anything to do with iterating on collections.&amp;nbsp; Since activiti:collection is an Activiti extension, I would suspect that you are doing something that is unexpected.&amp;nbsp; I'm not sure there is a way to delegate Activiti to only use N threads of the thread pool.&amp;nbsp; There probably is a way to set the overall size of the thread pool, but I don't know what it is.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Dec 2013 19:37:24 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/loopcardinality-in-multi-instance-subprocess-unchecked/m-p/153080#M107676</guid>
      <dc:creator>brianok</dc:creator>
      <dc:date>2013-12-12T19:37:24Z</dc:date>
    </item>
    <item>
      <title>Re: loopCardinality in multi instance subprocess unchecked</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/loopcardinality-in-multi-instance-subprocess-unchecked/m-p/153081#M107677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The loopCardinality is NOT controlling how many threads are used, is controls EXACLTY how many times the Multi-instance activity will be executed (being either in a parallel execution or sequential). If you use this toghether with an activiti:collection (or loopDataInputRef), you should make sure the collection actually contains 5 (or more) elements.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you're NOT sure the collection will contain 5 elements, use the completion-condition instead to check the loopCoonter is less than 5 and remove the loopCardinality declaration…&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Dec 2013 07:57:48 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/loopcardinality-in-multi-instance-subprocess-unchecked/m-p/153081#M107677</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2013-12-13T07:57:48Z</dc:date>
    </item>
  </channel>
</rss>

