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