Questions Tagged With casehttps://answers.axonivy.com/tags/case/?type=rss&user=nvcuong01questions tagged <span class="tag">case</span>enMon, 10 Jun 2019 03:25:09 -0400RuntimeException after destroying ivy casehttps://answers.axonivy.com/questions/3844/runtimeexception-after-destroying-ivy-case<p>Hi Ivyteam,</p> <p>We have a function to delete a list of cases base on dossierId:</p> <pre><code> SecurityManagerFactory.getSecurityManager().executeAsSystem2(() -&gt; { CaseQuery taskQuery = CaseQuery.create() .where().customVarCharField4().isEqual(dossierId); List&lt;ICase&gt; cases = Ivy.wf().getCaseQueryExecutor().getResults(taskQuery); cases.forEach(ICase::destroy); }); </code></pre> <p>After the case is destroyed successfully, the application is crashed because an exception</p> <p>IvyRuntimeException: Task '25' is no longer running. Maybe the task has been reseted or parked meanwhile. ELException: ch.ivyteam.util.IvyRuntimeException: Task '25' is no longer running. Maybe the task has been reseted or parked meanwhile. ContextAwareELException: javax.el.ELException: ch.ivyteam.util.IvyRuntimeException: Task '25' is no longer running. Maybe the task has been reseted or parked meanwhile. Error during rendering of html dialog 'ch.axonivy.desk.individual.customer1.DataGatheringPage'</p> <p>I am using Ivy 7.0.11. How can I overcome this exception?</p> <p>Thanks,</p> <p>Cuong Nguyen</p>nvcuong01Mon, 10 Jun 2019 03:25:09 -0400https://answers.axonivy.com/questions/3844/runtimeexception-after-destroying-ivy-casecase