[rules-users] Double Handling

Ade Timi adeyinka.timi at nathean.com
Thu Apr 15 06:49:34 EDT 2010


I still haven't gotten any break through with my problem. The issue is my
LHS of the rule. I am using eclipse. For some reason when I refer to this
particular java class and its variables they can't be seen by the rule but
its setters and getters can be seen on the RHS of the rule. I get an error
saying: 
BuildError: Unable to create Field Extractor for 'custPointer' of
'[ClassObjectType class=com.nathean.rules.Decision]' in rule 'Your First
Rule'

Anyone seen this before? It's basic drools but I just can't find a solution
to this. It works for my other classes, and I can't see whats been done
differently here! Help please! See code below:

DRL:
package com.nathean.rules
import com.nathean.rules.Decision
rule "Your First Rule"
	when
		$id : Decision(custPointer == 0)
	then 
		$id.getCustPointer();
		System.out.println();
		
end

Java Class:
package com.nathean.rules;
public class Decision {
	private int custPointer;
	/**
	 * @param customerPointer the customerPointer to set
	 */
	public void setCustPointer(int custPointer) {
		this.custPointer = custPointer;
	}
	/**
	 * @return the customerPointer
	 */
	public int getCustPointer() {
		return custPointer;
	}
}

-Ade


-----Original Message-----
From: Wolfgang Laun [mailto:wolfgang.laun at gmail.com] 
Sent: 14 April 2010 12:54
To: adeyinka.timi at nathean.com
Subject: Re: [rules-users] Double Handling

Any update on this? (My last guess - no update - seems to be the only
reasonable explanation, so I'm curious.)

-W






More information about the rules-users mailing list