[rules-users] How do I assign a value to a variable using a method call.

samd sdoyle_2 at yahoo.com
Tue Aug 12 13:16:44 EDT 2008


Hello,

I'm very new to drools and am trying to do something like the following:

rule "test"

	when
		$x: X( );
		$y: Y( ) from someAction.getY( x.getId() );
		eval( hasSomethingChanged( $x, $y ) );
	then
		$x.warnSombody("some message");
end

The problem is when I load the rule it gives me an error when it hits the
from line.

   [testng] FAILED CONFIGURATION: @BeforeClass setUp("/test.drl")
   [testng] org.drools.rule.InvalidRulePackage: Unable to build expression
for 'from' node 'someAction.getY( x.getId() )' : [Rule name=test,
agendaGroup=MA
IN, salience=0, no-loop=false]

I'm a bit stuck on this so any help would be great. 
-- 
View this message in context: http://www.nabble.com/How-do-I-assign-a-value-to-a-variable-using-a-method-call.-tp18937488p18937488.html
Sent from the drools - user mailing list archive at Nabble.com.




More information about the rules-users mailing list