[rules-users] What's wrong with the connectives?

vanshi nilu.thakur at gmail.com
Tue Nov 18 19:25:46 EST 2008


Hi all,

Can somebody help me here?? I've a business rule presented in bold here that
I've put in the DRL file in the simplest form but compilation of rule is
generating this error "line 6:342 required (...)+ loop did not match
anything at character ' '"
And any set of value is getting evaluated to TRUE.....that means rule
validation is not happening.....I understand that I can use helper function
in java classes and call them in the rule but wanted to know how can I do
the same entirely in DRL file OR what's wrong with this. I've spent entire
day to figure out but completely clueless and afraid to try function
approach due to project deadline. Plz help.

pers: Person(sourceType == 'Insurance' && (age != null  && > 17) &&
((cholesterol !=null && >= 200) || (hdlCholesterol !=null && < 60) ||
(cholesterolToHdlRation !=null && > 4.5) ||
		 (ldlCholesterol !=null &&  >160) || (vldl !=null && > 40) ||
(triglyceride !=null &&  > 50) || (glucose !=null &&  >130) || (bmi !=null
&& >=25)  ||
		  (bodyFat > 0. 25 &&  sbjGdrCd !=null &&  == 'F'  &&  age !=null && > 17
&& < 40) ||
		  (bodyFat > 0.30 && sbjGdrCd !=null &&  == 'F' && age !=null && > 39 && <
60) || 
		  (bodyFat > 0.31) && sbjGdrCd !=null && == 'F' && age !=null && age > 60)
||
		  (bodyFat > 0.19 && sbjGdrCd !=null &&  == 'M' &&  age !=null && >17 && <
40) ||
		  (bodyFat > 0.23 && sbjGdrCd !=null && == 'M' && age !=null && age > 39 <
60) ||
		  (bodyFat > 0.24  && sbjGdrCd !=null && == 'M'  && age !=null && >=60)))
		 
	 	//Age>=18 AND Total Cholesterol >=200 OR HDL <60 OR Cholesterol Ratio
>4.5 OR LDL >160 OR VLDL >40 OR Triglycerides >150 OR Glucose >130 OR BMI
>=25 OR Body Fat % greater than the range of  14% and 25% when gender = F
and age between or equal to 18 and 39 OR Body Fate % greater than the range
of  18% and 30% when gender = F and age between or equal to 40 and 59 OR
Body Fat % greater than the range of  21% and 31% when gender = F and age
>60 OR Body Fat % greater than the range of  7% and 19% when gender = M and
age between or equal to 18 and 39 OR Body Fat % greater than the range of 
14% and 23% when gender = M and age between or equal to 40 and 59 OR Body
Fat % greater than the range of  15% and 24% when gender = M and age >60
-- 
View this message in context: http://www.nabble.com/What%27s-wrong-with-the-connectives--tp20571531p20571531.html
Sent from the drools - user mailing list archive at Nabble.com.




More information about the rules-users mailing list