JBoss Community

Re: Using a Timer

created by Gary tse in jBPM - View the full discussion

Sorry but I guess it all depends on the processes.

 

For a pool/ multiple StatefulKnowledgeSession implementation :

Say you have a long process that waits for external parties (eg human, webservice, etc).  When the event arrives, you need some way (eg DB) to look up and find out which process under which session should be informed of the event.

 

ie.  process id -> session id ->  interact with the correct StatefulKnowledgeSession object that contains your process object.

 

 

For a single StatefulKnowledgeSession :

You do not need that mapping, since all processes are under 1 single session.  However, I think there is a performance limitation in this implementation.  As far as I know, each session only have 1 thread to run all of the processes in a time-shared manner.  (Anyone can confirm ?)

Reply to this message by going to Community

Start a new discussion in jBPM at Community