[rules-users] column contraint + java bean

lucio at asteriski.com lucio at asteriski.com
Tue Apr 17 00:10:37 EDT 2007


hi all,

having trouble with Drools 3.x syntax.

currently using one fact in working memory that is a aggregate of many
java beans. However when using the column constraint syntax it does not
seem to allow nested getXXX on the column constraint.

I have it working using predicate but it just seems verbose.

i would like to be able to fire rule when
the table object has a player count > 0  and the Table.getDealer.getFlop()
== null

how is this done on Drools 3.x?



ie.

public class Table{

int playerCount;
Dealer dealer;
Collection players;

....
}


rule "start"
	no-loop true
	when
		table : Table( playerCount > 0 , dealerFlop :
dealer->(dealerFlop.getFlop() == null ) )
	then
		System.out.println( "start:" + table.getDealer().getFlop() );
end


many thanks

-lp





More information about the rules-users mailing list