[rules-users] Global variable in LHS

pamerida elpamm at hotmail.com
Mon Jul 18 14:09:27 EDT 2011


Hi everybody,

I would like to analyze a global value in the LHS of my rule without using
an eval, something like this:

         
        global String globalVariable;

	rule 'SI-002-NAD-6'
	salience 5000
	when
	global (globalVariable in ("X","Y")
	then
	logger.log("[SI-002-NAD-6] Debe colocar la información del propietario del
medio de transporte.");
	end

I cant use eval because it doesnt recognize the keyword "in", for example
this code would throw me an error in the validation

 global String globalVariable;

	rule 'SI-002-NAD-6'
	salience 5000
	when
	eval (globalVariable in ("X","Y")
	then
	logger.log("[SI-002-NAD-6] Debe colocar la información del propietario del
medio de transporte.");
	end

any suggestions? thanks so much for your help :)



--
View this message in context: http://drools.46999.n3.nabble.com/Global-variable-in-LHS-tp3180063p3180063.html
Sent from the Drools: User forum mailing list archive at Nabble.com.




More information about the rules-users mailing list