<?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 After finishing multi instance user task, tasks sometimes remain in the database, causing integrity constraint violation in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/after-finishing-multi-instance-user-task-tasks-sometimes-remain/m-p/213034#M166164</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a problem when completing tasks. We have a process (see attachment) with some tasks to handle a request. There is also a multi instance user task where people can decide to ignore or accept the request. If it is rejected, an error end event is triggered, which does some cleanup, sends an email and ends the process. In theory…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The request is handled by a Java method, which sets some variables and then proceeds to complete the task. If the task is completed without providing a Map of variables, things work, apart from not having the variables stored. If the task is completed by also providing a set of changed variables, where the process proceeds to exit the subprocess and continue to the end event, an error occurs:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;13:31:00.281 [up-pool-37] [user@localdomain] DEBUG o.a.e.i.interceptor.CommandContext - Error while closing command context&lt;BR /&gt;org.apache.ibatis.exceptions.PersistenceException: &lt;BR /&gt;### Error updating database.&amp;nbsp; Cause: java.sql.SQLIntegrityConstraintViolationException: ORA-02292: integrity constraint (UP.ACT_FK_EXE_PARENT) violated - child record found&lt;BR /&gt;&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;### SQL: delete from ACT_RU_EXECUTION where ID_ = ? and REV_ = ?&lt;BR /&gt;### Cause: java.sql.SQLIntegrityConstraintViolationException: ORA-02292: integrity constraint (UP.ACT_FK_EXE_PARENT) violated - child record found&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;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;I have also added some output to various points in the process, namely before completing the multi instance task (usertaskSkrbnikPregledSredstev), while evaluating the flow condition (flow93) and in the service task (servicetaskPreklicRezervacijArhiv). In all cases the output is the same:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;15:21:02.333 [up-pool-45] [] INFO&amp;nbsp; s.u.fri.up.service.nmv.NmvService - Instance name: null, description: null, parent id: null&lt;BR /&gt;15:21:02.333 [up-pool-45] [] INFO&amp;nbsp; s.u.fri.up.service.nmv.NmvService - Execution name: null, description: null, suspended: false, activity id: servicetaskPreklicRezervacijArhiv, parent id: null&lt;BR /&gt;15:21:02.333 [up-pool-45] [] INFO&amp;nbsp; s.u.fri.up.service.nmv.NmvService - Execution name: null, description: null, suspended: false, activity id: podprocesNmv, parent id: 12511&lt;BR /&gt;15:21:02.333 [up-pool-45] [] INFO&amp;nbsp; s.u.fri.up.service.nmv.NmvService - Execution name: null, description: null, suspended: false, activity id: null, parent id: 12584&lt;BR /&gt;15:21:02.333 [up-pool-45] [] INFO&amp;nbsp; s.u.fri.up.service.nmv.NmvService - Execution name: null, description: null, suspended: false, activity id: errorendeventZavrnitevSkrbnikovSredstev, parent id: 12584&lt;BR /&gt;15:21:02.333 [up-pool-45] [] INFO&amp;nbsp; s.u.fri.up.service.nmv.NmvService - Task name: Skrbnik sredstev: pregled sredstev, description: null, suspended: false, delegation state: null, assignee: mcajvar, form key: skrbnikSredstevPregledSredstev, id: 12605, parent task id: null&lt;BR /&gt;15:21:02.333 [up-pool-45] [] INFO&amp;nbsp; s.u.fri.up.service.nmv.NmvService - Process data: instance id = 12511; instance count = 1, executions = 4, tasks = 1&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;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Which is weird, as I would expect no more active tasks when entering the exclusive gateway. In the attached process, after leaving the multi instance task, a task remains in the database and that is why I believe it fails upon trying to end the process going the error event way. If the process continues using the default flow, the subprocess never finishes, because there still appear to be active tasks (from the multi instance user task).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As stated above, I tried completing the task in 2 ways:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-java line-numbers"&gt;&lt;CODE&gt;&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; taskService.complete(taskId, variables); // this fails&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; taskService.complete(taskId); // this works, but I lose my variables&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;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If it helps, I have also attached a part of the log file, from "CompleteTaskCmd" until the error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have tried using a Terminate End Event with terminateAll, but in that case the process was left without and end time and was not seen as finished. This has already been fixed if I noticed correctly, but not yet released (when is 5.20.0 approximately planned for release?).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have also tried to reduce the process to as few elements as possible and still reliably bump into the error. However, when I tried to prepare a unit test, I was unable to reproduce the problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using Oracle XE and Activiti 5.19.0.2. The diagram has been constructed using Activiti Designer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would be grateful for any help and if there is any further information I can provide I would be happy to do so. If I am unable to prepare a unit test, I would have no problems with arranging a TeamViewer session or something like that if need be.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Apr 2016 14:35:01 GMT</pubDate>
    <dc:creator>mcajvar</dc:creator>
    <dc:date>2016-04-19T14:35:01Z</dc:date>
    <item>
      <title>After finishing multi instance user task, tasks sometimes remain in the database, causing integrity constraint violation</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/after-finishing-multi-instance-user-task-tasks-sometimes-remain/m-p/213034#M166164</link>
      <description>Hello,I have a problem when completing tasks. We have a process (see attachment) with some tasks to handle a request. There is also a multi instance user task where people can decide to ignore or accept the request. If it is rejected, an error end event is triggered, which does some cleanup, sends a</description>
      <pubDate>Tue, 19 Apr 2016 14:35:01 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/after-finishing-multi-instance-user-task-tasks-sometimes-remain/m-p/213034#M166164</guid>
      <dc:creator>mcajvar</dc:creator>
      <dc:date>2016-04-19T14:35:01Z</dc:date>
    </item>
    <item>
      <title>Re: After finishing multi instance user task, tasks sometimes remain in the database, causing integrity constraint violation</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/after-finishing-multi-instance-user-task-tasks-sometimes-remain/m-p/213035#M166165</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;Did you try to use a multi instance sub process with an error boundary event instead of using the multi instance user task? I think that better aligns with your requirements. Activiti 5.20.0 is released so you could try that Engine version as well. A terminate end event would be needed if you want to stop all multi instance executions.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Apr 2016 07:18:22 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/after-finishing-multi-instance-user-task-tasks-sometimes-remain/m-p/213035#M166165</guid>
      <dc:creator>trademak</dc:creator>
      <dc:date>2016-04-20T07:18:22Z</dc:date>
    </item>
    <item>
      <title>Re: After finishing multi instance user task, tasks sometimes remain in the database, causing integrity constraint violation</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/after-finishing-multi-instance-user-task-tasks-sometimes-remain/m-p/213036#M166166</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;no, I didn't use a multi instance subprocess. The real process is actually a bit more complex, with lots of other user and service tasks. This is just a stripped down version which I was hoping to use for a unit test. But it is still valid as it still fails.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The multi instance user task is actually just a simple form where some data is displayed to one or more people and they either confirm or reject that info. I set a variable depending on that input and that's it. I use some other multi instance user tasks in the process, but only this one causes me problems.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for info on 5.20.0 being released, I will have a look. Although I don't really believe the appropriate way to solve the issue is to force kill (stale) tasks at the end.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Apr 2016 09:35:48 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/after-finishing-multi-instance-user-task-tasks-sometimes-remain/m-p/213036#M166166</guid>
      <dc:creator>mcajvar</dc:creator>
      <dc:date>2016-04-20T09:35:48Z</dc:date>
    </item>
    <item>
      <title>Re: After finishing multi instance user task, tasks sometimes remain in the database, causing integrity constraint violation</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/after-finishing-multi-instance-user-task-tasks-sometimes-remain/m-p/213037#M166167</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Having tried Activiti 5.20.0 and swapping End Events with Terminate End Events with activiti:terminateAll="true" thrown in for good measure, the error occurs anyway.&lt;/SPAN&gt;&lt;BR /&gt;&lt;CODE&gt;Caused by: org.apache.ibatis.exceptions.PersistenceException: &lt;BR /&gt;### Error updating database.&amp;nbsp; Cause: java.sql.SQLIntegrityConstraintViolationException: ORA-02292: integrity constraint (UP.ACT_FK_EXE_PARENT) violated - child record found&lt;BR /&gt;&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;### SQL: delete from ACT_RU_EXECUTION where ID_ = ? and REV_ = ?&lt;BR /&gt;### Cause: java.sql.SQLIntegrityConstraintViolationException: ORA-02292: integrity constraint (UP.ACT_FK_EXE_PARENT) violated - child record found&lt;BR /&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;If I throw out the multi instance loop characteristic and only have a plain user task, everything is OK, with both Terminate End Events or normal End Events…&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2016 10:15:02 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/after-finishing-multi-instance-user-task-tasks-sometimes-remain/m-p/213037#M166167</guid>
      <dc:creator>mcajvar</dc:creator>
      <dc:date>2016-04-21T10:15:02Z</dc:date>
    </item>
    <item>
      <title>Re: After finishing multi instance user task, tasks sometimes remain in the database, causing integrity constraint violation</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/after-finishing-multi-instance-user-task-tasks-sometimes-remain/m-p/213038#M166168</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;First off all: I'm agreeing with Tijs here that the paradigm you're trying to express here (mi task with error throw) is better modeled as an embedded subprocess.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Secondly, can you post a unit test on how to reproduce this? It's already quite a process (with custom service task) and setting this up takes some time on our end.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Apr 2016 13:10:31 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/after-finishing-multi-instance-user-task-tasks-sometimes-remain/m-p/213038#M166168</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2016-04-26T13:10:31Z</dc:date>
    </item>
    <item>
      <title>Re: After finishing multi instance user task, tasks sometimes remain in the database, causing integrity constraint violation</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/after-finishing-multi-instance-user-task-tasks-sometimes-remain/m-p/213039#M166169</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;can u give me some idea to end the multiInstance parallel task in a subProcess.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; consider the scenorio tat i have Two tasks in multiInstance parallel .&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;i am completing one task and in service Task i am getting all the active tasks so, i will get the remaining task but when i tried to complete it i am getting ### Error updating database.&amp;nbsp; Cause: java.sql.SQLIntegrityConstraintViolationException: ORA-02292: integrity constraint (UP.ACT_FK_EXE_PARENT) violated - child record found&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;### The error may involve org.activiti.engine.impl.persistence.entity.ExecutionEntity.deleteExecution-Inline&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;### The error occurred while setting parameters&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;### SQL: delete from ACT_RU_EXECUTION where ID_ = ? and REV_ = ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;### Cause: java.sql.SQLIntegrityConstraintViolationException: ORA-02292: integrity constraint (UP.ACT_FK_EXE_PARENT) violated - child record found.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;case 2 :&amp;nbsp; after the userr task i am setting variable action="SENDBACK " and moving towards the service task and am jus ending with the terminateEndEvent . but the entire SubProcess event and tasks nt at terminating instead am getting completed wit only one task and nt all tasks . so it is still in subProcess not coming out of it untill unless i complete twice.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2016 16:12:11 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/after-finishing-multi-instance-user-task-tasks-sometimes-remain/m-p/213039#M166169</guid>
      <dc:creator>venkatesh</dc:creator>
      <dc:date>2016-05-23T16:12:11Z</dc:date>
    </item>
    <item>
      <title>Re: After finishing multi instance user task, tasks sometimes remain in the database, causing integrity constraint violation</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/after-finishing-multi-instance-user-task-tasks-sometimes-remain/m-p/213040#M166170</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It's a pretty big process xml file … can you describe the steps how i can reproduce the error you're describing in a unit test?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 May 2016 09:57:49 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/after-finishing-multi-instance-user-task-tasks-sometimes-remain/m-p/213040#M166170</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2016-05-31T09:57:49Z</dc:date>
    </item>
  </channel>
</rss>

