[jboss-user] [jBPM] - Re: jBPM 5: how save a ProcessInstance ?

Andy R. do-not-reply at jboss.com
Mon May 30 03:29:52 EDT 2011


Andy R. [http://community.jboss.org/people/jbpm5learner] created the discussion

"Re: jBPM 5: how save a ProcessInstance ?"

To view the discussion, visit: http://community.jboss.org/message/607685#607685

--------------------------------------------------------------
The fact that the processInstance is automatically saved may be convenient. But doing some investigation on the jbpm5-source I found some interesting code examples that may offer explicit saving of a ProcessInstance:

EntityManagerFactory emf = Persistence.+createEntityManagerFactory+( "org.jbpm.persistence.jpa");JpaProcessPersistenceContextManager procPersistMgr = *new*  JpaProcessPersistenceContextManager(env);ProcessInstanceInfo procInfo = *new* 
ProcessInstanceInfo(procInstance);
ProcessPersistenceContext persistContext = procPersistMgr.getProcessPersistenceContext();persistContext.persist(procInfo);

The "ProcessPersistenceContext" allows to persist a so-called ProcessInstanceInfo-object. This object contains a ProcessInstance-object. Are you consequently sure that there is no way to persist  ProcessInstance on-demand ?







#
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/607685#607685]

Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110530/3616eb31/attachment.html 


More information about the jboss-user mailing list