Greetings. I would like to be able to delete a process instance on the fly. When I call GraphSession.deleteProcessInstance(), I get the following error:
12:53:37,347 ERROR JbpmSession : org.hibernate.ObjectDeletedException: deleted object would be re-saved by cascade (remove deleted object from associations): [org.jbpm.graph.exe.Token#3939]
There is some code in the 3.1 webapp that (afaik) deletes a process instance. Please look at it, maybe it does what you need.