<font color='black' size='2' face='arial'>
<div> <font size="2"><font face="Arial, Helvetica, sans-serif">Hi Mauricio, team<br>
<br>
I mapped my javabean in the persistence.xml<br>
<br>
&lt;class&gt;org.acme.drools.Account&lt;/class&gt;<br>
<br>
And after run my main test I can see the "account table" in DB, but it's still empty, probably I am missing something in the project configuration.<br>
Let me check and I'll reply back<br>
<br>
Tks!<br>
</font></font></div>

<div> <br>
</div>

<div style="clear: both;"></div>

<div> <br>
</div>

<div> <br>
</div>

<div style="font-family: arial,helvetica; font-size: 10pt; color: black;">-----Original Message-----<br>
From: andre.fonseca@mail.com<br>
To: rules-users@lists.jboss.org<br>
Sent: Tue, May 4, 2010 12:28 pm<br>
Subject: Re: [rules-users] Drools + ETL Process<br>
<br>






<div id="AOLMsgPart_3_208b317e-015a-48de-9cb7-98a62023d912">

<font color="black" face="arial" size="2">

<div> <font size="2"><font face="Arial, Helvetica, sans-serif">Hi Mauricio,<br>

<br>

It's below, thanks!<br>

<br>

&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;<br>

&lt;persistence<br>

&nbsp;&nbsp;&nbsp; version="1.0"<br>

&nbsp;&nbsp;&nbsp; xsi:schemaLocation=<br>

&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; "<a href="http://java.sun.com/xml/ns/persistence" target="_blank">http://java.sun.com/xml/ns/persistence</a><br>

&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<a href="http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" target="_blank">http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd</a><br>

&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<a href="http://java.sun.com/xml/ns/persistence/orm" target="_blank">http://java.sun.com/xml/ns/persistence/orm</a> <br>

&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<a href="http://java.sun.com/xml/ns/persistence/orm_1_0.xsd" target="_blank">http://java.sun.com/xml/ns/persistence/orm_1_0.xsd</a>"<br>

&nbsp;&nbsp;&nbsp; xmlns:orm="<a href="http://java.sun.com/xml/ns/persistence/orm" target="_blank">http://java.sun.com/xml/ns/persistence/orm</a>"<br>

&nbsp;&nbsp;&nbsp; xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a>"<br>

&nbsp;&nbsp;&nbsp; xmlns="<a href="http://java.sun.com/xml/ns/persistence" target="_blank">http://java.sun.com/xml/ns/persistence</a>"&gt;<br>

<br>

&nbsp;&nbsp;&nbsp; &lt;persistence-unit name="org.drools.persistence.jpa" transaction-type="RESOURCE_LOCAL"&gt;<br>

&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;provider&gt;org.hibernate.ejb.HibernatePersistence&lt;/provider&gt;<br>

&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;class&gt;org.drools.persistence.session.SessionInfo&lt;/class&gt;<br>

&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;class&gt;org.drools.persistence.processinstance.ProcessInstanceInfo&lt;/class&gt;<br>

&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;class&gt;org.drools.persistence.processinstance.ProcessInstanceEventInfo&lt;/class&gt;<br>

&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;class&gt;org.drools.persistence.processinstance.WorkItemInfo&lt;/class&gt;<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;properties&gt;<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect" /&gt;<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;property name="hibernate.connection.url" value="jdbc:mysql://localhost:3306/drools" /&gt;<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver" /&gt;<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;property name="hibernate.connection.password" value="mysql" /&gt;<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;property name="hibernate.connection.username" value="root" /&gt;<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;property name="hibernate.hbm2ddl.auto" value="create-drop" /&gt;<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.BTMTransactionManagerLookup" /&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/properties&gt;<br>

&nbsp;&nbsp;&nbsp; &lt;/persistence-unit&gt;<br>

&nbsp;&nbsp;&nbsp; <br>

&lt;/persistence&gt;<br>

</font></font></div>



<div> <br>

</div>



<div style="clear: both;"></div>



<div> <br>

</div>



<div> <br>

</div>



<div style="font-family: arial,helvetica; font-size: 10pt; color: black;">-----Original Message-----<br>

From: Mauricio Salatino &lt;<a href="mailto:salaboy@gmail.com">salaboy@gmail.com</a>&gt;<br>

To: Rules Users List &lt;<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>&gt;<br>

Sent: Mon, May 3, 2010 11:24 pm<br>

Subject: Re: [rules-users] Drools + ETL Process<br>

<br>








<div id="AOLMsgPart_3_6502ed4a-e0f9-43f5-bb7e-22e5f2471bf5">

Hi man,<br>

can you show us your persistence.xml file where it's defined <span class="st0">org.drools.persistence.jpa Persistence Unit</span>?<br>

<br>

<br>

<br>



<div class="gmail_quote">2010/5/3  <span dir="ltr">&lt;<a href="mailto:andre.fonseca@mail.com">andre.fonseca@mail.com</a>&gt;</span><br>


<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><font color="black" face="arial" size="2">


<div> <br>


</div>





<div> <font size="2"><font face="Arial, Helvetica, sans-serif">Hi Mauricio, thanks for your reply</font></font><br>


</div>





<div style="clear: both;"></div>





<div> <font size="2"><font face="Arial, Helvetica, sans-serif"><br>


I have commented the transaction , please check <a target="_blank" href="http://pastebin.com/NxQyft2t">http://pastebin.com/NxQyft2t</a><br>


I put the hibernate log there too.<br>


<br>


There is no error, after the first time executed I have the tables created in mysql<br>


<br>


| processinstanceeventinfo&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<br>


| processinstanceinfo&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<br>


| processinstanceinfo_eventtypes |<br>


| sessioninfo&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<br>


| workiteminfo&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<br>


<br>


but they are empty, this is because I am not creating a process just rules and facts?<br>


<br>


the drools expert knowlege database persist rules and facts or this is maintained only in the working memory?<br>


<br>


TIA<br>


<br>


<br>


<br>


</font></font></div>





<div> <br>


</div>





<div style="font-family: arial,helvetica; font-size: 10pt; color: black;">

<div class="im">-----Original Message-----<br>


From: Mauricio Salatino &lt;<a href="mailto:salaboy@gmail.com">salaboy@gmail.com</a>&gt;<br>


To: Rules Users List &lt;<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>&gt;<br>

</div>



<div>

<div></div>



<div class="h5">
Sent: Sun, May 2, 2010 11:16 pm<br>


Subject: Re: [rules-users] Drools + ETL Process<br>


<br>










<div>

Ok looks nice.. but you shouldn't begin and commit the transaction. If you remove that.. do you have some error? <br>


<br>





<div class="gmail_quote">2010/5/2  <span dir="ltr">&lt;<a href="mailto:andre.fonseca@mail.com">andre.fonseca@mail.com</a>&gt;</span><br>



<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><font color="black" face="arial" size="2">



<div> <font size="2"><font face="Arial, Helvetica, sans-serif">Hi Mauricio,<br>



<br>



Sorry if I was not clear. I have already installed Guvnor, and I have also changed repository.xml to persist data in MySQL.<br>



But I dont want to use Guvnor, I would like to author the rules and facts in Eclipse using Drools plugin ( I have also installed it ) and persist data in MySQL.<br>



That's because I'm trying to use JPAKnowlegeService<br>



Could you please take a look in the code of pastebin?<br>



<br>



TIA<br>



</font></font></div>







<div style="clear: both;"></div>







<div> <br>



</div>







<div> <br>



</div>







<div style="font-family: arial,helvetica; font-size: 10pt; color: black;">


<div>-----Original Message-----<br>



From: Mauricio Salatino &lt;<a href="mailto:salaboy@gmail.com">salaboy@gmail.com</a>&gt;<br>



To: Rules Users List &lt;<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>&gt;<br>


</div>





<div>


<div></div>





<div>
Sent: Fri, Apr 30, 2010 6:54 pm<br>



Subject: Re: [rules-users] Drools + ETL Process<br>



<br>












<div>

Hi man,<br>



you are mixing a lot of stuff here..<br>



I will recommend you the following steps for achieving the steps that you are mentioning<br>



1) Install guvnor<br>



2) author the rules inside it.. (it already contains a JCR repository, that is similar to a database, it will allow you to store rules there), you can also author some objects (fact model) inside guvnor.<br>




3) Then you can create tests to execute the rules and see which rules are fired.<br>



<br>



Greetings, hope it helps!<br>







<div class="gmail_quote">2010/4/30  <span dir="ltr">&lt;<a href="mailto:andre.fonseca@mail.com">andre.fonseca@mail.com</a>&gt;</span><br>




<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><font color="black" face="arial" size="2">




<div> <br>




</div>









<div> <font size="2"><font face="Arial, Helvetica, sans-serif">Hi Esteban,<br>




<br>




Sorry, I have only one week looking into Drools =)<br>




Yes, I am talking about Drools Expert Database<br>




<br>




Looking into this <a target="_blank" href="http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/apidocs/org/drools/persistence/jpa/JPAKnowledgeService.html">http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/apidocs/org/drools/persistence/jpa/JPAKnowledgeService.html</a> I tried a sample snippet<br>







<br>




<a target="_blank" href="http://pastebin.com/uJd5642D">http://pastebin.com/uJd5642D</a><br>




<br>




But its incomplete, for example, I need to create the Rule in the database also<br>




<br>




The things that I need to do are:<br>




1) Create Rule and Object Facts in Java and persist them in the Drools Expert Database<br>




2) Check in the Guvnor Interface the Rules and Facts created in the step before<br>




2) Fire the Rules created and get the response<br>




</font></font></div>









<div style="clear: both;"></div>









<div> <br>




</div>









<div> <font size="2"><font face="Arial, Helvetica, sans-serif">Is there someone that have experience using JPA persistence with Drools? I already have a simple project configured using JPA and Hibernate but I still don't know how to proceed =(<br>







<br>




Thanks In Advance !<br>




</font></font></div>







<div>



<div></div>







<div>





<div style="font-family: arial,helvetica; font-size: 10pt; color: black;">-----Original Message-----<br>




From: Esteban Aliverti &lt;<a href="mailto:esteban.aliverti@gmail.com">esteban.aliverti@gmail.com</a>&gt;<br>




To: Rules Users List &lt;<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>&gt;<br>




Sent: Thu, Apr 29, 2010 9:02 pm<br>




Subject: Re: [rules-users] Drools + ETL Process<br>




<br>














<div>

Which drools database are you talking about? If you just want to use drools expert, you don't need any db. If you want to persist your kbase or rules, feel free to use whatever mechanism you want.<br>




<br>









<div class="gmail_quote">

2010/4/28  <span dir="ltr">&lt;<a href="mailto:andre.fonseca@mail.com">andre.fonseca@mail.com</a>&gt;</span><br>




<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><font color="black" face="arial" size="2">





<div> <br>





</div>











<div> <font size="2"><font face="Arial, Helvetica, sans-serif">Hi all,<br>





<br>





I am using Drools 5.0 with Tomcat 6 and MySQL.<br>





<br>





Now I need to insert data in the drools database but I DON'T want to use the Guvnor interface.<br>





This is because in the future we'll need to use a kind of ETL process to populate the drools database.<br>





<br>





Should I create a java class with JDBC access and perform a SQL direct to that tables?<br>





I did the reverse engineering of the drools database but I could not understood yet where the data are persisted.<br>





<br>





Any advice should be very helpful.<br>





<br>





Thanks in advance.<br>





<br>





</font></font></div>











<div style="clear: both;"></div>





</font>
<br>




_______________________________________________<br>





rules-users mailing list<br>





<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>





<a target="_blank" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>





<br>




</blockquote></div>




<br>




<br clear="all"><br>




-- <br>




XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<br>




<br>




Esteban Aliverti<br>






</div>




 






<div style="margin: 0px; font-family: Tahoma,Verdana,Arial,Sans-Serif; font-size: 12px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">

<pre style="font-size: 9pt;"><tt>_______________________________________________<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
rules-users mailing list<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<a target="_blank" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
</tt></pre>
</div>




 

</div>




</div>



</div>



</font>
<br>



_______________________________________________<br>




rules-users mailing list<br>




<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>




<a target="_blank" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>




<br>



</blockquote></div>



<br>



<br clear="all"><br>



-- <br>



 - <a target="_blank" href="http://salaboy.wordpress.com">http://salaboy.wordpress.com</a><br>



 - <a target="_blank" href="http://www.jbug.com.ar">http://www.jbug.com.ar</a><br>



 - Salatino "Salaboy" Mauricio -<br>





</div>



 





<div style="margin: 0px; font-family: Tahoma,Verdana,Arial,Sans-Serif; font-size: 12px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">

<pre style="font-size: 9pt;"><tt>_______________________________________________<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
rules-users mailing list<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<a target="_blank" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
</tt></pre>
</div>



 

</div>


</div>


</div>



</font>
<br>


_______________________________________________<br>



rules-users mailing list<br>



<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>



<a target="_blank" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>



<br>


</blockquote></div>


<br>


<br clear="all"><br>


-- <br>


 - <a target="_blank" href="http://salaboy.wordpress.com">http://salaboy.wordpress.com</a><br>


 - <a target="_blank" href="http://www.jbug.com.ar">http://www.jbug.com.ar</a><br>


 - Salatino "Salaboy" Mauricio -<br>




</div>


 




<div style="margin: 0px; font-family: Tahoma,Verdana,Arial,Sans-Serif; font-size: 12px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">

<pre style="font-size: 9pt;"><tt>_______________________________________________<br>
<br>
<br>
<br>
rules-users mailing list<br>
<br>
<br>
<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<br>
<br>
<br>
<a target="_blank" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br>
<br>
<br>
</tt></pre>
</div>


 

</div>

</div>

</div>


</font>
<br>

_______________________________________________<br>


rules-users mailing list<br>


<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>


<a target="_blank" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>


<br>

</blockquote></div>

<br>

<br clear="all"><br>

-- <br>

 - <a target="_blank" href="http://salaboy.wordpress.com">http://salaboy.wordpress.com</a><br>

 - <a target="_blank" href="http://www.jbug.com.ar">http://www.jbug.com.ar</a><br>

 - Salatino "Salaboy" Mauricio -<br>



</div>

 



<div id="AOLMsgPart_4_6502ed4a-e0f9-43f5-bb7e-22e5f2471bf5" style="margin: 0px; font-family: Tahoma,Verdana,Arial,Sans-Serif; font-size: 12px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">

<pre style="font-size: 9pt;"><tt>_______________________________________________<br>
<br>
rules-users mailing list<br>
<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<br>
<a target="_blank" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br>
</tt></pre>
</div>

 

</div>

</font>

</div>
 <!-- end of AOLMsgPart_3_208b317e-015a-48de-9cb7-98a62023d912 -->


<div id="AOLMsgPart_4_208b317e-015a-48de-9cb7-98a62023d912" style="margin: 0px; font-family: Tahoma,Verdana,Arial,Sans-Serif; font-size: 12px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">

<pre style="font-size: 9pt;"><tt>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</tt></pre>
</div>
 <!-- end of AOLMsgPart_4_208b317e-015a-48de-9cb7-98a62023d912 -->

</div>
</font>