<?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 Database Exception in process containing two callActivities with multiInstanceLoopCharacteristics in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/database-exception-in-process-containing-two-callactivities-with/m-p/14432#M6341</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everybody,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a serious problem. The process contains two callActivities with a multiInstanceLoopCharacteristics, both working on the same variable as activiti:collection.&lt;/P&gt;&lt;P&gt;After executing the first call activity, the collection variable is cleared by some service task. Then the second call activity fails with a database exception:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN style="font-family: courier\ new, courier, monospace;"&gt;org.apache.ibatis.exceptions.PersistenceException: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier\ new, courier, monospace;"&gt;### Error updating database.&amp;nbsp; Cause: org.h2.jdbc.JdbcSQLException: Referentielle Integrität verletzt: "ACT_FK_VAR_EXE: PUBLIC.ACT_RU_VARIABLE FOREIGN KEY(EXECUTION_ID_) REFERENCES PUBLIC.ACT_RU_EXECUTION(ID_) ('8')"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier\ new, courier, monospace;"&gt;Referential integrity constraint violation: "ACT_FK_VAR_EXE: PUBLIC.ACT_RU_VARIABLE FOREIGN KEY(EXECUTION_ID_) REFERENCES PUBLIC.ACT_RU_EXECUTION(ID_) ('8')"; SQL statement:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier\ new, courier, monospace;"&gt;INSERT INTO ACT_RU_VARIABLE (ID_, REV_,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier\ new, courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TYPE_, NAME_, PROC_INST_ID_, EXECUTION_ID_, TASK_ID_, BYTEARRAY_ID_,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier\ new, courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DOUBLE_, LONG_ , TEXT_, TEXT2_) VALUES&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Everything works fine if the collection for the second call activiti is not empty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The worst thing about it is, that it worked with an older version (Activiti 5.11) and many of our cusomers have processes designed like that, which now will fail when we update to Activiti 5.22.&lt;/P&gt;&lt;P&gt;Please help me to find some kind of workaround for that problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Frauke&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 09 Mar 2018 15:46:51 GMT</pubDate>
    <dc:creator>frauke_heyl</dc:creator>
    <dc:date>2018-03-09T15:46:51Z</dc:date>
    <item>
      <title>Database Exception in process containing two callActivities with multiInstanceLoopCharacteristics</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/database-exception-in-process-containing-two-callactivities-with/m-p/14432#M6341</link>
      <description>Hi everybody,I have a serious problem. The process contains two callActivities with a multiInstanceLoopCharacteristics, both working on the same variable as activiti:collection.After executing the first call activity, the collection variable is cleared by some service task. Then the second call acti</description>
      <pubDate>Fri, 09 Mar 2018 15:46:51 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/database-exception-in-process-containing-two-callactivities-with/m-p/14432#M6341</guid>
      <dc:creator>frauke_heyl</dc:creator>
      <dc:date>2018-03-09T15:46:51Z</dc:date>
    </item>
    <item>
      <title>Re: Database Exception in process containing two callActivities with multiInstanceLoopCharacteristics</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/database-exception-in-process-containing-two-callactivities-with/m-p/14433#M6342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks to my colleague Roger we found a workaround for this problem by adding a check&lt;/P&gt;&lt;P&gt;&amp;nbsp;if (nrOfActiveInstances &amp;lt; 0) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return;&lt;BR /&gt;&amp;nbsp;}&lt;/P&gt;&lt;P&gt;to the leave method of &lt;STRONG&gt;ParallelMultiInstanceBehavior&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;if (loopCounter &amp;gt; nrOfInstances &amp;amp;&amp;amp; nrOfInstances &amp;gt; 0) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;to the leave method &lt;STRONG&gt;SequentialMultiInstanceBehavior&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe not the most elegant thing to do, but it solved our problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2018 09:40:43 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/database-exception-in-process-containing-two-callactivities-with/m-p/14433#M6342</guid>
      <dc:creator>frauke_heyl</dc:creator>
      <dc:date>2018-03-13T09:40:43Z</dc:date>
    </item>
  </channel>
</rss>

