Yes that is the error, just a typo

- Ing. Mauricio Salatino -

On Feb 9, 2010, at 8:51, "Swindells, Thomas" <TSwindells@nds.com> wrote:

Have you tried:

Applicant ( $ApplicantNumber : applicantNumber )

 

Eg your field should start with a lower case letter?

 

Thomas

 

From: rules-users-bounces@lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Tom.E.Murphy@wellsfargo.com
Sent: 09 February 2010 11:44
To: rules-users@lists.jboss.org
Subject: [rules-users] Stumped by error in rule

 

After all this time working with Drools 5.0.1, I thought I’d figured out all the ways my syntax could fail, but this one has me stumped.

 

Any help would be appreciated.

 

I have the following rule:

 

rule "RS6051.1.2_"

        dialect "mvel"

        when

               

                Applicant ( $ApplicantNumber : ApplicantNumber )

                not ( ScoreCard (name == "Context test", contextId == $ApplicantNumber) )

        then

                ScoreCard scoreCard = functions.getScoreCardManager().newScoreCard();

scoreCard.setName("Context test");

scoreCard.setContextId($ApplicantNumber);

                insert(scoreCard);

end

 

I’m getting the following error on this rule during compilation:

 

Unable to create Field Extractor for 'ApplicantNumber' : [Rule name='RS6051.1.2_']

org.drools.RuntimeDroolsException: Field/method 'ApplicantNumber' not found for class 'com.wellsfargo.service.provider.sse.decisioning.x2009.Applicant'Unable to build expression for 'consequence': null '

 

 

 

 

And here is (part of) the Applicant class in question:

 

package com.wellsfargo.service.provider.sse.decisioning.x2009;

public class Applicant

{

        public  Short getApplicantNumber()

        {

                return applicantNumber ;

        }

 

        public void setApplicantNumber(Short applicantNumber)

        {

this.applicantNumber = applicantNumber;

        }

Short applicantNumber;

}

 

And This is (part of) the ScoreCard class:

 

public class ScoreCard

{

        public void setName(String name) { this.name = name; }

        public String getName() { return name; }

 

        public int getContextId(){return contextId;}

        public void setContextId(int id){contextId = id;}

        private String name;

        private int contextId;

}

 

 

 

Why am I getting this error?

Help!

Thanks

 

Tom Murphy

 

 




**************************************************************************************
This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmaster@nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary.

NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00
**************************************************************************************


This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmaster@nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes.
To protect the environment please do not print this e-mail unless necessary.

An NDS Group Limited company. www.nds.com
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users