There’s technically no real difference between them, a stateless session just has a thin wrapper around it to call dispose automatically.

That said I’d recommend going for the stateful session, that way you can split up your operations easier, inserting the data, firing the rules, and then using queries to get the data out – and depending on your requirements it’s much easier to write logic to fetch multiple bits of information out.  Depending on how your application and log will work it also means you can keep the session around and go through multiple steps of changing data and refiring the rules rather than starting from scratch each time.

 

Thomas

 

From: rules-users-bounces@lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Rob Fisher
Sent: 24 August 2011 20:40
To: rules-users@lists.jboss.org
Subject: [rules-users] Stateless vs Stateful

 

We have a batch application that will have 50 – 60 rule sets, comprised of 5 – 75 rules each.  We’ll run a group of individuals through the rules and potentially qualify them for various awards.   We’ll insert 10 facts, each containing a unique set of attributes which will be used in the rule sets to determine potential qualification.  The batch process will insert one individual’s data (10 facts) at a time, fire the rules, and return the results.  The data on the objects inserted will remain static.

 

Also, in the future, we’d like to integrate the rule sets with a ‘what if’ web application, wherein the individual can modify the input data, fire the rules, and see the results.

 

Given this, can you recommend whether a Stateful or Stateless knowledge session is more appropriate than the other?  Is one more appropriate for a batch vs online application?

 

Thanks

Rob

 

 

 




**************************************************************************************
This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmaster@nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary.

NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00
**************************************************************************************