Hi,
I am trying to delete a processIntance using GrapSession object. What I have
looks like
GraphSession session = context.getGraphSession();
ProcessInstance processInstance = null;
if (session != null) {
processInstance =
session.getProcessInstance(processInstanceId);
if (processInstance != null) {
session.deleteProcessInstance(processInstance);
}
}
When I do this i get a hibernate exception.
org.springframework.dao.DataIntegrityViolationException: Hibernate operation:
Could not execute JDBC batch update; SQL [delete from JBPM_MODULEINSTANCE where
ID_=?]; Cannot delete or update a parent row: a foreign key constraint fails
(`forms/jbpm_swimlaneinstance`, CONSTRAINT `FK_SWIMLANEINST_TM` FOREIGN KEY
(`TASKMGMTINSTANCE_`) REFERENCES `jbpm_moduleinstance` (`ID_`)); nested
exception is java.sql.BatchUpdateException: Cannot delete or update a parent
row: a foreign key constraint fails (`forms/jbpm_swimlaneinstance`, CONSTRAINT
`FK_SWIMLANEINST_TM` FOREIGN KEY (`TASKMGMTINSTANCE_`) REFERENCES
`jbpm_moduleinstance` (`ID_`))
java.sql.BatchUpdateException: Cannot delete or update a parent row: a foreign
key constraint fails (`forms/jbpm_swimlaneinstance`, CONSTRAINT
`FK_SWIMLANEINST_TM` FOREIGN KEY (`TASKMGMTINSTANCE_`) REFERENCES
`jbpm_moduleinstance` (`ID_`))
am I missing something?
thanks
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4072248#4072248
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4072248
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user