[rules-users] Driving License application

2013-12-24 Thread seyfullah
Hello, I am trying to implement Driving License example application in Drools Documentation Versio 6.0.0.0 Final. My main method is as below. KieServices kieServices = KieServices.Factory.get(); KieContainer kContainer = kieServices.getKieClasspathContainer();

Re: [rules-users] Driving License application

2013-12-24 Thread Mauricio Salatino
Can you share with us the Applicant class? because if you have something like: boolean valid; it will be automatically initialized to false, so the rule will not do anything just leave the Applicant as it is On Tue, Dec 24, 2013 at 10:05 AM, seyfullah seyfullahti...@outlook.comwrote: Hello, I

Re: [rules-users] Driving License application

2013-12-24 Thread seyfullah
package MyPackage; public class Applicant { public String getName() { return name; } public void setName(String name) { this.name = name; } public int getAge() { return age; } public void

Re: [rules-users] Driving License application

2013-12-24 Thread Mauricio Salatino
So, if you don't touch in some way the boolean valid, value in your rules or in your java code it will be false not true. On Tue, Dec 24, 2013 at 10:15 AM, seyfullah seyfullahti...@outlook.comwrote: package MyPackage; public class Applicant { public String getName() {

Re: [rules-users] Driving License application

2013-12-24 Thread seyfullah
Ok, I changed my drl file and main method as follows, and it works. Thank you. package MyPackage import MyPackage.Applicant; rule Is of not valid age when $a : Applicant( age 18 ) then $a.setValid ( false ); end rule Is of valid age when $a : Applicant( age 17 ) then

Re: [rules-users] Driving License application

2013-12-24 Thread Mauricio Salatino
Yeah, that will do the work. On Tue, Dec 24, 2013 at 10:34 AM, seyfullah seyfullahti...@outlook.comwrote: Ok, I changed my drl file and main method as follows, and it works. Thank you. package MyPackage import MyPackage.Applicant; rule Is of not valid age when $a : Applicant(

[rules-users] Business Rules webinar - includes Drools

2013-12-24 Thread MichaƂ Kasprzyk
# websitehttp://www.nobleprog.co.uk/business-rules-applied-webinar/2014-01 Hello, I'd like to invite you to apply to a webinar dedicated to business rules (which includes Drools and also DMN) Business Rules Applied - From Theory to Business This is a series of webinars on Business Rules

Re: [rules-users] Driving License application

2013-12-24 Thread Wolfgang Laun
If you have a property (such as valid) that has N possible values (2 in this case) you should have at least N-1 rules, setting values 1 to N-1 (as you have) and a default by initialisation equal to the N-th value (which is missing from your code). Alternatively, consider using N rules, one for

[rules-users] condition operator || give NPE in 6.0 but 5.x is fine

2013-12-24 Thread wtang
I have a rule below and the || operator is giving me null pointer exception (NPE) when the rule is invoked. This NPE problem is only happening is 6.0. This NPE problem does not happen in 5.x and runs without and issues in 5.x Is this a bug in Drools 6.0? Below is my simple rule: rule rule