I want to be able to delete processes that have finished or are in an
unrecoverable state. I thought this would just be easy just by using:
JbpmContext ctx = JbpmConfiguration.getInstance().createJbpmContext();
| try {
| ProcessInstance inst = ctx.loadProcessInstance(id);
| ctx.getGraphSession().deleteProcessInstance(inst);
| }
| finally {
| ctx.close();
| }
But this doesn't seem to work. When I do this it results in this:
org.hibernate.ObjectNotFoundException: No row with the given identifier exists:
[org.jbpm.graph.exe.ProcessInstance#2708]
| at
org.hibernate.ObjectNotFoundException.throwIfNull(ObjectNotFoundException.java:27)
| at
org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:65)
| at
org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:98)
| at
org.hibernate.impl.SessionImpl.bestGuessEntityName(SessionImpl.java:1701)
| at
org.hibernate.impl.AbstractQueryImpl.setEntity(AbstractQueryImpl.java:564)
| at org.jbpm.db.GraphSession.deleteProcessInstance(GraphSession.java:329)
Any idea what I might be doing wrong? It's strange that I can load the
instance, but I can't delete it.
Hope someone can help me with this.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3926393#3926393
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3926393
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user