I have a patch for drools-persistence-jpa should anyone agree with me that ProcessInstanceInfo and VariableInstanceInfo should be joined by processInstanceId.<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">dale.wyttenbach@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;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>