<?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 strange multi instance activity behaviour in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/strange-multi-instance-activity-behaviour/m-p/6887#M3332</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm noticing some strange behaviour with multi instance process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My original need was to create a multi instance call activity, as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&amp;lt;callActivity id="callactivity1" name="Call activity" calledElement="testCalledProcess"&amp;gt;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;multiInstanceLoopCharacteristics isSequential="false" activiti:collection="${myList.getList()}" activiti:elementVariable="myVar"&amp;gt;&amp;lt;/multiInstanceLoopCharacteristics&amp;gt;&lt;BR /&gt; &amp;lt;/callActivity&amp;gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I try to lookup the process variable myVar in the sub-process I can't find it.&lt;/P&gt;&lt;P&gt;Also, I saw that myList.getList() is being run multiple times. The list has only two entries in it, but from a println in getList() it seems to be run about six times! The correct number of sub-processes (2) is created.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I therefore tried a test with a script task&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&amp;lt;scriptTask id="scripttask1" name="Script Task" scriptFormat="javascript" activiti:autoStoreVariables="false"&amp;gt;&lt;BR /&gt; &amp;lt;multiInstanceLoopCharacteristics isSequential="false" activiti:collection="${myList.getList()}" activiti:elementVariable="myLetter"&amp;gt;&amp;lt;/multiInstanceLoopCharacteristics&amp;gt;&lt;BR /&gt; &amp;lt;script&amp;gt;java.lang.System.out.println("Letter "+myLetter)&amp;lt;/script&amp;gt;&lt;BR /&gt; &amp;lt;/scriptTask&amp;gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I found the same behaviour with multiple executions of getList(). i.e. six times. However the variable myLetter is passed and correctly printed correctly. Only two instances of the task are created.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Sep 2018 14:03:14 GMT</pubDate>
    <dc:creator>navitect</dc:creator>
    <dc:date>2018-09-26T14:03:14Z</dc:date>
    <item>
      <title>strange multi instance activity behaviour</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/strange-multi-instance-activity-behaviour/m-p/6887#M3332</link>
      <description>I'm noticing some strange behaviour with multi instance process.My original need was to create a multi instance call activity, as follows:&amp;lt;callActivity id="callactivity1" name="Call activity" calledElement="testCalledProcess"&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;multiInstanceLoopCharacteristics isSequential="false" activi</description>
      <pubDate>Wed, 26 Sep 2018 14:03:14 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/strange-multi-instance-activity-behaviour/m-p/6887#M3332</guid>
      <dc:creator>navitect</dc:creator>
      <dc:date>2018-09-26T14:03:14Z</dc:date>
    </item>
    <item>
      <title>Re: strange multi instance activity behaviour</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/strange-multi-instance-activity-behaviour/m-p/6888#M3333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've fixed the problem with not finding the variable in called activity. I'd hadn't mapped the elementVariable in the input parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's still strange that the service to create the collection seems to run multiple times.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Sep 2018 11:33:57 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/strange-multi-instance-activity-behaviour/m-p/6888#M3333</guid>
      <dc:creator>navitect</dc:creator>
      <dc:date>2018-09-30T11:33:57Z</dc:date>
    </item>
    <item>
      <title>Re: strange multi instance activity behaviour</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/strange-multi-instance-activity-behaviour/m-p/6889#M3334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The running multiple times may be transaction roll back and retries. I've just been working on a similar problem where I haven't set process variables correctly. I just see my service task run and fail 3 times 10 seconds apart. I assume a rollback is occurring then the transaction is retried. No error is shown presumably as the exception isn't caught.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your case you have 2 sub processes, so it could be the same behaviour, if each fails and retries 3 times that gives 6.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Dec 2018 07:22:44 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/strange-multi-instance-activity-behaviour/m-p/6889#M3334</guid>
      <dc:creator>pault</dc:creator>
      <dc:date>2018-12-06T07:22:44Z</dc:date>
    </item>
  </channel>
</rss>

