JBoss Community

Re: Resume a process. Same ksession ?

created by Maciej Swiderski in jBPM - View the full discussion

lakshmi sampath wrote:

 

     Do i need to use the same ksession which initially started the process when I call ksession.getWorkItemManager().completeWorkItem(..) to resume

     or can I create a new ksession and resume a previously suspended process. If I can use new ksession what happens to the old ksesion which is persisted in db.

It depends, if your process is not bound to session state (timers, business rules, etc) you can use another session to resume it. In general, I would recommend to use the same session if that does not introduce too many problems as when session is stored in db it remains there. So if you keep creating new sessions you will run into situation where your session table will become quite big and most likely you will need to have some cleanup routines to maintain it.

 

HTH

Reply to this message by going to Community

Start a new discussion in jBPM at Community