[rules-users] Does this work - create new facts in session and add to other facts?

Thomas Adler thomas.adler at live.com
Sat Feb 19 18:29:46 EST 2011


Hi,

I am trying to use Drools and I would like to check whether such scenario could work:
I have facts Document and Line (EJB3 beans, in fact). And Document class has attribute:
List<Line> lines

So - I would like to pass to stateless session a Document instance "document" and I would like to write rule, that
1) create some new Lines;
2) calculates total from lines;
3) updates document.total;
4) add new Lines instances, that where created during the rule execution to document.lines;
And at the end of execution of this session I will like to do some other things with document and document.lines, e.g. persist in database.

So - can Drools handle such create of associations during the session execution?

Thanks!
Thomas  
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110220/882bef00/attachment.html 


More information about the rules-users mailing list