[rules-users] Re: Rules compiler is not able to extract the field withxXXX format

Sivakumar Thiruppathy sivakumarthiruppathy at yahoo.com
Wed Jun 11 19:31:02 EDT 2008


Thanks for trying it out. 
Actually it was a typo in my posting text and not in the code. I have declared variable called tText and have a getTText() method.
Below is the rule segment.

rule "entity.testrule"
    when
    $rulesSerivceTest:RulesServiceTest(tText:tText)
    then
       logger.info("Received an Test");
end

Below is the error while creating the package.

     [java] java.lang.RuntimeException: Unable to create Field Extractor for 'tText' : [Rule name=entity.testrule, agendaGroup=MAIN, salience=0, no-loop=false]
     [java] org.drools.RuntimeDroolsException: org.drools.RuntimeDroolsException: Field/method 'tText' not found for class 'com.satmetrix.rules.test.rulestest.RulesServiceTest'
     [java] 16:24:57,642 INFO   - Error Summary : Unable to create Field Extractor for 'tText' : [Rule name=entity.testrule, agendaGroup=MAIN, salience=0, no-loop=false]



I was using 4.0.4 then I tried with 4.0.7 and got the same error. Are you extracting the field in the rule?


Regards,
Siva


----- Original Message ----
From: Alexander Claus <styjdt at claus4joy.de>
To: Rules Users List <rules-users at lists.jboss.org>
Sent: Wednesday, June 11, 2008 3:41:29 PM
Subject: [rules-users] Re: Rules compiler is not able to extract the field withxXXX format

> I have a member variable called tText (i.e any variable with xXXX format)
> and have the proper getter/setter ( getTText() and setTText(String arg) ).
> If I try the extract that field in the rule LHS ( i.e.
> someclass(myText:tText)  ) then I get the "Unable to create Field 
> Extractor
> for 'sText'" error.

Sorry, but I can't reproduce that.
I'm working with Drools 4.0.7 and if I set up a test case with the values as 
you describe (String tText, ...), my test runs successfully.
Stupid question: Are you sure that you have no typo in your rule? You get an 
error for "sText", but you have declared "tText".

Alexander Claus 

_______________________________________________
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/20080611/ee813b19/attachment.html 


More information about the rules-users mailing list