Joram,
Sorry for the delay. I'm attaching four files; those are:
(1) The JUnit test (DemoPartialDeletion.java)
(2) The BPMN (DemoPartialDeletion.bpmn)
(3) The (very simple) engine configuration (activiti-basicinmemwithje.xml)
(4) The Java class used to throw the BpmnError instance (ThrowBpmnError.java)
(To get around the Forum's upload limitations, I've appended "*.txt" to all four files.)
This will demonstrate that deleting a process instance that meets the corner case criteria outlined earlier in this thread can't be fully deleted. Note that this does cause problems in Activiti Explorer as well, as the process instance is partially deleted, resulting in an inability to display the instance when selected on the "My Instances" page.
If you have additional questions, please don't hesitate to let me know.
-Ryan