It seems that Drools is confused by the usage of the class name "Decision"<br>(which is used in the core: java/org/drools/jpdl/core/node/Decision.java<br><br>I can reproduce a similar effect, simply by renaming a class in a working example<br>
to "Decision".<br><br>-W<br><br><br><div class="gmail_quote">On Thu, Apr 15, 2010 at 12:49 PM, Ade Timi <span dir="ltr"><<a href="mailto:adeyinka.timi@nathean.com">adeyinka.timi@nathean.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 still haven't gotten any break through with my problem. The issue is my<br>
LHS of the rule. I am using eclipse. For some reason when I refer to this<br>
particular java class and its variables they can't be seen by the rule but<br>
its setters and getters can be seen on the RHS of the rule. I get an error<br>
saying:<br>
BuildError: Unable to create Field Extractor for 'custPointer' of<br>
'[ClassObjectType class=com.nathean.rules.Decision]' in rule 'Your First<br>
Rule'<br>
<br>
Anyone seen this before? It's basic drools but I just can't find a solution<br>
to this. It works for my other classes, and I can't see whats been done<br>
differently here! Help please! See code below:<br>
<br>
DRL:<br>
package com.nathean.rules<br>
import com.nathean.rules.Decision<br>
rule "Your First Rule"<br>
when<br>
$id : Decision(custPointer == 0)<br>
then<br>
$id.getCustPointer();<br>
System.out.println();<br>
<br>
end<br>
<br>
Java Class:<br>
package com.nathean.rules;<br>
public class Decision {<br>
private int custPointer;<br>
/**<br>
* @param customerPointer the customerPointer to set<br>
*/<br>
public void setCustPointer(int custPointer) {<br>
this.custPointer = custPointer;<br>
}<br>
/**<br>
* @return the customerPointer<br>
*/<br>
public int getCustPointer() {<br>
return custPointer;<br>
}<br>
}<br>
<br>
-Ade<br>
<br>
<br>
-----Original Message-----<br>
From: Wolfgang Laun [mailto:<a href="mailto:wolfgang.laun@gmail.com">wolfgang.laun@gmail.com</a>]<br>
Sent: 14 April 2010 12:54<br>
To: <a href="mailto:adeyinka.timi@nathean.com">adeyinka.timi@nathean.com</a><br>
Subject: Re: [rules-users] Double Handling<br>
<br>
Any update on this? (My last guess - no update - seems to be the only<br>
reasonable explanation, so I'm curious.)<br>
<br>
-W<br>
<br>
<br>
<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>
</blockquote></div><br>