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 each possible value, and then you don't have to worry about initialisation. -W On 24/12/2013, seyfullah <[email protected]> wrote: > 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 setAge(int age) { > this.age = age; > } > public boolean isValid() { > return valid; > } > public void setValid(boolean valid) { > this.valid = valid; > } > private String name; > private int age; > private boolean valid; > public Applicant(String nameP, int ageP) { > // TODO Auto-generated constructor stub > this.name = nameP; > this.age = ageP; > } > > } > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Driving-License-application-tp4027403p4027405.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > [email protected] > https://lists.jboss.org/mailman/listinfo/rules-users > _______________________________________________ rules-users mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-users
