2 Replies Latest reply on Apr 8, 2009 12:56 PM by ailing qin

    Problem deleting process instances

    David Lloyd Master

      There seems to be some problem deleting process instances. I am able to delete definitions (which then subsequently delete all the instances), but deleting a process instance gives me:

      2007-06-15 10:00:18,428 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
      2007-06-15 10:00:18,547 DEBUG [org.hibernate.util.JDBCExceptionReporter] could not insert: [org.jbpm.graph.exe.ProcessInstance] [insert into JBPM_PROCESSINSTANCE (ID_, VERSION_, KEY_, START_, END_, ISSUSPENDED_, PROCESSDEFINITION_, ROOTTOKEN_, SUPERPROCESSTOKEN_) values (null, ?, ?, ?, ?, ?, ?, ?, ?)]
      java.sql.SQLException: Integrity constraint violation - no parent FK_PROCIN_ROOTTKN table: JBPM_TOKEN in statement [insert into JBPM_PROCESSINSTANCE (ID_, VERSION_, KEY_, START_, END_, ISSUSPENDED_, PROCESSDEFINITION_, ROOTTOKEN_, SUPERPROCESSTOKEN_) values (null, ?, ?, ?, ?, ?, ?, ?, ?)]
      


      It is trying to insert the process instance again during session flush for some reason - but only when I just delete process instances (not definitions). Anyone else run across this? I think it's a bug, I just can't figure out where it is...