JBoss Community

Re: persisted stateful sessions and knowledge base changes

created by Maciej Swiderski in jBPM - View the full discussion

Jordi, Damian, finally I have found some time to test it, I did not want to put this note without confirming it.

 

I have pretty same issue what you describe. I built a JBoss AS service (sar) that encapsulates jBPM5 as process engine which is bound to JNDI so application can simple look it up or use dependency injection.

So process engine is configured to use Guvnor as knowledge base source and uses knowledge agent to load it and maintain its changes.

Next there is simple web application with servlet that looks up the process engine from JNDI and gets a stateful session from it. Process engine is designed to maintain the sessions in regards to internal ids and application is using its own names for the sessions, for instance it could be user id that is logged on.

When ever operation is invoked on the session, like start process session is disposed, meaning persisted to db. Next call will get the session from db and invoke other operations. What I tested is that I modify processes in Guvnor, next build package and snapshot and perform the operation from the web application. So the session is loaded again and the changes are automatically applied to it so it operates on the latest version of knowledge base.

 

Let me know if that is what you're trying to achieve?

 

Cheers

Maciej

Reply to this message by going to Community

Start a new discussion in jBPM at Community