[rules-users] Stumped by error in rule

Tom.E.Murphy at wellsfargo.com Tom.E.Murphy at wellsfargo.com
Tue Feb 9 07:31:07 EST 2010


Doh!
Thanks, guys!
I’ve done that before, too <slapping forehead>.

Tom Murphy
Business Process Consultant
Wells Fargo HCFG - CORE Deal Decisioning Platform
800 S. Jordan Creek Parkway | West Des Moines, IA 50266
MAC: X2301-01B
Office: 515 324 4853 | Mobile: 515 423 4334
This message may contain confidential and/or privileged information.  If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein.  If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message.  Thank you for your cooperation.

From: rules-users-bounces at lists.jboss.org [mailto:rules-users-bounces at lists.jboss.org] On Behalf Of Salaboy
Sent: Tuesday, February 09, 2010 6:22 AM
To: Rules Users List
Subject: Re: [rules-users] Stumped by error in rule

Yes that is the error, just a typo

- Ing. Mauricio Salatino -

On Feb 9, 2010, at 8:51, "Swindells, Thomas" <TSwindells at nds.com<mailto:TSwindells at nds.com>> wrote:
Have you tried:
Applicant ( $ApplicantNumber : applicantNumber )

Eg your field should start with a lower case letter?

Thomas

From: rules-users-bounces at lists.jboss.org<mailto:rules-users-bounces at lists.jboss.org> [mailto:rules-users-bounces at lists.jboss.org] On Behalf Of Tom.E.Murphy at wellsfargo.com<mailto:Tom.E.Murphy at wellsfargo.com>
Sent: 09 February 2010 11:44
To: rules-users at 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<http://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 at nds.com<mailto:postmaster at 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 at nds.com<mailto:postmaster at 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<http://www.nds.com>
_______________________________________________
rules-users mailing list
rules-users at lists.jboss.org<mailto: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/20100209/2bfa21f7/attachment.html 


More information about the rules-users mailing list