I just want to make sure before apply the patch that the change will not impact in other places.<br>Thanks<br><br><div class="gmail_quote">On Fri, Feb 12, 2010 at 5:38 PM, Mauricio Salatino <span dir="ltr"><<a href="mailto:salaboy@gmail.com">salaboy@gmail.com</a>></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 class="h5"><br><br><br><div class="gmail_quote">2010/2/12 Dale Wyttenbach <span dir="ltr"><<a href="mailto:dale.wyttenbach@gmail.com" target="_blank">dale.wyttenbach@gmail.com</a>></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 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"><<a href="mailto:salaboy@gmail.com" target="_blank">salaboy@gmail.com</a>></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> @JoinColumn(name = "processId")<br> @MapKey(name = "name")<br> private Map<String, VariableInstanceInfo> variables = new HashMap<String, VariableInstanceInfo>();<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"><<a href="mailto:dale.wyttenbach@gmail.com" target="_blank">dale.wyttenbach@gmail.com</a>></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"><<a href="mailto:dale.wyttenbach@gmail.com" target="_blank">dale.wyttenbach@gmail.com</a>></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 <a href="http://blog.athico.com/2009/09/drools-flow-variable-persistence.html" target="_blank">http://blog.athico.com/2009/09/drools-flow-variable-persistence.html</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> private static WorkflowProcessInstance startProcess(StatefulKnowledgeSession ksession, String color) {</div>
<div> Map<String, Object> vars = new HashMap<String, Object>();</div><div> vars.put("color", color);</div><div> WorkflowProcessInstance p1 = (WorkflowProcessInstance) ksession.startProcess("com.sample.ruleflow", vars);</div>
<div> return p1;</div><div> }</div><div><br></div><div>I can count them:</div><div><br></div><div>select </div><div><div> count(*)</div><div>from </div><div> 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">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><font color="#888888"><br><br clear="all"><br>-- <br> - <a href="http://salaboy.wordpress.com" target="_blank">http://salaboy.wordpress.com</a><br> - <a href="http://www.jbug.com.ar" target="_blank">http://www.jbug.com.ar</a><br>
- Salatino "Salaboy" Mauricio -<br>
</font><br>_______________________________________________<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></div></div><br></div>
<br>_______________________________________________<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><br><br clear="all"><br>-- <br> - <a href="http://salaboy.wordpress.com" target="_blank">http://salaboy.wordpress.com</a><br> - <a href="http://www.jbug.com.ar" target="_blank">http://www.jbug.com.ar</a><br>
- Salatino "Salaboy" Mauricio -<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br> - <a href="http://salaboy.wordpress.com">http://salaboy.wordpress.com</a><br> - <a href="http://www.jbug.com.ar">http://www.jbug.com.ar</a><br> - Salatino "Salaboy" Mauricio -<br>