[rules-users] toString

Mike D mike.dalaker at kewill.com
Fri Jul 6 16:18:42 EDT 2007


Good morning.  I'm new to Drools and need a little assistance on how to
compare a string to a numeric.

Example:

ShipmentHeader transMode is a numeric, while the TransMode is a character. 
(We have a legacy system which we can't change... for now).  Is there an
easy way to do it w/o having to run an eval?


rule "00310 Fail"
	when
		#conditions
		$status : SendToCustomsStatus()
		exists ValidationReference(validationNo == 310)	
		exists ValidationControl(validationNo == 310)	
		exists ShipmentHeader(portLading == 0,$transMode : transMode)
 		TransMode(transMode == $transMode, portLadingRequired == "Y") 
	then 
		#actions	
		$status.fail(310);
end


Thanks,
Mike
-- 
View this message in context: http://www.nabble.com/toString-tf4029720.html#a11446453
Sent from the drools - user mailing list archive at Nabble.com.




More information about the rules-users mailing list