-
1. Re: What is the right way to work with persistent sessions and processes?
salaboy21 Sep 15, 2011 9:42 AM (in response to mnorsic)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
Look at the method createEnvironment() for more references
Hope it helps!
Cheers
-
2. Re: What is the right way to work with persistent sessions and processes?
mnorsic Sep 15, 2011 9:56 AM (in response to salaboy21)Hi Maurizio,
thanks for the tip! I did not look into the jBPM test cases, it would be nice if these persistence test cases be added into a jbpm-examples (or a subset of it, just to show some simple scenarios that work with database).
Thanks,
Miljenko