Niyas, I tested a very resembling rule, and it works fine. I don't know what is the problem, as your code seems to be correct.The error isn't for sure the way we name the declarations.
rule "EvalWithFunction_1" when $e:Employee($name:employeeName == "Fred") eval($e.getExtraHours() >= 8) eval($e.getCurrencyName() == "EURO") then System.out.println($e.getEmployeeName()+" has worked at least 8 extra hours"); end Check in working memory for facts that should activate the rule, and be sure that there are any rules in your drl file that are retracting those facts before your particular rule "Credti Accept" will fire. Oana. Niyas <[EMAIL PROTECTED]> wrote: Why in the second case it's not printing anything? I am not asked about usom valid identifiers.... pls see the below two rules.. Is there any difference between the below two rules rule "Credti Accept" salience 10 when cust:Customer(customerAge > 18) then System.out.println("Credit Card Allowed For :: " +cust.getCustomerName()); //retract(cust); end rule "Credti Accept" salience 10 when $cust:Customer(customerAge > 18) then System.out.println("Credit Card Allowed For :: " +$cust.getCustomerName()); //retract(cust); end On 12/21/06, nicolae oana wrote: > Hi Niyas, > > There is no difference between your two declarations emp and $emp . The sign > '$' is used as first letter in the name of a declaration just to > differentiate declarations from fields. You can used or not. It's your > choice. But I think it is appropriate to use it, just to follow the drools > standards in writing the code. > > Best regards, > Oana. > > Niyas wrote: I am new to jBoss Rule - Drools and I am > hust going thru' the manual > and trying some examples using JBoss Rules IDE in Eclipse.. > > I am having doubt in bound variable: > > what is the difference between emp: Employee and $emp:Employee (the $ > sign)? give some example > > --------------------------------------------------------------------- > To unsubscribe from this list please visit: > > http://xircles.codehaus.org/manage_email > > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com