[rules-users] Double Handling
Wolfgang Laun
wolfgang.laun at gmail.com
Thu Apr 15 07:14:18 EDT 2010
It seems that Drools is confused by the usage of the class name "Decision"
(which is used in the core: java/org/drools/jpdl/core/node/Decision.java
I can reproduce a similar effect, simply by renaming a class in a working
example
to "Decision".
-W
On Thu, Apr 15, 2010 at 12:49 PM, Ade Timi <adeyinka.timi at nathean.com>wrote:
> 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
>
>
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20100415/ea5f125e/attachment.html
More information about the rules-users
mailing list