This is an automated email from the ASF dual-hosted git repository.

tkobayas pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-kie-docs.git


The following commit(s) were added to refs/heads/main by this push:
     new 19960fde0 [incubator-kie#7133] Update drools docs about sequential 
mode (#4600)
19960fde0 is described below

commit 19960fde00d130e2498b6d09bae0a5ce345f1449
Author: Toshiya Kobayashi <[email protected]>
AuthorDate: Mon Sep 28 18:07:30 2026 +0900

    [incubator-kie#7133] Update drools docs about sequential mode (#4600)
---
 .../rule-engine/_phreak-sequential-mode-con.adoc   | 32 ++++------------------
 1 file changed, 5 insertions(+), 27 deletions(-)

diff --git 
a/drools-docs/src/modules/ROOT/pages/rule-engine/_phreak-sequential-mode-con.adoc
 
b/drools-docs/src/modules/ROOT/pages/rule-engine/_phreak-sequential-mode-con.adoc
index 388a93dc1..55ec41a1c 100644
--- 
a/drools-docs/src/modules/ROOT/pages/rule-engine/_phreak-sequential-mode-con.adoc
+++ 
b/drools-docs/src/modules/ROOT/pages/rule-engine/_phreak-sequential-mode-con.adoc
@@ -50,35 +50,13 @@ KieBase kieBase = kieContainer.newKieBase(kieBaseConf);
 </kmodule>
 ----
 
-To configure sequential mode to use a dynamic agenda, use one of the following 
options:
-
-* Set the system property `drools.sequential.agenda` to `dynamic`.
-* Set the sequential agenda option while creating the KIE base 
programmatically:
-+
-[source,java]
-----
-KieServices ks = KieServices.Factory.get();
-KieBaseConfiguration kieBaseConf = ks.newKieBaseConfiguration();
-kieBaseConf.setOption(SequentialAgendaOption.DYNAMIC);
-KieBase kieBase = kieContainer.newKieBase(kieBaseConf);
-----
-
 When you enable sequential mode, the {RULE_ENGINE} evaluates rules in the 
following way:
 
 . Rules are ordered by salience and position in the rule set.
-. An element for each possible rule match is created. The element position 
indicates the execution order.
-. Node memory is disabled, with the exception of the right-input object memory.
-. The left-input adapter node propagation is disconnected and the object with 
the node is referenced in a `Command` object. The `Command` object is added to 
a list in the working memory for later execution.
-. All objects are asserted, and then the list of `Command` objects is checked 
and executed.
-. All matches that result from executing the list are added to elements based 
on the sequence number of the rule.
-. The elements that contain matches are executed in a sequence. If you set a 
maximum number of rule executions, the {RULE_ENGINE} activates no more than 
that number of rules in the agenda for execution.
-
-In sequential mode, the `LeftInputAdapterNode` node creates a `Command` object 
and adds it to a list in the working memory of the {RULE_ENGINE}. This 
`Command` object contains references to the `LeftInputAdapterNode` node and the 
propagated object. These references stop any left-input propagations at 
insertion time so that the right-input propagation never needs to attempt to 
join the left inputs. The references also avoid the need for the left-input 
memory.
-
-All nodes have their memory turned off, including the left-input tuple memory, 
but excluding the right-input object memory. After all the assertions are 
finished and the right-input memory of all the objects is populated, the 
{RULE_ENGINE} iterates over the list of `LeftInputAdatperNode` `Command` 
objects. The objects propagate down the network, attempting to join the 
right-input objects, but they are not retained in the left input.
-
-The agenda with a priority queue to schedule the tuples is replaced by an 
element for each rule. The sequence number of the `RuleTerminalNode` node 
indicates the element where to place the match. After all `Command` objects 
have finished, the elements are checked and existing matches are executed. To 
improve performance, the first and the last populated cell in the elements are 
retained.
+. The left-input tuple memory is disabled. The right-input object memory is 
retained.
+. All objects are asserted, and the right-input memory is populated.
+. Rules are evaluated and fired in order. A rule that has already fired is not 
activated again, and neither is a rule that is ordered before the last fired 
rule. An agenda group that has already been visited is not activated again. If 
you set a maximum number of rule executions, the {RULE_ENGINE} activates no 
more than that number of rules in the agenda for execution.
 
-When the network is constructed, each `RuleTerminalNode` node receives a 
sequence number based on its salience number and the order in which it was 
added to the network.
+Because the left-input tuple memory is disabled, the tuples propagate down the 
network and are joined with the right-input objects, but they are not retained 
in the left input.
 
-The right-input node memories are typically hash maps for fast object 
deletion. Because object deletions are not supported, Phreak uses an object 
list when the values of the object are not indexed. For a large number of 
objects, indexed hash maps provide a performance increase. If an object has 
only a few instances, Phreak uses an object list instead of an index.
+The right-input node memories are the same as in the default mode: Phreak uses 
indexed memories when the constraints can be indexed, and an object list 
otherwise.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to