<html><body bgcolor="#FFFFFF"><div>Yes that's a common practice! Sorry for the delay in my answer. I will try to test and your contribution asap!&nbsp;</div><div>Greetings!&nbsp;<br><br>- Ing. Mauricio Salatino -</div><div><br>On Feb 19, 2010, at 15:59, Dale Wyttenbach &lt;<a href="mailto:dale.wyttenbach@gmail.com">dale.wyttenbach@gmail.com</a>&gt; wrote:<br><br></div><div></div><blockquote type="cite"><div>Here's another idea to bounce off of you: Given StringVariablePersister, you can easily persist things other than Strings, so long as you can construct them from a String. &nbsp;(Boolean, Integer, etc). &nbsp;In the attached patch, I abstracted your StringVariablePersister and created a BooleanVariablePersister. &nbsp;What do you think? &nbsp;<br>
<br><div class="gmail_quote">2010/2/18 Mauricio Salatino <span dir="ltr">&lt;<a href="mailto:salaboy@gmail.com"><a href="mailto:salaboy@gmail.com">salaboy@gmail.com</a></a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Yes, of course, I add the VPS feature into drools so, I'm glad to see that it's useful, I will add that persister, and if you are interested in do some contributions with JCR will be nice too!<br>Thanks a lot for your contributions!<div>
<div></div><div class="h5"><br>
<br><div class="gmail_quote">2010/2/18 Dale Wyttenbach <span dir="ltr">&lt;<a href="mailto:dale.wyttenbach@gmail.com" target="_blank"><a href="mailto:dale.wyttenbach@gmail.com">dale.wyttenbach@gmail.com</a></a>&gt;</span><br><blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">

Excellent, I have attached a unit test that demonstrates a query made possible by the first patch, in case you are interested. &nbsp;The unit test is designed to run in your example DroolsFlowVPS project, since&nbsp;StringVariablePersister&nbsp;is not part of&nbsp;drools-persistence-jpa. &nbsp;(Could&nbsp;StringVariablePersister&nbsp;be contributed to drools?)<div>

<div></div><div><div>
<br><div class="gmail_quote">2010/2/18 Mauricio Salatino <span dir="ltr">&lt;<a href="mailto:salaboy@gmail.com" target="_blank"><a href="mailto:salaboy@gmail.com">salaboy@gmail.com</a></a>&gt;</span><br><blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">


The first patch is already in the trunk.<br>About the second problem, we are trying to remove the &nbsp; @CollectionOfElements annotation, (because it's hibernate specific) that's why you see the other one commented out. I will try fix it asap, to be able to use toplink as persistence provider as well. Probably that will fix your problem too.<div>


<div></div><div><br>
<br><br><div class="gmail_quote">2010/2/18 Dale Wyttenbach <span dir="ltr">&lt;<a href="mailto:dale.wyttenbach@gmail.com" target="_blank"><a href="mailto:dale.wyttenbach@gmail.com">dale.wyttenbach@gmail.com</a></a>&gt;</span><br><blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">



That's correct, it works fine using h2. &nbsp;Thanks. <br><br><div class="gmail_quote">2010/2/18 Mauricio Salatino <span dir="ltr">&lt;<a href="mailto:salaboy@gmail.com" target="_blank"><a href="mailto:salaboy@gmail.com">salaboy@gmail.com</a></a>&gt;</span><div>



<div></div><div><br><blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">
Let me take a look at that too.. probably it's an oracle problem right? I mean, probably it just happen with oracle.. we can create a fix for that too<br><br><br><div class="gmail_quote">2010/2/18 Dale Wyttenbach <span dir="ltr">&lt;<a href="mailto:dale.wyttenbach@gmail.com" target="_blank"><a href="mailto:dale.wyttenbach@gmail.com">dale.wyttenbach@gmail.com</a></a>&gt;</span><div>




<div></div><div><br>
<blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">My pleasure. &nbsp;<div><br></div><div>Within ProcessInstanceInfo, I've got a similar observation about the eventTypes member. &nbsp;'private Set&lt;EventType&gt;' is currently commented out in favor of 'private Set&lt;String&gt;'. &nbsp;When using an Oracle hibernate dialect, this results in the DDL 'create table ProcessInstanceInfo_eventTypes' which yields the error 'ORA-00972: identifier is too long'. &nbsp;I imagine this will be resolved when the String is promoted to EventType but I thought you might want to know.<br>






<br><div class="gmail_quote">2010/2/13 Mauricio Salatino <span dir="ltr">&lt;<a href="mailto:salaboy@gmail.com" target="_blank"><a href="mailto:salaboy@gmail.com">salaboy@gmail.com</a></a>&gt;</span><div><div></div><div><br><blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">






done.. I will apply the patch into the trunk.. it seems to be correct.<br>Thanks a lot!<br><br><div class="gmail_quote">2010/2/13 Dale Wyttenbach <span dir="ltr">&lt;<a href="mailto:dale.wyttenbach@gmail.com" target="_blank"><a href="mailto:dale.wyttenbach@gmail.com">dale.wyttenbach@gmail.com</a></a>&gt;</span><div>






<div></div><div><br>
<blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">Please see attached.<div><div></div><div><br><br><div class="gmail_quote">2010/2/12 Mauricio Salatino <span dir="ltr">&lt;<a href="mailto:salaboy@gmail.com" target="_blank"><a href="mailto:salaboy@gmail.com">salaboy@gmail.com</a></a>&gt;</span><br>







<blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">
I just want to make sure before apply the patch that the change will not impact in other places.<br>Thanks<div><div></div><div><br><br><div class="gmail_quote">On Fri, Feb 12, 2010 at 5:38 PM, Mauricio Salatino <span dir="ltr">&lt;<a href="mailto:salaboy@gmail.com" target="_blank"><a href="mailto:salaboy@gmail.com">salaboy@gmail.com</a></a>&gt;</span> wrote:<br>









<blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">can you post both, previous and new, sql schema generated for the VariableInstanceInfo and ProcessInstanceInfo tables?<div>









<div></div><div><br><br><br><div class="gmail_quote">2010/2/12 Dale Wyttenbach <span dir="ltr">&lt;<a href="mailto:dale.wyttenbach@gmail.com" target="_blank"><a href="mailto:dale.wyttenbach@gmail.com">dale.wyttenbach@gmail.com</a></a>&gt;</span><br>
<blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">If you try to write a query that requires&nbsp;VariableInstanceInfo.processId, it won't work because that class has no processId member.<div>










I guessed that processInstanceId would be a better join column, and that worked (patch attached)</div>
<div><br>Thanks for the reply.</div><div><br><div class="gmail_quote">2010/2/12 Mauricio Salatino <span dir="ltr">&lt;<a href="mailto:salaboy@gmail.com" target="_blank"><a href="mailto:salaboy@gmail.com">salaboy@gmail.com</a></a>&gt;</span><div><div></div><div>










<br><blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">
Hmm..<br>I'm looking at the source and I see the following mapping:<br><br>@OneToMany(cascade = CascadeType.ALL)<br>&nbsp;&nbsp;&nbsp; @JoinColumn(name = "processId")<br>&nbsp;&nbsp;&nbsp; @MapKey(name = "name")<br>&nbsp;&nbsp;&nbsp; private Map&lt;String, VariableInstanceInfo&gt; variables&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = new HashMap&lt;String, VariableInstanceInfo&gt;();<br>












<br>That makes me think that there is a join column called processId between VariableInstanceInfo and ProcessInstanceInfo.<br><br><br><div class="gmail_quote">2010/2/12 Dale Wyttenbach <span dir="ltr">&lt;<a href="mailto:dale.wyttenbach@gmail.com" target="_blank"><a href="mailto:dale.wyttenbach@gmail.com">dale.wyttenbach@gmail.com</a></a>&gt;</span><br>












<blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex"><div><div></div><div>I have a patch for drools-persistence-jpa should anyone agree with me that ProcessInstanceInfo and VariableInstanceInfo should be joined by processInstanceId.<div>












<div></div><div><br><br><div class="gmail_quote">On Fri, Feb 12, 2010 at 10:52 AM, Dale Wyttenbach <span dir="ltr">&lt;<a href="mailto:dale.wyttenbach@gmail.com" target="_blank"><a href="mailto:dale.wyttenbach@gmail.com">dale.wyttenbach@gmail.com</a></a>&gt;</span> wrote:<br>













<blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">I'm trying to adapt the StringVariablePersister presented in&nbsp;<a href="http://blog.athico.com/2009/09/drools-flow-variable-persistence.html" target="_blank"><a href="http://blog.athico.com/2009/09/drools-flow-variable-persistence.html">http://blog.athico.com/2009/09/drools-flow-variable-persistence.html</a></a><div>













<br>
</div><div><a href="http://blog.athico.com/2009/09/drools-flow-variable-persistence.html" target="_blank"></a>I can create process instances with variable "color":<br><div><br></div><div><div>&nbsp;&nbsp;private static WorkflowProcessInstance startProcess(StatefulKnowledgeSession ksession, String color) {</div>














<div>&nbsp;&nbsp; &nbsp;Map&lt;String, Object&gt; vars = new HashMap&lt;String, Object&gt;();</div><div>&nbsp;&nbsp; &nbsp;vars.put("color", color);</div><div>&nbsp;&nbsp; &nbsp;WorkflowProcessInstance p1 = (WorkflowProcessInstance) ksession.startProcess("com.sample.ruleflow", vars);</div>














<div>&nbsp;&nbsp; &nbsp;return p1;</div><div>&nbsp;&nbsp;}</div><div><br></div><div>I can count them:</div><div><br></div><div>select&nbsp;</div><div><div>&nbsp;&nbsp; &nbsp;count(*)</div><div>from&nbsp;</div><div>&nbsp;&nbsp; &nbsp;ProcessInstanceInfo</div><div><br></div><div>However I'm stymied as to counting process instances with a given color, as there appears to be no join column between ProcessInstanceInfo and VariableInstanceInfo.</div>














<div>Can such a query be written?</div><div><br></div><div>Thanks.</div><div><br></div><div><br></div><div><br></div></div></div></div>
</blockquote></div><br>
</div></div><br></div></div>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank"><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a></a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank"><a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a></a><br>
<br></blockquote></div><font color="#888888"><br><br clear="all"><br>-- <br> - <a href="http://salaboy.wordpress.com" target="_blank"><a href="http://salaboy.wordpress.com">http://salaboy.wordpress.com</a></a><br> - <a href="http://www.jbug.com.ar" target="_blank"><a href="http://www.jbug.com.ar">http://www.jbug.com.ar</a></a><br>











 - Salatino "Salaboy" Mauricio -<br>

</font><br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank"><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a></a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank"><a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a></a><br>
<br></blockquote></div></div></div><br></div>
<br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank"><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a></a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank"><a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a></a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br> - <a href="http://salaboy.wordpress.com" target="_blank"><a href="http://salaboy.wordpress.com">http://salaboy.wordpress.com</a></a><br> - <a href="http://www.jbug.com.ar" target="_blank"><a href="http://www.jbug.com.ar">http://www.jbug.com.ar</a></a><br>









 - Salatino "Salaboy" Mauricio -<br>

</div></div></blockquote></div><br><br clear="all"><br>-- <br> - <a href="http://salaboy.wordpress.com" target="_blank"><a href="http://salaboy.wordpress.com">http://salaboy.wordpress.com</a></a><br> - <a href="http://www.jbug.com.ar" target="_blank"><a href="http://www.jbug.com.ar">http://www.jbug.com.ar</a></a><br>








 - Salatino "Salaboy" Mauricio -<br>

</div></div><br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank"><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a></a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank"><a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a></a><br>
<br></blockquote></div><br>
</div></div><br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank"><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a></a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank"><a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a></a><br>
<br></blockquote></div></div></div><div><div></div><div><br><br clear="all"><br>-- <br> - <a href="http://salaboy.wordpress.com" target="_blank"><a href="http://salaboy.wordpress.com">http://salaboy.wordpress.com</a></a><br> - <a href="http://www.jbug.com.ar" target="_blank"><a href="http://www.jbug.com.ar">http://www.jbug.com.ar</a></a><br>






 - Salatino "Salaboy" Mauricio -<br>

</div></div><br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank"><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a></a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank"><a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a></a><br>
<br></blockquote></div></div></div><br></div>
<br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank"><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a></a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank"><a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a></a><br>
<br></blockquote></div></div></div><div><div></div><div><br><br clear="all"><br>-- <br> - <a href="http://salaboy.wordpress.com" target="_blank"><a href="http://salaboy.wordpress.com">http://salaboy.wordpress.com</a></a><br> - <a href="http://www.jbug.com.ar" target="_blank"><a href="http://www.jbug.com.ar">http://www.jbug.com.ar</a></a><br>




 - Salatino "Salaboy" Mauricio -<br>

</div></div><br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank"><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a></a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank"><a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a></a><br>
<br></blockquote></div></div></div><br>
<br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank"><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a></a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank"><a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a></a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br> - <a href="http://salaboy.wordpress.com" target="_blank"><a href="http://salaboy.wordpress.com">http://salaboy.wordpress.com</a></a><br> - <a href="http://www.jbug.com.ar" target="_blank"><a href="http://www.jbug.com.ar">http://www.jbug.com.ar</a></a><br>


 - Salatino "Salaboy" Mauricio -<br>

</div></div><br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank"><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a></a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank"><a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a></a><br>
<br></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank"><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a></a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank"><a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a></a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br> - <a href="http://salaboy.wordpress.com" target="_blank"><a href="http://salaboy.wordpress.com">http://salaboy.wordpress.com</a></a><br> - <a href="http://www.jbug.com.ar" target="_blank"><a href="http://www.jbug.com.ar">http://www.jbug.com.ar</a></a><br>
 - Salatino "Salaboy" Mauricio -<br>

</div></div><br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org"><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a></a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank"><a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a></a><br>
<br></blockquote></div><br>
</div></blockquote><blockquote type="cite"><div>&lt;patch.txt.gz&gt;</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>rules-users mailing list</span><br><span><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a></span><br><span><a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a></span><br></div></blockquote></body></html>