Drools expert doc has a first chapter that adresses these questions (section 1.2), or at least the questions that must be asked at start of a project.
It covers in details the main key question : rules or not ? Using rules implies more constraints on IT because you allow more freedom in business logic part, so you need a more robust IT code.

Best pratices are then edicted by the architect, this last one having in mind the requirements of :
    - business users (most important as they specify rules, at least some representatives samples),
    - the people who will write the rules (very very important if they are the business users, who are not IT guys, which to me forbid the usage of salience or groups or functions ...)
    - the other IT guys that will provide data streams to your new application, or who will call your app (it can bring constraints because of data volumetry by instance)

In fact, you can't start a real rule project without having enough material in specifications, but this is also true for any project.
So there is no (in my opinion) "global best pratices" (as there is no global best pratices for a random IT project...), with eventually an exception for no-loop (its usage generally shows a lack of design, again, it is my opinion, and I already used them anyway...).
Once again, as Davide said, it depends of the usage. So it seems barely impossible to edit (and keep up to date) such a section with all potential use-cases ...

May be create a rule application that deduce best pratices  ;)  ?


De: "Patrik Dufresne" <ikus060@gmail.com>
À: "Rules Users List" <rules-users@lists.jboss.org>
Envoyé: Jeudi 29 Mars 2012 15:20:21
Objet: Re: [rules-users] In drools what is the exact difference between Insert and Update ??

Sorry to disrupt your discussion,

I've start using Drools a while ago and I find your discussion very interesting about how to use what feature when and why. The current Drools Expert user guide is very nice, but it miss this crucial information. May I suggest to create a 'Best Practice' chapter with the recommendation you made.

Patrik Dufresne


On Thu, Mar 29, 2012 at 8:21 AM, Vincent LEGENDRE <vincent.legendre@eurodecision.com> wrote:
Far much valuable reply than mine  :)
A great summary of common concerns that must be evaluated before starting coding a rule system.

Also consider :
  - using rule flow (if you are allowed to)
  - use sequential mode and pipe your data 'in the next rule box' programmatically (using rules?)
  - ask your architect ? He is true for no-loop, but for others, re-writing existing DRL code that used all that stuff, and throw all at once is farly more dangerous ...

>> "remove all salience from rules and make  the rules independent (don't decide its execution flow)"

This is all the question.
It mainly depends of the usage, as Davide said.
It also depends of who is authoring/specifying rules : if the guy supposes some flow, he is not writing independant rules ...

these other rules depend of the first :
   2.no drools functions
   3.Activation group / ruleflow / salience ...
   5.don't call any java function (thus no functions at all, no predicates/utils methods, only DSL? only POJO?).

this one is suspect ...
   4.Don't use UPDATE and Global in drools .
_______________________________________________
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