Hmm..<br>I&#39;m looking at the source and I see the following mapping:<br><br>@OneToMany(cascade = CascadeType.ALL)<br>    @JoinColumn(name = &quot;processId&quot;)<br>    @MapKey(name = &quot;name&quot;)<br>    private Map&lt;String, VariableInstanceInfo&gt; variables          = 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">dale.wyttenbach@gmail.com</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 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 class="h5"><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">dale.wyttenbach@gmail.com</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&#39;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 &quot;color&quot;:<br><div><br></div><div><div>  private static WorkflowProcessInstance startProcess(StatefulKnowledgeSession ksession, String color) {</div>


<div>    Map&lt;String, Object&gt; vars = new HashMap&lt;String, Object&gt;();</div><div>    vars.put(&quot;color&quot;, color);</div><div>    WorkflowProcessInstance p1 = (WorkflowProcessInstance) ksession.startProcess(&quot;com.sample.ruleflow&quot;, 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&#39;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>_______________________________________________<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><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 &quot;Salaboy&quot; Mauricio -<br>