[jboss-user] [JBoss jBPM] - Re: jbpmContext.close() save process instance automaticly

dleerob do-not-reply at jboss.com
Thu May 15 05:26:45 EDT 2008


If you don't want changes to a process or task instance saved or persisted to the db when you close the JbpmContext, you could try calling jbpmContext.setRollbackOnly();

When the JbpmContext is then closed, it should roll back any changes made. That's how I do it anyway, and it works.

As for the save method, I think it is used when creating a new process instance. If I remember correctly, in the jbpm-console source code, when it creates a new process instance, there is a piece of code that goes as follows:
// Nothing else saves the process, so we must
  | jbpmContext.save(processInstance);
Not sure why they said 'Nothing else saves the process, so we must'. Perhaps because it's a new process instance?

Hope this helps.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4150979#4150979

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4150979



More information about the jboss-user mailing list