[rules-users] Storing temp results in eval block

cfili cfilippelli at cerner.com
Mon Aug 27 13:42:13 EDT 2007


Sure... basically using a map called "attributes" to retrieve specific
attributes on a resource.  Currently I am simply printing the value from the
eval, but I would like to be able to store it.

rule "High Memory 95%"

	when
		$mpw : Resource(type == "MemoryInfo", $physUsed :
attributes["PhysicalUsed"], $totalPhys : attributes["TotalPhysical"])
		eval((((Double)$physUsed).doubleValue() /
((Double)$totalPhys).doubleValue()) > 0.95)
	then
		System.out.println(" Percent Used: " + ((Double)$physUsed).doubleValue() /
((Double)$totalPhys).doubleValue());
end
-- 
View this message in context: http://www.nabble.com/Storing-temp-results-in-eval-block-tf4225783.html#a12354084
Sent from the drools - user mailing list archive at Nabble.com.




More information about the rules-users mailing list