Ade Timi wrote:

Thanks guys for your responses. This should be as simple as it gets, which adds to my frustration. See the following code below:

Java classes:

Individual

            public class Individual {

private double assetCost;

 

public void setAssetCost(double assetCost) {

            this.assetCost = assetCost;

            }

 

            public double getAssetCost() {

                  return assetCost;

}

}

IndividualDecision

            public class IndividualDecision {

private double loanToValue;

 

public void setLoanToValue(double LoanToValue) {

                  this.loanToValue = LoanToValue;

            }

            public double getLoanToValue() {

                  return loanToValue;

      }

            public void calcValues(Individual ind){

            this.loanToValue = ind.getAssetCost();

      }

}

 

Rule Resourse –

            import com...Individual

import com...IndividualDecision

 

rule "G2 Equity in Asset"

      when

            $d : IndividualDecision(loanToValue() < 85.0)

      then

            System.out.println("loanToValue: " + ($d.getLoanToValue()));

End

Hi,

you might want to try to replace "loanToValue()" with "loanToValue" and report whether it works. I'm not sure whether the () are actually in your rules code or a copy/paste error, but if they are, it'll be worth a try.

This would at least somehow match the error message you reported. When using the java dialect, you can simply use property names inside the constraints sections. No need to add parentheses.

Kind regards

Ansgar