I have two rules below; the first fails to fire for all values of photo (photo is a boolean field). The second rule give the correct behavior when photo is true and false. I am new to drools and could be wrong but this feels like a bug. Can anyone give me a reason for this behavior.
BAD RULE:
# rule values at C137, header at C132
rule "Photochromatic_137"
when
RxOrderType(product[0].lens.material.photo == true, product[0].lens.design.lensType=="SV")
then
addResult("e1",results);
System.out.println("Single Vision-Photo");
end
GOOD RULE (notice the - true &&):# rule values at C137, header at C132
rule "Photochromatic_137"
when
RxOrderType(true && product[0].lens.material.photo == true, product[0].lens.design.lensType=="SV")
then
addResult("e1",results);
System.out.println("Single Vision-Photo");
end
Creighton Kirkendall