[rules-users] Persist JPA Entity fact in session

Mauricio Salatino salaboy at gmail.com
Thu May 24 12:34:42 EDT 2012


You can use the Variable Persistency Strategies, that will store your facts
in the database for you.
You need to configure in the environment the strategies for example:
https://github.com/droolsjbpm/jbpm/blob/master/jbpm-human-task/jbpm-human-task-core/src/test/java/org/jbpm/task/service/persistence/variable/VariablePersistenceStrategiesSyncHTTest.java

Notice that you will need to provide your domain specific entityManager to
the JPAPlaceholderResolverStrategy

Cheers

On Thu, May 24, 2012 at 1:30 PM, Alberto R. Galdo <argaldo at gmail.com> wrote:

> Hi,
>
>    We are in a fireUntilHalt during a persistent StatefulKnowledgeSession
> using JTA & JPA with Hibernate ... Our session consists in a series of
> facts ( well, we are not different of anyone else for that matter ... xD )
> but some of our facts are also JPA @Entity . What we want is to persist
> those entities on their own database tables as well as the SessionInfo each
> time Drools considers the knowledge session needs to be persisted.
>
>    We are aware that Drools uses
> org.drools.persistence.jpa.persist(SessionInfo) .... What would be the best
> approach to get certain facts that are JPA Entities persisted along with
> the Session taking advantage of the Drool's SessionInfo persistence loop?
>
> Best regards,
>
>
> Alberto R. Galdo
> argaldo at gmail.com
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>


-- 
 - MyJourney @ http://salaboy.wordpress.com
 - Co-Founder @ http://www.jugargentina.org
 - Co-Founder @ http://www.jbug.com.ar

 - Salatino "Salaboy" Mauricio -
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20120524/daa38c04/attachment.html 


More information about the rules-users mailing list