[rules-users] modify and update is not working in the rule file

Rana ven12344 at yahoo.com
Wed Aug 15 15:14:13 EDT 2012


Please let me know what is the problem in this. It does not update the values
when I get the values, it gives me null in my unit test method.


rule "Drug Strength" extends "Provider State"
	no-loop true
	dialect "mvel"
	agenda-group "AndroGel"
	when
		Drug( $drug.getStrength == "20.25 mg/1.25 gram (1.62 %)" )
		$p : Program()
	then
		#drools.getWorkingMemory().setGlobal("boolDrugStrength", true )
		modify( $p) {
			setProgramId( "610.contentId at samplemd.com" ),
			setProgramName( "AndroGel 1.62% Savings Card" )
		};
		update( $p )
		#retract( $p )
		#retract( $drug )
		log.info("Prgram ID and Program Name is set for program Coupon for
Androgel");
		#drools.halt();
end


Thanks.



--
View this message in context: http://drools.46999.n3.nabble.com/modify-and-update-is-not-working-in-the-rule-file-tp4019158.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list