[rules-users] Use of helper class to simulate "accumulate"

Jeevan Tambuluri jeevan_tambuluri at symantec.com
Tue Feb 6 18:20:59 EST 2007


Hello all,

I have been told that you could implement a helper class to simulate 
"accumulate" command in drools. Could you please ealborate on how to do 
this? Some code snippet to illustrate this would be very much appreciated.

My problem is as follows.I have two types of facts - Tree and Branch.  
Each Branch object has a reference to the Tree object it belongs to. I 
want to write a rule: The number of  branches in a tree must not exceed 
100. I guess this would be easy to write with "accumulate" command, 
which is not yet available in 3.0.x.

Thanks

Jeevan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20070206/5b895bad/attachment.html 


More information about the rules-users mailing list