And just for completeness here is my DRL file that compiles fine in the IDE:<br><br>#created on: Apr 10, 2007<br>package com.circuitcity.rtvcrms.rules<br><br>#list any import classes here.<br>import java.math.BigDecimal;<br>
<br>import com.circuitcity.rtvcrms.bw.ModelDiscrepancyOutput;<br>import com.circuitcity.rtvcrms.bw.StatusConstants;<br>import com.circuitcity.rtvcrms.AdjustmentDocument.Adjustment;<br>import com.circuitcity.rtvcrms.RepaymentCodeDocument.RepaymentCode
;<br>import org.drools.WorkingMemory;<br>import org.drools.QueryResults;<br>import org.drools.QueryResult;<br>import java.util.Iterator;<br><br>#declare any global variables here<br><br>rule &quot;Sum CM&quot;<br>&nbsp;&nbsp;&nbsp; salience 90
<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; when<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; mdOutput : ModelDiscrepancyOutput ()<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; repaymentCode : RepaymentCodeDocument.RepaymentCode( code == &quot;MD&quot;)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; cmAdjustment : Adjustment(cmNumber != null, lineNumber != null, originalRepaymentCode == &quot;MD&quot; )
<br>&nbsp;&nbsp;&nbsp; then<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; System.out.println(&quot;Sum CM&quot;); <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; mdOutput.setSumCmAndRnr(cmAdjustment.getAvailableQuantity());<br>end<br><br>rule &quot;Sum RTV&quot;<br>&nbsp;&nbsp;&nbsp; salience 80<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; when<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; mdOutput : ModelDiscrepancyOutput ()
<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; repaymentCode : RepaymentCode( code == &quot;MD&quot;)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; rtvAdjustment : Adjustment(rtvNumber != null, lineNumber != null, originalRepaymentCode == &quot;MD&quot; )<br>&nbsp;&nbsp;&nbsp; then <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; System.out.println
(&quot;Sum RTV&quot;);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; mdOutput.addSumRTVQty(rtvAdjustment.getAvailableQuantity());<br>end<br><br>rule &quot;Sum RNR&quot;<br>&nbsp;&nbsp;&nbsp; salience 70<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; when<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; mdOutput : ModelDiscrepancyOutput ()<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; repaymentCode : RepaymentCode( code == &quot;MD&quot;)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; rnrAdjustment : Adjustment(keyRecNo != null, lineNumber != null, originalRepaymentCode == &quot;MD&quot; )<br>&nbsp;&nbsp;&nbsp; then <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; System.out.println
(&quot;Sum RNR&quot;);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; mdOutput.setSumCmAndRnr(rnrAdjustment.getAvailableQuantity());<br>end<br><br>rule &quot;Repayment Code Requires Approval&quot;<br>&nbsp;&nbsp;&nbsp; salience 60<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; when<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; repaymentCode : RepaymentCode( code == &quot;MD&quot;, matchApprv == &quot;Y&quot; )
<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; mdOutput : ModelDiscrepancyOutput( $amt1 : sumRTVQty, $amt2 : sumCmAndRnr)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; eval($amt1.doubleValue() == $amt2.doubleValue())<br>&nbsp;&nbsp;&nbsp; then <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; System.out.println(&quot;Repayment Code Requires Approval&quot;);
<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; processMDAdjustments(drools.getQueryResults( &quot;MD Adjustments&quot; ), StatusConstants.APPROVAL);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; System.out.println(&quot;mdOutput: &quot; + mdOutput);<br>end<br><br>rule &quot;Repayment Code Does Not Requires Approval&quot;
<br>&nbsp;&nbsp;&nbsp; salience 60<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; when<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; repaymentCode : RepaymentCode( code == &quot;MD&quot;, matchApprv != &quot;Y&quot;&nbsp; )<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; mdOutput : ModelDiscrepancyOutput( $amt1 : sumRTVQty, $amt2 : sumCmAndRnr)
<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; eval($amt1.doubleValue() == $amt2.doubleValue())<br>&nbsp;&nbsp;&nbsp; then <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; System.out.println(&quot;Repayment Code Does Not Requires Approval&quot;);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; processMDAdjustments(drools.getQueryResults( &quot;MD Adjustments&quot; ), 
StatusConstants.MATCHED);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; System.out.println(&quot;mdOutput: &quot; + mdOutput);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>end<br><br>rule &quot;MD QTY do not match&quot;<br>&nbsp;&nbsp;&nbsp; salience 60<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; when<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; repaymentCode : RepaymentCode( code == &quot;MD&quot;)
<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; mdOutput : ModelDiscrepancyOutput( $amt1 : sumRTVQty, $amt2 : sumCmAndRnr)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; eval($amt1.doubleValue() != $amt2.doubleValue())<br>&nbsp;&nbsp;&nbsp; then <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; System.out.println(&quot;MD QTY&#39;s do not match&quot;);
<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; processMDAdjustments(drools.getQueryResults( &quot;MD Adjustments&quot; ), StatusConstants.OPEN);<br>end<br><br>rule &quot;No MD Repayment Code&quot;<br>&nbsp;&nbsp;&nbsp; salience 60<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; when<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; mdOutput : ModelDiscrepancyOutput( )
<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; repaymentCode : RepaymentCode( code != &quot;MD&quot; )<br>&nbsp;&nbsp;&nbsp; then <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; System.out.println(&quot;No MD Repayment code&quot;);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; mdOutput.setLineStatus(StatusConstants.OPEN);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; System.out.println
(&quot;mdOutput: &quot; + mdOutput);<br>end<br><br>query &quot;MD Adjustments&quot; <br>&nbsp;&nbsp;&nbsp; adj : Adjustment(originalRepaymentCode == &quot;MD&quot; )<br>end<br><br>function void processMDAdjustments(QueryResults results, String status)
<br>{<br>&nbsp;&nbsp;&nbsp; System.out.println( &quot;we have &quot; + results.size() + &quot; MD Adjustments&quot; );<br>&nbsp;&nbsp;&nbsp; for ( Iterator it = results.iterator(); it.hasNext(); ) {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; QueryResult result = ( QueryResult ) it.next
();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Adjustment adj = ( Adjustment ) result.get( &quot;adj&quot; );<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; adj.setStatus(status);<br>&nbsp;&nbsp;&nbsp; }<br>}<br><br><div><span class="gmail_quote">On 7/3/07, <b class="gmail_sendername">Ronald R. DiFrango
</b> &lt;<a href="mailto:ron.difrango@gmail.com">ron.difrango@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
OK, I got this workinkg now, by adding the jar file <span style="font-weight: bold;">core-3.2.3.v_686_R32x.jar</span> from the distribution to my project.<br><br>Now though when I run it, I get the following error:<br><br>

The method getQueryResults(String) is undefined for the type KnowledgeHelper<br><br>has getQueryResults been removd in 4.x or renamed?<div><span class="e" id="q_1138dcefdd5d64f3_1"><br><br><div><span class="gmail_quote">
On 7/3/07, <b class="gmail_sendername">Ronald R. DiFrango
</b> &lt;<a href="mailto:ron.difrango@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">ron.difrango@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

All,<br><br>I am in the process of migrating my 3.0. project to the 4.x series and when I attempt to run my code I get the following exception when I attempt to load my .drl files:<br><br>Caused by: org.drools.RuntimeDroolsException


: Unable to load dialect &#39;org.drools.rule.builder.dialect.java.JavaDialect:java&#39;<br><br>Here is my package builder code:<br><br>static<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; try<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; builder = new PackageBuilder();
<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; builder.addPackageFromDrl( new InputStreamReader( RtvDecisionEngine.class.getResourceAsStream(&quot;rtv.drl&quot; ) ) );<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; builder.addPackageFromDrl( new InputStreamReader( RtvDecisionEngine.class.getResourceAsStream


(&quot;modelDiscrepancyRules.drl&quot; ) ) );<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ruleBase = RuleBaseFactory.newRuleBase();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ruleBase.addPackage( builder.getPackage() );<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; catch(Exception e)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br>


&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; throw new RuntimeException(&quot;Failure loading the Rules&quot;, e);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; }<br><br><br>Any thoughts appreciated.<br><br>Ron<br>
</blockquote></div><br>
</span></div></blockquote></div><br>