JBoss Community

What happened to the StatefulKnowledgeSession after process finished

created by TC ONG in jBPM - View the full discussion

I have some codes like this in my main class:

 

StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();

ksession.getWorkItemManager().registerWorkItemHandler("Human Task", new WSHumanTaskHandler());

 

Map<String, Object> params = new HashMap<String, Object>();

params.put("username", "frank");

ksession.startProcess("humanTaskFlow", params);

 

Then I ran the process until finished.

If I look at the debug view in eclipse the thread is still running. Would it be an issue leave it running?

 

If I need to run multiple processes, should I create a session for each process? Would there be an overhead? Or I can use a session to run multiple processes?

 

Any reference about implementation in multiple user environment would be appreciated.

 

Thanks.

Reply to this message by going to Community

Start a new discussion in jBPM at Community