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]

_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to