I would recommend implementing and testing the persistence without Drools first. Given that you're using Spring, then the Spring Data project can make it ultra-simple to create repository classes.

http://docs.spring.io/spring-data/data-commons/docs/1.6.1.RELEASE/reference/html/repositories.html

Once you have a repository bean (either generated by Spring Data or hand-cranked by yourself), then you should be able to insert that into your Drools session as a global. The RHS of any of your rules could then interact with the repo global to save entities.

Regards,

Steve


On 29 Aug 2013, at 16:33, Hong Ju <Hong.Ju@steward.org> wrote:

Hi,
 
I would like Drools to save my POJO objects as Hibernate Entities so that I can see my POJO objects as db tables in my database.
 
I tried to make this work by searching on the net, but there is very limited example on this topic, my code does not have any error, but it does not save any tables in my db. I attached my project in this email, if someone can help me on this, this will be so great and make me move forward.
 
Thank you so much in advance,
 
Hong Lily Ju
Software Engineer
hong.ju@steward.org
Steward Heath Care
 
<image001.jpg>
 
Office: 781-375-3034
Cell: 781-801-9313
 
<HibernateExample.zip>_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users