<?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 Re: how to delete the HistoricActivityInstance by the id of its? in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/how-to-delete-the-historicactivityinstance-by-the-id-of-its/m-p/92387#M63138</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm working with version 5.9 of the code of Activiti, the error showed when I tried to delete a historical record by ID.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;fix it by adding the lines &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;delete id="deleteHistoricActivityInstance"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; delete from ACT_HI_ACTINST where ID_ = #{id}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/delete&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; after&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;delete id="deleteHistoricActivityInstancesByProcessInstanceId"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; delete from ACT_HI_ACTINST where PROC_INST_ID_ = #{processInstanceId}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/delete&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;like I said.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;After modifying the file HistoricActivityInstance.xml, I generate the distribution again, start the environment and it works.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But, if you´re modifying the&amp;nbsp; activiti-engine.jar, I recommended turning off the environment, modify the jar and start the environment&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this help&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Aug 2012 16:22:01 GMT</pubDate>
    <dc:creator>jorge_villalobo</dc:creator>
    <dc:date>2012-08-21T16:22:01Z</dc:date>
    <item>
      <title>how to delete the HistoricActivityInstance by the id of its?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-delete-the-historicactivityinstance-by-the-id-of-its/m-p/92384#M63135</link>
      <description>Because of some specific business,I want to delete a record of HistoricActivityInstance by id, but I found that there is not the delete sql to delete the HistoricActivityInstance&amp;nbsp; by id in HistoricActivityInstance.xml,what should I do to solve this problem?I need some help,thanks!</description>
      <pubDate>Wed, 15 Aug 2012 15:10:01 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-delete-the-historicactivityinstance-by-the-id-of-its/m-p/92384#M63135</guid>
      <dc:creator>xiangyuely</dc:creator>
      <dc:date>2012-08-15T15:10:01Z</dc:date>
    </item>
    <item>
      <title>Re: how to delete the HistoricActivityInstance by the id of its?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-delete-the-historicactivityinstance-by-the-id-of-its/m-p/92385#M63136</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;Within the class "org.activiti.engine.impl.persistence.entity.HistoricActivityInstanceManager.java" the method "deleteHistoricActivityInstance (String historicActivityInstanceId)" is available but can not run because the judgment finds no declared in xml configuration files for mapping database.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I solved the problem as follows:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Was included in the file "src/main/resources/org/activiti/db/mapping/entity/HistoricActivityInstance.xml" the following lines to achieve the desired performance.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Delete id="deleteHistoricActivityInstance"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delete from ACT_HI_ACTINST where ID_ = # {id}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/ delete&amp;gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Aug 2012 23:52:51 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-delete-the-historicactivityinstance-by-the-id-of-its/m-p/92385#M63136</guid>
      <dc:creator>jorge_villalobo</dc:creator>
      <dc:date>2012-08-20T23:52:51Z</dc:date>
    </item>
    <item>
      <title>Re: how to delete the HistoricActivityInstance by the id of its?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-delete-the-historicactivityinstance-by-the-id-of-its/m-p/92386#M63137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;As you write,I add in the HistoricActivityInstance.xml as follows:&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;delete id="deleteHistoricActivityInstance"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delete from ACT_HI_ACTINST where ID_ = #{id}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;/delete&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;but it causes the following error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;org.apache.ibatis.exceptions.PersistenceException: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;### Error updating database.&amp;nbsp; Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for deleteHistoricActivityInstance&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;### Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for deleteHistoricActivityInstance&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:8)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:124)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.apache.ibatis.session.defaults.DefaultSqlSession.delete(DefaultSqlSession.java:135)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.activiti.engine.impl.db.DbSqlSession$DeleteById.execute(DbSqlSession.java:146)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.activiti.engine.impl.db.DbSqlSession.flushDeletes(DbSqlSession.java:461)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.activiti.engine.impl.db.DbSqlSession.flush(DbSqlSession.java:349)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.activiti.engine.impl.interceptor.CommandContext.flushSessions(CommandContext.java:149)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.activiti.engine.impl.interceptor.CommandContext.close(CommandContext.java:105)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:49)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:42)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:40)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at cn.sec.ac.impl.CustomServiceImpl.completeTaskRollBack(CustomServiceImpl.java:25)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at cn.sec.ac.ProcessEngineAskForLeave.main(ProcessEngineAskForLeave.java:53)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Caused by: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for deleteHistoricActivityInstance&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.apache.ibatis.session.Configuration$StrictMap.get(Configuration.java:595)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.apache.ibatis.session.Configuration.getMappedStatement(Configuration.java:437)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.apache.ibatis.session.Configuration.getMappedStatement(Configuration.java:430)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:121)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So,I don't understand,I have the delete sql in the HistoricActivityInstance.xml, why it can't be put in Mapped Statements when the process engine is initialized?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2012 01:59:34 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-delete-the-historicactivityinstance-by-the-id-of-its/m-p/92386#M63137</guid>
      <dc:creator>xiangyuely</dc:creator>
      <dc:date>2012-08-21T01:59:34Z</dc:date>
    </item>
    <item>
      <title>Re: how to delete the HistoricActivityInstance by the id of its?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-delete-the-historicactivityinstance-by-the-id-of-its/m-p/92387#M63138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm working with version 5.9 of the code of Activiti, the error showed when I tried to delete a historical record by ID.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;fix it by adding the lines &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;delete id="deleteHistoricActivityInstance"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; delete from ACT_HI_ACTINST where ID_ = #{id}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/delete&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; after&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;delete id="deleteHistoricActivityInstancesByProcessInstanceId"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; delete from ACT_HI_ACTINST where PROC_INST_ID_ = #{processInstanceId}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/delete&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;like I said.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;After modifying the file HistoricActivityInstance.xml, I generate the distribution again, start the environment and it works.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But, if you´re modifying the&amp;nbsp; activiti-engine.jar, I recommended turning off the environment, modify the jar and start the environment&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this help&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2012 16:22:01 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-delete-the-historicactivityinstance-by-the-id-of-its/m-p/92387#M63138</guid>
      <dc:creator>jorge_villalobo</dc:creator>
      <dc:date>2012-08-21T16:22:01Z</dc:date>
    </item>
  </channel>
</rss>

