From: <jbo...@li...> - 2006-05-02 07:34:27
|
Author: mic...@jb... Date: 2006-05-02 03:34:20 -0400 (Tue, 02 May 2006) New Revision: 4033 Modified: labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Engine/Section-Agenda.xml Log: more goodness Modified: labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Engine/Section-Agenda.xml =================================================================== --- labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Engine/Section-Agenda.xml 2006-05-02 06:13:36 UTC (rev 4032) +++ labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Engine/Section-Agenda.xml 2006-05-02 07:34:20 UTC (rev 4033) @@ -2,24 +2,71 @@ <section> <title>Agenda</title> - <para>The agenda is a RETE feature. It is an area where rules + matching - facts are kept before they are fired.</para> + <para>The agenda is a RETE feature. It is an area in memory where rules + + matching facts are kept before they are fired.</para> + <para>The engine operates in a "2 phase" mode: 1) working memory actions + (this is where most of the work takes place) and 2) agenda evaluation (where + rule actions are fired). It is important to note that this process is + recursive, in that a rule firing may cause working memory actions to occur. + When working memory actions are taking place, no rules are being fired. + </para> + + <para>The items that are placed on the agenda are called "activations" which + are a rule plus matched facts (facts that at that point in time allow the + rule to fire).</para> + + <para>The fileAllRules() method causes the agenda to be evaluated, and + eventually the activations "fired". The process recurses until the agenda is + clear, in which case control returns to the calling application.</para> + + <para>Working memory actions are assertion of new, modification of exsiting + and retraction of facts.These are all triggered from the RHS of a rule, or + in java code.</para> + <section> <title>Conflict Resultion</title> - <para></para> + <para>Conflict resolution is required when there are mutliple rules on the + agenda. As firing a rule may have side effects on working memory, the rule + engine needs to know in what order the rules should fire (for instance, + firing ruleA may cause ruleB to be removed from the agenda).</para> + + <para>Drools employes a variety of strategies here. The most visible one + is "salience" or priority, in which case a user can specify that a certain + rule has a higher priority (by giving it a higher number) then other + rules. In that case, the higher salience rule will always be + preferred.</para> + + <para>As a general rule, it is a good idea not to count on the rules + firing in any particular order, and try and author the rules without + worrying about a "flow". </para> + + <para>The conflict resolution strategies emplyed by drools are: Salience, + FIFO (first in, first out), Total Recency and Load order.</para> + + <para>If salience does not provide a resolution, the FIFO is used (items + that are in the agenda longer are preferred). Failing that totally recency + of the activation (how new the facts are) is used before reverting to the + arbitrary load order (which is nominally the order in which the rules were + declared).</para> </section> <section> <title>Agenda Groups</title> - <para></para> + <para>Agenda groups are a way to partition rules (activations, actually) + on the agenda. At any one time, only one group has "focus" which means + that the activations for rules in that group will only take effect (you + can also have rules "auto focus" which means the focus for its agenda + group it taken when that rules conditions are true).</para> </section> <section> <title>Filters</title> - <para></para> + <para>Filters are optional implementations of a the filter interface which + are used to allow/or deny an activation from firing (what you filter on, + is entirely up to the implementation).</para> </section> </section> \ No newline at end of file |