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();
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
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
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() {
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
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(
# 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
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
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