[rules-users] column contraint + java bean

Mark Proctor mproctor at codehaus.org
Tue Apr 17 00:43:53 EDT 2007


with predicate or evals, or preferably try and write your information 
relationally not nested.

Mark
lucio at asteriski.com wrote:
> 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
>
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>   




More information about the rules-users mailing list