<div><br></div><div><br></div><div>That was really fast! Thank you.</div><div><br></div><div>Maybe I'm not getting this properly ... let me extend this thing a bit... what we are trying to get is to store the state of a set of facts living in the knowledge session in the database, one tuple for each update of it's state along ( or at least syncronized ) with the updates of SessionInfo persistence that drools executes during the fireUntilHalt loop.</div>
<div><br></div><div>It's some sort of historic log of the different states of given variables inside certain facts when they are alive ( as in not retracted ) in the knowledge session.</div><div><br></div><div>Does this makes sense to you given the persistence strategy you've defined in your previous message?<br>
</div><div><br></div><div><br></div>Alberto R. Galdo<br><a href="mailto:argaldo@gmail.com" target="_blank">argaldo@gmail.com</a><br><br>
<br><br><div class="gmail_quote">On Thu, May 24, 2012 at 6:34 PM, Mauricio Salatino <span dir="ltr"><<a href="mailto:salaboy@gmail.com" target="_blank">salaboy@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
You can use the Variable Persistency Strategies, that will store your facts in the database for you. <div>You need to configure in the environment the strategies for example:</div><div><a href="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" target="_blank">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</a></div>
<div><br></div><div>Notice that you will need to provide your domain specific entityManager to the <span style="border-collapse:collapse;color:rgb(153,0,0);font-family:'Bitstream Vera Sans Mono',Courier,monospace;font-size:12px;font-weight:bold;line-height:16px;white-space:pre-wrap">JPAPlaceholderResolverStrategy</span></div>
<div><br></div><div>Cheers<br><br><div class="gmail_quote"><div><div class="h5">On Thu, May 24, 2012 at 1:30 PM, Alberto R. Galdo <span dir="ltr"><<a href="mailto:argaldo@gmail.com" target="_blank">argaldo@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">Hi,<br><br> 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.<br>
<br> 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?<br>
<br>Best regards,<br><br><br clear="all">Alberto R. Galdo<br><a href="mailto:argaldo@gmail.com" target="_blank">argaldo@gmail.com</a><br>
<br></div></div>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank">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>
<br></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br> - MyJourney @ <a href="http://salaboy.wordpress.com" target="_blank">http://salaboy.wordpress.com</a><div> - Co-Founder @ <a href="http://www.jugargentina.org" target="_blank">http://www.jugargentina.org</a><br>
- Co-Founder @ <a href="http://www.jbug.com.ar" target="_blank">http://www.jbug.com.ar</a><br> <br> - Salatino "Salaboy" Mauricio -</div><br>
</font></span></div>
<br>_______________________________________________<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>
<br></blockquote></div><br>