[jbpm-dev] [Design of JBoss jBPM] - Re: AbstractDbTestCase -> deleteProcessDefinition -> hiberna
camunda
do-not-reply at jboss.com
Wed Dec 10 03:47:36 EST 2008
Investigated further:
1) With jbpm.loadToken instead of jbpm.loadTokenForUpdate it works
2) Using jbpmContext.newProcessInstanceForUpdate("Test") also causes the exception.
So my guess is, that the registered autoSave somehow messes in combination with the deletaion.
So my next try was to start a new transaction before deleting, and I get a green bar again:
| ProcessDefinition processDefinition = ProcessDefinition.parseXmlString(xml);
| jbpmContext.deployProcessDefinition(processDefinition);
|
| ProcessInstance processInstance = jbpmContext.newProcessInstanceForUpdate("Test");
| // ProcessInstance processInstance = processDefinition.createProcessInstance();
| Token token = jbpmContext.loadTokenForUpdate(processInstance.getRootToken().getId());
|
| newTransaction();
|
| jbpmContext.getGraphSession().deleteProcessDefinition(processDefinition.getId());
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4195493#4195493
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4195493
More information about the jbpm-dev
mailing list