[rules-users] column contraint + java bean

lucio at asteriski.com lucio at asteriski.com
Tue Apr 17 18:42:35 EDT 2007


i got the predicate working.

from the docs it seems that predicate is used in the indexing but the eval
is not. Is that correct?

please confirm that the column constraints cannot access nested objects.

many thanks

---------------------------------
Lucio Piccoli
Director

Asterisk-i Pty Ltd
Software Design-Develop-Deploy
www.asteriski.com



> 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