That would be one way to accomplish this. For your situation, though, I would use a stateless session since your servlets are stateless.
One of the things I'd like to see changed in drools is that, while it does complicated processing and returns complex answers very well, it's difficult to return simple answers. I would like to see methods like fireRulesReturningBoolean kind of thing, but it would require a paradigm shift in the rules themselves. Alas! Anyway, I think that's how I'd handle it. I also construct wrappers around the basic data types to receive these answers. I wish Sun would implement the bean interface for Integer, Long, Character, String, etc. It would certainly be simple enough for them to do, and then we could just use those to hold the values coming back from our rules. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Stelarinc Sent: Thursday, May 08, 2008 6:03 AM To: rules-users@lists.jboss.org Subject: [rules-users] Help in using drools Hi, I would like to use drools in my application. However, there are a few things that I do not quite understand and whether it can fit my requirements. I have tried to search through the documentation and mailing list, but to no avail. Here is my situation. I am creating a web-based application which requires me to run certain rules for certain page. What I need is to pass all the information accumulated from the pages and pass it through a rule engine. Each rule will check the information and return string message(s) to the caller. Does drools fit in this requirements? >From what I understand, I can create a stateful session, passing the information to the rule engine. But when I need to return the result, how do I do that? Do I pass an empty String List into the rule engine, and each rule will add the message to the List if there is an error? Thank you. Regards, Leonard Soetedjo ____________________________________________________________________________ ________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ _______________________________________________ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users _______________________________________________ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users