[jboss-user] [jBPM] - Re: What is the right way to work with persistent sessions and processes?

Mauricio Salatino do-not-reply at jboss.com
Thu Sep 15 09:43:14 EDT 2011

Mauricio Salatino [http://community.jboss.org/people/salaboy21] created the discussion

"Re: What is the right way to work with persistent sessions and processes?"

To view the discussion, visit: http://community.jboss.org/message/626706#626706

Hi Miljenko,
Drools and jBPM5 persistence mechanisism let you choose for your particular situation the way of distributing and creating your sessions for your processes. There is not right way to do it. You can create as you mention a session per group of related processes and rules and then start process instances there. You should try to keep your rules well scoped to your processes and for example add your process instance as a Fact so you can filter facts based on the process instance that you are intested into. 

About the custom persistence strategies, yes of course! You can use a set of custom marshallers that will persist your Domain objects in a different database or storage using your own entity manager. ->  https://github.com/droolsjbpm/jbpm/blob/master/jbpm-persistence-jpa/src/test/java/org/jbpm/persistence/session/VariablePersistenceStrategyTest.java https://github.com/droolsjbpm/jbpm/blob/master/jbpm-persistence-jpa/src/test/java/org/jbpm/persistence/session/VariablePersistenceStrategyTest.java
Look at the method createEnvironment() for more references  :) 
Hope it helps!

Reply to this message by going to Community

Start a new discussion in jBPM at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110915/caaca057/attachment-0001.html 

More information about the jboss-user mailing list