[jboss-svn-commits] JBL Code SVN: r13748 - in labs/jbossrules/trunk/documentation/manual: en/Chapter-Examples and 1 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Mon Jul 23 23:50:31 EDT 2007


Author: mark.proctor at jboss.com
Date: 2007-07-23 23:50:31 -0400 (Mon, 23 Jul 2007)
New Revision: 13748

Modified:
   labs/jbossrules/trunk/documentation/manual/
   labs/jbossrules/trunk/documentation/manual/en/Chapter-Examples/Section-Examples.xml
   labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Engine/Section-The_Drools_Rule_Engine.xml
   labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Engine/Two_Phase.png
   labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Engine/Two_Phase.svg
   labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Engine/Two_Phase.vsd
Log:
-updated docs


Property changes on: labs/jbossrules/trunk/documentation/manual
___________________________________________________________________
Name: svn:ignore
   + build


Modified: labs/jbossrules/trunk/documentation/manual/en/Chapter-Examples/Section-Examples.xml
===================================================================
--- labs/jbossrules/trunk/documentation/manual/en/Chapter-Examples/Section-Examples.xml	2007-07-24 03:47:46 UTC (rev 13747)
+++ labs/jbossrules/trunk/documentation/manual/en/Chapter-Examples/Section-Examples.xml	2007-07-24 03:50:31 UTC (rev 13748)
@@ -2,21 +2,13 @@
 <section>
   <title>Getting the examples</title>
 
-  <para>Some examples are included as "integration tests" in the Drools source
-  code - specifically the drools-compiler module. On top of these, you can
-  download the drools-examples module; which is a self contained Eclipse
-  project. This module is always having more samples added to it by users. The
-  example project in eclipse requires that you have the plugin instilled: load
-  up the drools-examples project (it has an eclipse project already setup).
-  The rules all have example classes that execute the rules. If you want to
-  try the examples in another project (or another IDE) then you will need to
-  setup the dependencies by hand of course.</para>
+  <para>Download the drools-examples zip; which is a self contained Eclipse
+  project. The example project in eclipse requires that you have the plugin
+  instilled: import the drools-examples project (it has an eclipse project
+  already setup). The rules all have example classes that execute the rules.
+  If you want to try the examples in another project (or another IDE) then you
+  will need to setup the dependencies by hand of course.</para>
 
-  <para>The examples can be found at
-  http://anonsvn.labs.jboss.com/labs/jbossrules/trunk/drools-examples/ (you
-  can browse online, or use a subversion client and download the project into
-  Eclipse</para>
-
   <para>Future documentation will include walk throughs for each of the
   examples.</para>
 
@@ -51,18 +43,24 @@
   </section>
 
   <section>
-    <title>PricingRuleDTExample</title>
+    <title>Pricing Rule DT Example</title>
 
     <para></para>
   </section>
 
   <section>
-    <title>Honest Politician</title>
+    <title>Shopping Example</title>
 
     <para></para>
   </section>
 
   <section>
+    <title>Honest Politician Example</title>
+
+    <para></para>
+  </section>
+
+  <section>
     <title>Conways Game of Life</title>
 
     <para></para>

Modified: labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Engine/Section-The_Drools_Rule_Engine.xml
===================================================================
--- labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Engine/Section-The_Drools_Rule_Engine.xml	2007-07-24 03:47:46 UTC (rev 13747)
+++ labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Engine/Section-The_Drools_Rule_Engine.xml	2007-07-24 03:50:31 UTC (rev 13748)
@@ -88,14 +88,11 @@
     <example>
       <title>Building a Package from Multiple Sources</title>
 
-      <programlisting>
-      
-PackageBuilder builder = new PackageBuilder();
+      <programlisting>PackageBuilder builder = new PackageBuilder();
 builder.addPackageFromDrl( new InputStreamReader( getClass().getResourceAsStream( "package1.drl" ) ) );
 builder.addPackageFromXml( new InputStreamReader( getClass().getResourceAsStream( "package2.xml" ) ) );
 builder.addRuleFlow( new InputStreamReader( getClass().getResourceAsStream( "ruleflow.rfm" ) ) );
-Package pkg = builder.getPackage();
-      </programlisting>
+Package pkg = builder.getPackage();      </programlisting>
     </example>
 
     <para>It is essential that you always check your PackageBuilder for errors
@@ -108,14 +105,9 @@
     <example>
       <title>Checking the PackageBuilder for errors</title>
 
-      <programlisting>
-      
-PackageBuilder builder = new PackageBuilder();
+      <programlisting>PackageBuilder builder = new PackageBuilder();
 builder.addPackageFromDrl( new InputStreamReader( getClass().getResourceAsStream( "package1.drl" ) ) );
-PackageBuilderErrors errors = builder.getErrors();
-
-              
-      </programlisting>
+PackageBuilderErrors errors = builder.getErrors();</programlisting>
     </example>
 
     <para>PackagBuilder is configurable using PackageBuilderConfiguration
@@ -221,13 +213,9 @@
       <title>Configuring the PackageBuilder to use JANINO via a
       property</title>
 
-      <programlisting>
-      
-PackageBuilderConfiguration conf = new PackageBuilderConfiguration();
+      <programlisting>PackageBuilderConfiguration conf = new PackageBuilderConfiguration();
 conf.setCompiler( PackageBuilderConfiguration.JANINO );
-PackageBuilder builder = new PackageBuilder( conf );
-      
-      </programlisting>
+PackageBuilder builder = new PackageBuilder( conf );</programlisting>
     </example>
 
     <para>The MVELDialectConfiguration is much simpler and only allows strict
@@ -256,105 +244,92 @@
     <title>RuleBase</title>
 
     <figure>
-      <title>RuleBase</title>
+      <title>RuleBaseFactory</title>
 
       <mediaobject>
         <imageobject>
-          <imagedata align="center" fileref="RuleBase.svg" format="SVG" />
+          <imagedata align="center" fileref="RuleBaseFactory.svg" format="SVG" />
         </imageobject>
 
         <imageobject>
-          <imagedata align="center" fileref="RuleBase.png" format="PNG" />
+          <imagedata align="center" fileref="RuleBaseFactory.png" format="PNG" />
         </imageobject>
       </mediaobject>
     </figure>
 
-    <para>A RuleBase contains one more more packages of rules, ready to be
-    used, i.e., they have been validated/compiled etc. A Rule Base is
-    serializable so it can be deployed to JNDI or other such services.
-    Typically, a rulebase would be generated and cached on first use; to save
-    on the continually re-generation of the Rule Base; which is expensive. A
-    RuleBase is instantiated using the RuleBaseFactory, by default this
-    returns a ReteOO RuleBase. Packages are added, in turn, using the
+    <para> A RuleBase is instantiated using the RuleBaseFactory, by default
+    this returns a ReteOO RuleBase. Packages are added, in turn, using the
     addPackage method. You may specify packages of any namespace and multiple
     packages of the same namespace may be added.</para>
 
+    <example>
+      <title>Adding a Package to a new RuleBase</title>
+
+      <programlisting>RuleBase ruleBase  = RuleBaseFactory.newRuleBase();
+ruleBase.addPackage( pkg  );        </programlisting>
+    </example>
+
     <figure>
-      <title>RuleBaseFactory</title>
+      <title>RuleBase</title>
 
       <mediaobject>
         <imageobject>
-          <imagedata align="center" fileref="RuleBaseFactory.svg" format="SVG" />
+          <imagedata align="center" fileref="RuleBase.svg" format="SVG" />
         </imageobject>
 
         <imageobject>
-          <imagedata align="center" fileref="RuleBaseFactory.png" format="PNG" />
+          <imagedata align="center" fileref="RuleBase.png" format="PNG" />
         </imageobject>
       </mediaobject>
     </figure>
 
-    <example>
-      <title>Adding a Package to a new RuleBase</title>
+    <para>A RuleBase contains one or more more packages of rules, ready to be
+    used, i.e., they have been validated/compiled etc. A Rule Base is
+    serializable so it can be deployed to JNDI or other such services.
+    Typically, a rulebase would be generated and cached on first use; to save
+    on the continually re-generation of the Rule Base; which is
+    expensive.</para>
 
-      <programlisting>RuleBase ruleBase  = RuleBaseFactory.newRuleBase();
-ruleBase.addPackage( pkg  );        </programlisting>
-    </example>
-
     <para>A Rule Base instance is threadsafe, in the sense that you can have
     the one instance shared across threads in your application, which may be a
     web application, for instance. The most common operation on a rulebase is
-    to create a new WorkingMemory.</para>
+    to create a new rule session; either stateful or stateless.</para>
 
-    <para>The Rule Base also holds weak references to any working memories
-    that it has spawned, so that if rules are changing (or being added/removed
-    etc. for long running working memories), they can be updated with the
-    latest rules (without necessarily having to restart the working memory).
-    You can specify not to maintain a weak reference, but only do so if you
-    know the Rule Base will not be updated.</para>
+    <para>The Rule Base also holds references to any stateful session that it
+    has spawned, so that if rules are changing (or being added/removed etc.
+    for long running sessions), they can be updated with the latest rules
+    (without necessarily having to restart the session). You can specify not
+    to maintain a reference, but only do so if you know the Rule Base will not
+    be updated. References are not stored for stateless sessions.</para>
 
-    <programlisting>
-    
-ruleBase.newWorkingMemory();  // maintains a weak reference.
-ruleBase.newWorkingMemory( false ); // do not maintain a weak reference
-      
-    </programlisting>
+    <programlisting>ruleBase.newStatefulSession();  // maintains a reference.
+ruleBase.newStatefulSession( false ); // do not maintain a reference    </programlisting>
 
     <para>Packages can be added and removed at any time - all changes will be
-    propagated to the existing Working Memories; don't forget to call
+    propagated to the existing stateful sessions; don't forget to call
     fireAllRules() for resulting Activations to fire.</para>
 
-    <programlisting>
-          
-ruleBase.addPackage( pkg );  // Add a package instance
+    <programlisting>ruleBase.addPackage( pkg );  // Add a package instance
 ruleBase.removePackage( "org.com.sample" );  // remove a package, and all its parts, by it's namespace
-ruleBase.removeRule( "org.com.sample", "my rule" ); // remove a specific rule from a namespace
-      
-    </programlisting>
+ruleBase.removeRule( "org.com.sample", "my rule" ); // remove a specific rule from a namespace         </programlisting>
 
     <para>While there is a method to remove an indivual rule, there is no
-    method to add an individual rule - to achieve this just add a new packge
+    method to add an individual rule - to achieve this just add a new package
     with a single rule in it.</para>
 
     <para>RuleBaseConfigurator can be used to specify additional behaviour of
     the RuleBase. RuleBaseConfiguration is set to immutable after it has been
-    added to a Rule Base.</para>
+    added to a Rule Base. Nearly all the engine optimisations can be turned on
+    and off from here, and also the execution behviour can be set. Users will
+    generally be concerned with insertion behaviour (identity or equality) and
+    cross product bheaviour(remove or keep identity equals cross
+    products).</para>
 
-    <programlisting>
-    
-RuleBaseConfiguration conf = new RuleBaseConfiguration();
+    <programlisting>RuleBaseConfiguration conf = new RuleBaseConfiguration();
+conf.setAssertBehaviour( AssertBehaviour.IDENTITY );
+conf.setRemoveIdentities( true );
+RuleBase ruleBase = RuleBaseFactory.newRuleBase( conf );</programlisting>
 
-conf.setProperty( RuleBaseConfiguration.PROPERTY_ASSERT_BEHAVIOR,
-                  RuleBaseConfiguration..WM_BEHAVIOR_EQUALITY );
-
-RuleBase ruleBase = new ReteooRuleBase( conf );
-    
-    </programlisting>
-
-    <para>The two main properties to be aware of are PROPERT_ASSERT_BEHAVIOR
-    and PROPERTY_LOGICAL_OVERRIDE_BEHAVIOR, which are explain more in later
-    sections. All properties and their values are public static field
-    constants on RuleBaseConfiguration.</para>
-
     <figure>
       <title>RuleBaseConfiguration</title>
 
@@ -373,14 +348,14 @@
   </section>
 
   <section>
-    <title>WorkingMemory</title>
+    <title>WorkingMemory and Stateful/Stateless Sessions</title>
 
     <figure>
       <title>WorkingMemory</title>
 
       <mediaobject>
         <imageobject>
-          <imagedata align="center" fileref="WorkingMemory.svg" format="SVG" />
+          <imagedata align="center" fileref="StatefulSession.svg" format="SVG" />
         </imageobject>
 
         <imageobject>
@@ -389,26 +364,15 @@
       </mediaobject>
     </figure>
 
-    <para>The Working Memory is the main Class for using the Rule Engine at
-    runtime. It holds references to all data that has been "asserted" into it
+    <para>It holds references to all data that has been "inserted" into it
     (until retracted) and it is the place where the interaction with your
     application occurs. Working memories are stateful objects. They may be
-    shortlived or longlived. If you are interacting with an engine in a
-    stateless manner, that means you would use the RuleBase object to create a
-    newWorkingMemory for each session, and then discard the working memory
-    when finished (creating a working memory is a cheap operation). An
-    alternative pattern is a working memory that is kept around for a longer
-    time (such as a conversation) - and kept updated with new facts. When you
-    wish to dispose of WorkingMemory the best pactice is to use the dispose()
-    method, so that the reference to it is removed in the parent Rule Base.
-    However, this is a weak reference, so it should eventually be garbage
-    collected anyway. The term Working Memory Action is used to describe
-    assertions, retractions and modifications with the Working Memory.</para>
+    shortlived or longlived. </para>
 
     <section>
       <title>Facts</title>
 
-      <para>Facts are objects (beans) from your application that you assert
+      <para>Facts are objects (beans) from your application that you insert
       into the working memory. Facts are any Java objects which the rules can
       access. The rule engine does not "clone" facts at all, it is all
       references/pointers at the end of the day. Facts are your applications
@@ -419,33 +383,32 @@
     </section>
 
     <section>
-      <title>Assertion</title>
+      <title>Insertion</title>
 
-      <para>"Assertion" is the act of telling the working memory about the
-      facts. WorkingMemory.assertObject(yourObject) for example. When you
-      assert a fact, it is examined for matches against the rules etc. This
-      means ALL of the work is done during assertion; however, no rules are
-      executed until you call "fireAllRules()". You don't call
-      "fireAllRules()" until after you have finished asserting your facts.
-      This is a common misunderstanding by people who think the work happens
-      when you call "fireAllRules()".</para>
+      <para>"Insert" is the act of telling the WorkingMemory about the facts.
+      WorkingMemory.insert(yourObject) for example. When you insert a fact, it
+      is examined for matches against the rules etc. This means ALL of the
+      work is done during insertion; however, no rules are executed until you
+      call "fireAllRules()". You don't call "fireAllRules()" until after you
+      have finished inserting your facts. This is a common misunderstanding by
+      people who think the work happens when you call "fireAllRules()". Expert
+      systems typically use the term "assert" or "assertion" to refer to facts
+      made available to the system, however due to the assert become a keyword
+      in most languages we have moved to use the "Insert" keyword; so expect
+      to hear the two used interchangeably.</para>
 
       <!-- FIXME - I think we might want to add this sentence to the previous paragraph.
         However, when the rules are executed, they can assert new objects 
         thus causing new work to be needed. 
       -->
 
-      <para>When an Object is asserted it returns a FactHandle. This
-      FactHandle is the token used to represent your asserted Object inside
-      the WorkingMemory, it is also how you will interact with the Working
-      Memory when you wish to retract or modify an object.</para>
+      <para>When an Object is insert it returns a FactHandle. This FactHandle
+      is the token used to represent your insert Object inside the
+      WorkingMemory, it is also how you will interact with the Working Memory
+      when you wish to retract or modify an object.</para>
 
-      <programlisting>
-      
-Cheese stilton = new Cheese("stilton");
-FactHandle stiltonHandle = workingMemory.assertObject( stilton );
-      
-      </programlisting>
+      <programlisting>Cheese stilton = new Cheese("stilton");
+FactHandle stiltonHandle = session.insert( stilton );      </programlisting>
 
       <para>As mentioned in the Rule Base section a Working Memory may operate
       in two assertions modes equality and identity - identity is
@@ -454,7 +417,7 @@
       <para>Identity means the Working Memory uses an IdentityHashMap to store
       all asserted Objects. New instance assertions always result in the
       return of a new FactHandle, if an instance is asserted twice then it
-      returns the previous fact handle – i.e. it ignores the second assertion
+      returns the previous fact handle – i.e. it ignores the second insertion
       for the same fact.</para>
 
       <para>Equality means the Working Memory uses a HashMap to store all
@@ -473,103 +436,56 @@
       (see the 'not' and 'exist' keywords). Retraction is done using the
       FactHandle that was returned during the assert.</para>
 
-      <programlisting>
-      
-Cheese stilton = new Cheese("stilton");
-FactHandle stiltonHandle = workingMemory.assertObject( stilton );
+      <programlisting>Cheese stilton = new Cheese("stilton");
+FactHandle stiltonHandle = session.insert( stilton );
 ....
-workingMemory.retractObject( stiltonHandle );
-      
-      </programlisting>
+session.retract( stiltonHandle );            </programlisting>
     </section>
 
     <section>
-      <title>Modification</title>
+      <title>Update</title>
 
       <para>The Rule Engine must be notified of modified Facts, so that it can
       be re-process. Modification internally is actually a retract and then an
-      assert; so it clears the WorkingMemory and then starts again. Use the
+      insert; so it clears the WorkingMemory and then starts again. Use the
       modifyObject method to notify the Working Memory of changed objects, for
       objects that are not able to notify the Working Memory themselves.
       Notice modifyObject always takes the modified object as a second
       parameter - this allows you to specify new instances for immutable
-      objects.</para>
+      objects. The update() method can only be used with objects that have
+      shadow proxies turned on. If you do not use shadow proxies then you must
+      call session.modifyRestract() before making your changes and
+      session.modifyInsert() after the changes.</para>
 
-      <programlisting>
-        
-Cheese stilton = new Cheese("stilton");
-FactHandle stiltonHandle = workingMemory.assertObject( stilton );
+      <programlisting>Cheese stilton = new Cheese("stilton");
+FactHandle stiltonHandle = workingMemory.insert( stilton );
 ....
 stilton.setPrice( 100 );
-workingMemory.modifyObject( stiltonHandle, stilton );
-        
-      </programlisting>
+workingMemory.update( stiltonHandle, stilton );              </programlisting>
     </section>
 
     <section>
-      <title>Property Change Listener</title>
-
-      <para>If your fact objects are Java Beans, you can implement a property
-      change listener for them, and then tell the rule engine about it. This
-      means that the engine will automatically know when a fact has changed,
-      and behave accordingly (you don't need to tell it that it is modified).
-      There are proxy libraries that can help automate this (a future version
-      of drools will bundle some to make it easier). To use the Object in
-      dynamic mode specify true for the second assertObject parameter.</para>
-
-      <programlisting>
-              
-Cheese stilton = new Cheese("stilton");
-FactHandle stiltonHandle = workingMemory.assertObject( stilton, true );  //specifies that this is a dynamic fact
-      
-      </programlisting>
-
-      <para>To make a JavaBean dynamic add a PropertyChangeSupport field
-      memory along with two add/remove mothods and make sure that each setter
-      notifies the PropertyChangeSupport instance of the change.</para>
-
-      <programlisting>
-      
-private final PropertyChangeSupport changes = new PropertyChangeSupport( this );
-...
-public void addPropertyChangeListener(final PropertyChangeListener l) {
-    this.changes.addPropertyChangeListener( l );
-}
-
-public void removePropertyChangeListener(final PropertyChangeListener l) {
-    this.changes.removePropertyChangeListener( l );
-}
-...
-
-public void setState(final String newState) {
-    String oldState = this.state;
-    this.state = newState;
-    this.changes.firePropertyChange( "state",
-                                      oldState,
-                                      newState );
-}
-        
-      </programlisting>
-    </section>
-
-    <section>
       <title>Globals</title>
 
       <para>Globals are named objects that can be passed in to the rule
-      engine; without needing to assert them. Most often these are used for
+      engine; without needing to insert them. Most often these are used for
       static information, or services that are used in the RHS of a rule, or
-      perhaps a means to return objects from the rule engine.</para>
+      perhaps a means to return objects from the rule engine. If you use a
+      global on the LHS of a rule, make sure it is immutable. A global must
+      first be declared in the drl before it can be set on the session.</para>
 
-      <programlisting>
-      
-new List list = new ArrayList;
-workingMemory.setGlobal("list", list);
-      
-      </programlisting>
+      <programlisting>global java.util.List list        </programlisting>
 
-      <para>The global definition must be defined in the Rule Base and of the
-      same type, otherwise a runtime exception will be thrown. If a rule
-      evaluates on a global before you set it you will get a
+      <para>With the Rule Base now aware of the global identifier and its type
+      any sessions are now able to call session.setGlobal; failure to declare
+      the global type and identifier first will result in an exception being
+      thrown. to set the global on the session use
+      session.setGlobal(identifier, value);</para>
+
+      <programlisting>new List list = new ArrayList;
+session.setGlobal("list", list);           </programlisting>
+
+      <para>f a rule evaluates on a global before you set it you will get a
       NullPointerException.</para>
     </section>
 
@@ -607,6 +523,44 @@
     </section>
 
     <section>
+      <title>Property Change Listener</title>
+
+      <para>If your fact objects are Java Beans, you can implement a property
+      change listener for them, and then tell the rule engine about it. This
+      means that the engine will automatically know when a fact has changed,
+      and behave accordingly (you don't need to tell it that it is modified).
+      There are proxy libraries that can help automate this (a future version
+      of drools will bundle some to make it easier). To use the Object in
+      dynamic mode specify true for the second assertObject parameter.</para>
+
+      <programlisting>Cheese stilton = new Cheese("stilton");
+FactHandle stiltonHandle = workingMemory.insert( stilton, true );  //specifies that this is a dynamic fact            </programlisting>
+
+      <para>To make a JavaBean dynamic add a PropertyChangeSupport field
+      memory along with two add/remove mothods and make sure that each setter
+      notifies the PropertyChangeSupport instance of the change.</para>
+
+      <programlisting>private final PropertyChangeSupport changes = new PropertyChangeSupport( this );
+...
+public void addPropertyChangeListener(final PropertyChangeListener l) {
+    this.changes.addPropertyChangeListener( l );
+}
+
+public void removePropertyChangeListener(final PropertyChangeListener l) {
+    this.changes.removePropertyChangeListener( l );
+}
+...
+
+public void setState(final String newState) {
+    String oldState = this.state;
+    this.state = newState;
+    this.changes.firePropertyChange( "state",
+                                      oldState,
+                                      newState );
+}              </programlisting>
+    </section>
+
+    <section>
       <title>Initial Fact</title>
 
       <para>To support conditional elements like "not" (which will be covered
@@ -623,29 +577,92 @@
       Fact to propagate, possibly activating rules (otherwise, nothing would
       happen as there area no other facts to start with).</para>
     </section>
+  </section>
 
-    <section>
-      <title>Stateless and Statefull Sessions</title>
+  <section>
+    <title>StatefulSession</title>
 
-      <para>Rule engines that are based around algorithms like RETE are
-      technically stateful rule engines. That is, they work best when the RETE
-      network is longer lived, being notified of changes, and accumulating
-      facts - that is where they shine.</para>
+    <figure>
+      <title>StatefulSession</title>
 
-      <para>However, many scenarious simply require a stateless mode where all
-      the facts (data) are supplied fresh to the rule engine and then the
-      rules are invoked. Drools is fine in these scenarious as well - in fact,
-      the RETE algorithm is still of benefit as often there will be scenarios
-      in a stateless session where rules actions cause other rules to fire, or
-      where there are large numbers of facts to match with rules.</para>
+      <mediaobject>
+        <imageobject>
+          <imagedata align="center" fileref="WorkingMemory.svg" format="SVG" />
+        </imageobject>
 
-      <para>The JSR-94 API specifies statefull and stateless modes, but the
-      equivalent in the native API is to simply create a new working memory
-      instance, and then discard it when the session is finished.</para>
-    </section>
+        <imageobject>
+          <imagedata align="center" fileref="StatefulSession.png" format="PNG" />
+        </imageobject>
+      </mediaobject>
+    </figure>
+
+    <para>The StatefulSession extends the WorkingMemory class. It simply adds
+    async methods and a dispose() method.</para>
+
+    <example>
+      <title>Createing a StatefulSession</title>
+
+      <programlisting>StatefulSession session = ruleBase.newStatefulSession();</programlisting>
+    </example>
   </section>
 
   <section>
+    <title>Stateless Session</title>
+
+    <figure>
+      <title>StatelessSession</title>
+
+      <mediaobject>
+        <imageobject>
+          <imagedata align="center" fileref="StatelessSession.svg"
+                     format="SVG" />
+        </imageobject>
+
+        <imageobject>
+          <imagedata align="center" fileref="StatelessSession.png"
+                     format="PNG" />
+        </imageobject>
+      </mediaobject>
+    </figure>
+
+    <para>The StatelessSession wraps the WorkingMemory, instead of extending
+    it, its main focus is on decision service type scenarios. </para>
+
+    <example>
+      <title>Createing a StatelessSession</title>
+
+      <programlisting>StatelessSession session = ruleBase.newStatelessSession();</programlisting>
+    </example>
+
+    <para>The api is reduced for the problem domain and is thus much simpler;
+    which in turn can make maintenance of those services easier. The RuleBase
+    never retains a reference to the StatelessSession, thus dispose() is not
+    needed, and they only have an execute() method that takes an object, an
+    array of objects or a collection of objects - there is no insert or
+    fireAllRules. The execute method iterates the objects inserting each and
+    calling fireAllRules() at the end; session finished. Should the session
+    need access to any results information they can use the executeWithResults
+    method, which returns a StatelessSessionResult. The reason for this is in
+    remoting situations you do not always want the return payload, so this way
+    its optional.</para>
+
+    <para>setAgendaFilter, setGlobal and setGlobalResolver share their state
+    across sessions; so each call to execute() will use the set AgendaFilter,
+    or see any previous set globals etc.</para>
+
+    <para>StatelessSessions do not currently support
+    propertyChangeLissteners.</para>
+
+    <para>Async versions of the Execute method are supported, remember to
+    override the ExecutorService implementation when in special managed thread
+    environments such as JEE.</para>
+
+    <para>StatelessSessions also support sequential mode, which is a special
+    optimised mode that uses less memory and executes faster; plesae see the
+    Sequential section for more details.</para>
+  </section>
+
+  <section>
     <title>Agenda</title>
 
     <figure>
@@ -715,8 +732,8 @@
       instance, firing ruleA may cause ruleB to be removed from the
       agenda).</para>
 
-      <para>The conflict resolution strategies emplyed by Drools are: Salience
-      and LIFO (last in, first out).</para>
+      <para>The default conflict resolution strategies emplyed by Drools are:
+      Salience and LIFO (last in, first out).</para>
 
       <para>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
@@ -729,6 +746,10 @@
       <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>Custom conflict resolution strategies can be specified by setting
+      the Class in the RuleBaseConfiguration method setConflictResolver, or
+      using the property "drools.conflictResolver".</para>
     </section>
 
     <section>
@@ -759,7 +780,7 @@
       <title>Agenda Filters</title>
 
       <figure>
-        <title>Two Phase Execution</title>
+        <title>AgendaFilters</title>
 
         <mediaobject>
           <imageobject>
@@ -789,17 +810,17 @@
         <listitem>
           <para>RuleNameStartsWithAgendaFilter</para>
         </listitem>
+
+        <listitem>
+          <para>RuleNameMatchesAgendaFilter</para>
+        </listitem>
       </itemizedlist>
 
       <para>To use a filter specify it while calling FireAllRules. The
       following example will filter out all rules ending with the text
       "Test":</para>
 
-      <programlisting>
-      
-      workingMemory.fireAllRules( new RuleNameEndsWithAgendaFilter( "Test" ) );
-      
-      </programlisting>
+      <programlisting>workingMemory.fireAllRules( new RuleNameEndsWithAgendaFilter( "Test" ) );      </programlisting>
     </section>
   </section>
 
@@ -808,24 +829,24 @@
         <primary>Logical Object</primary>
       </indexterm> Logical Objects</title>
 
-    <para>In a regular assertion, you need to explicitly retract a fact. With
+    <para>In a regular insert, you need to explicitly retract a fact. With
     logical assertions, the fact that was asserted will be automatically
     retracted when the conditions that asserted it in the first place are no
     longer true (it's actually more clever then that! If there are no possible
     conditions that could support the logical assertion, only then will it be
     retracted).</para>
 
-    <para>Normal assertions are said to be “STATED” (ie The Fact has been
+    <para>Normal insertinos are said to be “STATED” (ie The Fact has been
     stated - just like the intuitive concept). Using a HashMap and a counter
     we track how many times a particuar equality is STATED; this means we
-    count how many different instances are equal. When we logically assert an
+    count how many different instances are equal. When we logically insert an
     object we are said to justify it and it is justified by the firing rule.
-    For each logical assertion there can only be one equal object, each
-    subsequent equal logical assertion increases the justification counter for
+    For each logical insertion there can only be one equal object, each
+    subsequent equal logical insertion increases the justification counter for
     this logical assertion. As each justification is removed when we have no
     more justifications the logical object is automatically retracted.</para>
 
-    <para>If we logically assert an object when there is an equal STATED
+    <para>If we logically insert an object when there is an equal STATED
     object it will fail and return null. If we STATE an object that has an
     exist equal object that is JUSTIFIED we override the Fact - how this
     override works depends on the configuration setting
@@ -839,7 +860,7 @@
     indicates the Object was propagated through the network.</para>
 
     <figure>
-      <title>Stated Assertion</title>
+      <title>Stated Insertion</title>
 
       <mediaobject>
         <imageobject>
@@ -855,7 +876,7 @@
     </figure>
 
     <figure>
-      <title>Logical Assertion</title>
+      <title>Logical Insertion</title>
 
       <mediaobject>
         <imageobject>
@@ -890,12 +911,12 @@
       imagine there is a fact class called "SuspiciousAccount".</para>
 
       <para>Then there can be a series of rules whose job is to look for
-      things that may raise suspicion, and if they fire, they simply assert a
+      things that may raise suspicion, and if they fire, they simply insert a
       new SuspiciousAccount() instance. All the other rules just have
       conditions like "not SuspiciousAccount()" or "SuspiciousAccount()"
       depending on their needs. Note that this has the advantage of allowing
       there to be many rules around raising suspicion, without touching the
-      other rules. When the facts causing the SuspiciousAccount() assertion
+      other rules. When the facts causing the SuspiciousAccount() insertion
       are removed, the rule engine reverts back to the normal "mode" of
       operation (and for instance, a rule with "not SuspiciousAccount()" may
       kick in which flushes through any interrupted transactions).</para>
@@ -932,8 +953,9 @@
     application (and the rules) - as events are a cross cutting
     concern.</para>
 
-    <para>There are two types of event listeners - WorkingMemoryEventListener
-    and AgendEventListener.</para>
+    <para>There are three types of event listeners -
+    WorkingMemoryEventListener, AgendEventListener
+    RuleFlowEventListener.</para>
 
     <figure>
       <title>WorkingMemoryEventListener</title>
@@ -967,37 +989,160 @@
       </mediaobject>
     </figure>
 
-    <para>Both EventListeners have default implementations that implement each
+    <figure>
+      <title>RuEventListener</title>
+
+      <mediaobject>
+        <imageobject>
+          <imagedata align="center" fileref="RuleFlowEventListener.svg"
+                     format="SVG" />
+        </imageobject>
+
+        <imageobject>
+          <imagedata align="center" fileref="RuleFlowEventListener.png"
+                     format="PNG" />
+        </imageobject>
+      </mediaobject>
+    </figure>
+
+    <para>Both stateful and statless sessions implement the EventManager
+    interface, which allows event listeners to be added to the session.</para>
+
+    <figure>
+      <title>EventManager</title>
+
+      <mediaobject>
+        <imageobject>
+          <imagedata align="center" fileref="EventManager.svg" format="SVG" />
+        </imageobject>
+
+        <imageobject>
+          <imagedata align="center" fileref="EventManager.png" format="PNG" />
+        </imageobject>
+      </mediaobject>
+    </figure>
+
+    <para>All EventListeners have default implementations that implement each
     method, but do nothing, these are convienience classes that you can
     inherit from to save having to implement each method -
-    DefaultAgendaEventListener and DefaultWorkingMemoryEventListener. The
-    following showd how to extend DefaultAgendaEventListener and add it to the
-    Working Memory - the example prints statements for only when rules are
-    fired:</para>
+    DefaultAgendaEventListener, DefaultWorkingMemoryEventListener,
+    DefaultRuleFlowEventListener. The following shows how to extend
+    DefaultAgendaEventListener and add it to the session - the example prints
+    statements for only when rules are fired:</para>
 
-    <programlisting>
-    
-workingMemory.addEventListener( new DefaultAgendaEventListener() {                            
+    <programlisting>session.addEventListener( new DefaultAgendaEventListener() {                            
    public void afterActivationFired(AfterActivationFiredEvent event) {
        super.afterActivationFired( event );
        System.out.println( event );
    }
-});
-    
-    </programlisting>
+});       </programlisting>
 
-    <para>Drools also provides DebugWorkingMemoryEventListener and
-    DebugAgendaEventListener that implements each method with a debug print
-    statement:</para>
+    <para>Drools also provides DebugWorkingMemoryEventListener,
+    DebugAgendaEventListener and DebugRuleFlowEventListener that implements
+    each method with a debug print statement:</para>
 
-    <programlisting>
-      
-workingMemory.addEventListener( new DebugWorkingMemoryEventListener() );
-    
-    </programlisting>
+    <programlisting>session.addEventListener( new DebugWorkingMemoryEventListener() );        </programlisting>
 
     <para>The Eclipse based Rule IDE also provides an audit logger and
     graphical viewer, so that the rule engine can log events for later
     viewing, and auditing.</para>
   </section>
+
+  <section>
+    <title>Sequential Mode</title>
+
+    <para>With Rete you have a stateful session where objects can be asserted
+    and modified over time, rules can also be added and removed. Now what
+    happens if we assume a stateless session, where after the initial data set
+    no more data can be asserted or modified (no rule re-evaluations) and
+    rules cannot be added or removed? This means we can start to make
+    assumptions to minimise what work the engine has to do.</para>
+
+    <orderedlist>
+      <listitem>
+        <para>Order the Rules by salience and position in the ruleset (just
+        sets a sequence attribute on the rule terminal node). 4 </para>
+      </listitem>
+
+      <listitem>
+        <para>Create an array, one element for each possible rule activation;
+        element position indicates firing order. </para>
+      </listitem>
+
+      <listitem>
+        <para>Turn off all node memories, except the right-input Object
+        memory. </para>
+      </listitem>
+
+      <listitem>
+        <para>Disconnect the LeftInputAdapterNode propagation, and have the
+        Object plus the Node referenced in a Command object, which is added to
+        a list on the WorkingMemory for later execution. </para>
+      </listitem>
+
+      <listitem>
+        <para>Assert all objects, when all assertions are finished and thus
+        right-input node memories are populated check the Command list and
+        execute each in turn. </para>
+      </listitem>
+
+      <listitem>
+        <para>All resulting Activations should be placed in the array, based
+        upon the determined sequence number of the Rule. Record the first and
+        last populated elements, to reduce the iteration range.</para>
+      </listitem>
+
+      <listitem>
+        <para>Iterate the array of Activations, executing populated element in
+        turn.</para>
+      </listitem>
+
+      <listitem>
+        <para>If we have a maximum number of allowed rule executions, we can
+        exit our network evaluations early to fire all the rules in the
+        array.</para>
+      </listitem>
+    </orderedlist>
+
+    <para>The LeftInputAdapterNode no longer creates a Tuple, adding the
+    Object, and then propagate the Tuple – instead a Command Object is created
+    and added to a list in the Working Memory. This Command Object holds a
+    reference to the LeftInputAdapterNode and the propagated Object. This
+    stops any left-input propagations at insertion time, so that we know that
+    a right-input propagation will never need to attempt a join with the
+    left-inputs (removing the need for left-input memory). All nodes have
+    their memory turned off, including the left-input Tuple memory but
+    excluding the right-input Object memory – i.e. The only node that
+    remembers an insertion propagation is the right-input Object memory. Once
+    all the assertions are finished, and all right-input memories populated,
+    we can then iterate the list of LeftInputAdatperNode Command objects
+    calling each in turn; they will propagate down the network attempting to
+    join with the right-input objects; not being remembered in the left input,
+    as we know there will be no further object assertions and thus
+    propagations into the right-input memory. </para>
+
+    <para>There is no longer an Agenda, with a priority queue to schedule the
+    Tuples, instead there is simply an array for the number of rules. The
+    sequence number of the RuleTerminalNode indicates the element with the
+    array to place the Activation. Once all Command Objects have finished we
+    can iterate our array checking each element in turn and firing the
+    Activations if they exist. To improve performance in the array we remember
+    record the first and last populated cells. The network is constructed
+    where each RuleTerminalNode is given a sequence number, based on a
+    salience number and its order of being added to the network.</para>
+
+    <para>Typically the right-input node memories are HashMaps, for fast
+    Object retraction, as we know there will be no Object retractions, we can
+    use a list when the values of the Object are not indexed. For larger
+    numbers of Objects indexed HashMaps provide a performance increase; if we
+    know an Object type has a low number of instances then indexing is
+    probably not of an advantage and an Object list can be used.</para>
+
+    <para>Sequential mode can only be used with a StatefulSession and is off
+    by default. To turn on either set the RuleBaseConfiguration.setSequentail
+    to true or set the rulebase.conf property drools.sequential to true.
+    Sequential mode can fallback to a dynamic agenda with setSequentialAgenda
+    to either SequentialAgenda.SEQUENTIAL or SequentialAgenda.DYNAMIC setter
+    or the "drools.sequential.agenda" property</para>
+  </section>
 </section>
\ No newline at end of file

Modified: labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Engine/Two_Phase.png
===================================================================
(Binary files differ)

Modified: labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Engine/Two_Phase.svg
===================================================================
--- labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Engine/Two_Phase.svg	2007-07-24 03:47:46 UTC (rev 13747)
+++ labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Engine/Two_Phase.svg	2007-07-24 03:50:31 UTC (rev 13748)
@@ -1,9 +1,12 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated by Microsoft Visio 11.0, SVG Export, v1.0 Two_Phase.svg Page-1 --><svg xmlns="http://www.w3.org/2000/svg" xmlns:v="http://schemas.microsoft.com/visio/2003/SVGExtensions/" xmlns:xlink="http://www.w3.org/1999/xlink" width="7.06161in" height="4.55391in" viewBox="0 0 508.436 327.882" xml:space="preserve" color-interpolation-filters="sRGB" class="st8" preserveAspectRatio="xMidYMid meet" zoomAndPan="magnify" version="1.0" contentScriptType="text/ecmascript" contentStyleType="text/css">
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
+<!-- Generated by Microsoft Visio 11.0, SVG Export, v1.0 Two_Phase.svg Page-1 -->
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:v="http://schemas.microsoft.com/visio/2003/SVGExtensions/" width="7.06161in"
+		height="4.55391in" viewBox="0 0 508.436 327.882" xml:space="preserve" color-interpolation-filters="sRGB" class="st8">
 	<v:documentProperties v:langID="1033" v:metric="true" v:viewMarkup="false"/>
 
-	<style type="text/css" xml:space="preserve">
-	
+	<style type="text/css">
+	<![CDATA[
 		.st1 {fill:#e8eef7;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.24}
 		.st2 {fill:#000000;font-family:Arial;font-size:0.666664em}
 		.st3 {font-size:1em}
@@ -12,25 +15,27 @@
 		.st6 {fill:#e8eef7;stroke:none;stroke-linecap:butt;stroke-width:7.2}
 		.st7 {fill:none;stroke:none;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.72}
 		.st8 {fill:none;fill-rule:evenodd;font-size:12;overflow:visible;stroke-linecap:square;stroke-miterlimit:3}
-	
+	]]>
 	</style>
 
 	<defs id="Markers">
 		<g id="lend4">
 			<path d="M 2 1 L 0 0 L 2 -1 L 2 1 " style="stroke:none"/>
 		</g>
-		<marker xmlns="http://www.w3.org/TR/xhtml1/transitional" overflow="visible" id="mrkr4-28" class="st5" v:arrowType="4" v:arrowSize="2" v:setback="23" refX="-23" orient="auto" markerUnits="strokeWidth" preserveAspectRatio="xMidYMid meet">
-			<use xmlns="http://www.w3.org/2000/svg" xlink:href="#lend4" transform="scale(-11.5,-11.5) " xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"/>
+		<marker id="mrkr4-28" class="st5" v:arrowType="4" v:arrowSize="2" v:setback="23" refX="-23" orient="auto"
+				markerUnits="strokeWidth">
+			<use xlink:href="#lend4" transform="scale(-11.5,-11.5) "/>
 		</marker>
 	</defs>
 	<g v:mID="0" v:index="1" v:groupContext="foregroundPage">
-		<title content="structured text">Page-1</title>
-		<v:pageProperties v:drawingScale="0.0393701" v:pageScale="0.0393701" v:drawingUnits="24" v:shadowOffsetX="8.50394" v:shadowOffsetY="-8.50394"/>
+		<title>Page-1</title>
+		<v:pageProperties v:drawingScale="0.0393701" v:pageScale="0.0393701" v:drawingUnits="24" v:shadowOffsetX="8.50394"
+				v:shadowOffsetY="-8.50394"/>
 		<v:layer v:name="Flowchart" v:index="0"/>
 		<v:layer v:name="Connector" v:index="1"/>
 		<g id="shape17-1" v:mID="17" v:groupContext="shape" v:layerMember="0" transform="translate(0.24,-103.969)">
-			<title content="structured text">Process.17</title>
-			<desc content="structured text">Working Memory Action</desc>
+			<title>Process.17</title>
+			<desc>Working Memory Action</desc>
 			<v:custProps>
 				<v:cp v:nameU="Cost" v:lbl="Cost" v:type="7" v:format="@" v:langID="1033"/>
 				<v:cp v:nameU="Duration" v:lbl="Duration" v:type="2" v:langID="1033"/>
@@ -44,8 +49,8 @@
 			<rect x="0" y="200.851" width="189.059" height="127.03" rx="8.50394" ry="8.50394" class="st1"/>
 			<text x="2" y="210.05" class="st2" v:langID="2057"><v:paragraph/><v:tabList/>    Working Memory Action</text>		</g>
 		<g id="shape18-4" v:mID="18" v:groupContext="shape" v:layerMember="0" transform="translate(74.9268,-124.964)">
-			<title content="structured text">Process.18</title>
-			<desc content="structured text">retract</desc>
+			<title>Process.18</title>
+			<desc>retract</desc>
 			<v:custProps>
 				<v:cp v:nameU="Cost" v:lbl="Cost" v:type="7" v:format="@" v:langID="1033"/>
 				<v:cp v:nameU="Duration" v:lbl="Duration" v:type="2" v:langID="1033"/>
@@ -59,8 +64,8 @@
 			<rect x="0" y="302.37" width="42.5197" height="25.5118" rx="8.50394" ry="8.50394" class="st1"/>
 			<text x="9.91" y="317.53" class="st2" v:langID="2057"><v:paragraph v:horizAlign="1"/><v:tabList/>retract</text>		</g>
 		<g id="shape19-7" v:mID="19" v:groupContext="shape" v:layerMember="0" transform="translate(121.698,-164.914)">
-			<title content="structured text">Process.19</title>
-			<desc content="structured text">modify</desc>
+			<title>Process.19</title>
+			<desc>update</desc>
 			<v:custProps>
 				<v:cp v:nameU="Cost" v:lbl="Cost" v:type="7" v:format="@" v:langID="1033"/>
 				<v:cp v:nameU="Duration" v:lbl="Duration" v:type="2" v:langID="1033"/>
@@ -72,10 +77,10 @@
 			<v:textBlock v:margins="rect(2,2,2,2)" v:tabSpace="42.5197"/>
 			<v:textRect cx="21.2598" cy="315.126" width="42.52" height="25.5118"/>
 			<rect x="0" y="302.37" width="42.5197" height="25.5118" rx="8.50394" ry="8.50394" class="st1"/>
-			<text x="9.47" y="317.53" class="st2" v:langID="2057"><v:paragraph v:horizAlign="1"/><v:tabList/>modify</text>		</g>
+			<text x="9.02" y="317.53" class="st2" v:langID="2057"><v:paragraph v:horizAlign="1"/><v:tabList/>update</text>		</g>
 		<g id="shape21-10" v:mID="21" v:groupContext="shape" v:layerMember="0" transform="translate(24.3345,-164.914)">
-			<title content="structured text">Process.21</title>
-			<desc content="structured text">assert</desc>
+			<title>Process.21</title>
+			<desc>insert</desc>
 			<v:custProps>
 				<v:cp v:nameU="Cost" v:lbl="Cost" v:type="7" v:format="@" v:langID="1033"/>
 				<v:cp v:nameU="Duration" v:lbl="Duration" v:type="2" v:langID="1033"/>
@@ -87,10 +92,10 @@
 			<v:textBlock v:margins="rect(2,2,2,2)" v:tabSpace="42.5197"/>
 			<v:textRect cx="21.2598" cy="315.126" width="42.52" height="25.5118"/>
 			<rect x="0" y="302.37" width="42.5197" height="25.5118" rx="8.50394" ry="8.50394" class="st1"/>
-			<text x="10.36" y="317.53" class="st2" v:langID="2057"><v:paragraph v:horizAlign="1"/><v:tabList/>assert</text>		</g>
+			<text x="11.47" y="317.53" class="st2" v:langID="2057"><v:paragraph v:horizAlign="1"/><v:tabList/>insert</text>		</g>
 		<g id="shape22-13" v:mID="22" v:groupContext="shape" v:layerMember="0" transform="translate(319.138,-43.6005)">
-			<title content="structured text">Process.22</title>
-			<desc content="structured text">Agenda Evaluation</desc>
+			<title>Process.22</title>
+			<desc>Agenda Evaluation</desc>
 			<v:custProps>
 				<v:cp v:nameU="Cost" v:lbl="Cost" v:type="7" v:format="@" v:langID="1033"/>
 				<v:cp v:nameU="Duration" v:lbl="Duration" v:type="2" v:langID="1033"/>
@@ -104,8 +109,8 @@
 			<rect x="0" y="80.1144" width="189.059" height="247.767" rx="8.50394" ry="8.50394" class="st1"/>
 			<text x="2" y="89.31" class="st2" v:langID="2057"><v:paragraph/><v:tabList/>     Agenda  Evaluation</text>		</g>
 		<g id="shape23-16" v:mID="23" v:groupContext="shape" v:layerMember="0" transform="translate(378.234,-146.224)">
-			<title content="structured text">Decision.23</title>
-			<desc content="structured text">Select Rule to Fire</desc>
+			<title>Decision.23</title>
+			<desc>Select Rule to Fire</desc>
 			<v:custProps>
 				<v:cp v:nameU="Cost" v:lbl="Cost" v:type="7" v:format="@" v:langID="1033"/>
 				<v:cp v:nameU="Duration" v:lbl="Duration" v:type="2" v:langID="1033"/>
@@ -117,10 +122,11 @@
 			<v:textBlock v:margins="rect(2,2,2,2)" v:tabSpace="42.5197"/>
 			<v:textRect cx="35.4331" cy="306.622" width="59.06" height="31.8898"/>
 			<path d="M0 306.62 L35.43 285.36 L70.87 306.62 L35.43 327.88 L0 306.62 Z" class="st1"/>
-			<text x="24.31" y="304.22" class="st2" v:langID="2057"><v:paragraph v:horizAlign="1"/><v:tabList/>Select <v:newlineChar/><tspan x="14.76" dy="1.2em" class="st3">Rule to Fire</tspan></text>		</g>
+			<text x="24.31" y="304.22" class="st2" v:langID="2057"><v:paragraph v:horizAlign="1"/><v:tabList/>Select <v:newlineChar/><tspan
+						x="14.76" dy="1.2em" class="st3">Rule to Fire</tspan></text>		</g>
 		<g id="shape25-20" v:mID="25" v:groupContext="shape" v:layerMember="0" transform="translate(392.407,-0.24)">
-			<title content="structured text">Process.25</title>
-			<desc content="structured text">exit</desc>
+			<title>Process.25</title>
+			<desc>exit</desc>
 			<v:custProps>
 				<v:cp v:nameU="Cost" v:lbl="Cost" v:type="7" v:format="@" v:langID="1033"/>
 				<v:cp v:nameU="Duration" v:lbl="Duration" v:type="2" v:langID="1033"/>
@@ -134,8 +140,8 @@
 			<rect x="0" y="302.37" width="42.5197" height="25.5118" rx="8.50394" ry="8.50394" class="st1"/>
 			<text x="15.03" y="317.53" class="st2" v:langID="2057"><v:paragraph v:horizAlign="1"/><v:tabList/>exit</text>		</g>
 		<g id="shape27-23" v:mID="27" v:groupContext="shape" v:layerMember="1" transform="translate(406.58,-146.224)">
-			<title content="structured text">Dynamic connector.27</title>
-			<desc content="structured text">No Rule Found</desc>
+			<title>Dynamic connector.27</title>
+			<desc>No Rule Found</desc>
 			<v:userDefs>
 				<v:ud v:nameU="visVersion" v:val="VT0(11):26"/>
 			</v:userDefs>
@@ -143,10 +149,11 @@
 			<v:textRect cx="7.08661" cy="388.118" width="40" height="27.2035"/>
 			<path d="M7.09 327.88 L7.09 442.83" class="st4"/>
 			<rect v:rectContext="textBkgnd" x="-7.73937" y="378.518" width="28.9023" height="19.1997" class="st6"/>
-			<text x="-7.36" y="385.72" class="st2" v:langID="2057"><v:paragraph v:horizAlign="1"/><v:tabList/>No Rule<v:newlineChar/><tspan x="-4.26" dy="1.2em" class="st3">Found</tspan></text>		</g>
+			<text x="-7.36" y="385.72" class="st2" v:langID="2057"><v:paragraph v:horizAlign="1"/><v:tabList/>No Rule<v:newlineChar/><tspan
+						x="-4.26" dy="1.2em" class="st3">Found</tspan></text>		</g>
 		<g id="shape24-32" v:mID="24" v:groupContext="shape" v:layerMember="0" transform="translate(232.25,-154.728)">
-			<title content="structured text">Process.24</title>
-			<desc content="structured text">Fire Rule</desc>
+			<title>Process.24</title>
+			<desc>Fire Rule</desc>
 			<v:custProps>
 				<v:cp v:nameU="Cost" v:lbl="Cost" v:type="7" v:format="@" v:langID="1033"/>
 				<v:cp v:nameU="Duration" v:lbl="Duration" v:type="2" v:langID="1033"/>
@@ -160,22 +167,22 @@
 			<rect x="0" y="302.37" width="42.5197" height="25.5118" rx="8.50394" ry="8.50394" class="st1"/>
 			<text x="5.02" y="317.53" class="st2" v:langID="2057"><v:paragraph v:horizAlign="1"/><v:tabList/>Fire Rule</text>		</g>
 		<g id="shape26-35" v:mID="26" v:groupContext="shape" v:layerMember="1" transform="translate(378.234,-160.397)">
-			<title content="structured text">Dynamic connector.26</title>
+			<title>Dynamic connector.26</title>
 			<v:userDefs>
 				<v:ud v:nameU="visVersion" v:val="VT0(11):26"/>
 			</v:userDefs>
 			<path d="M0 320.79 L-97.94 320.79" class="st4"/>
 		</g>
 		<g id="shape28-40" v:mID="28" v:groupContext="shape" v:layerMember="1" transform="translate(232.25,-160.397)">
-			<title content="structured text">Dynamic connector.28</title>
+			<title>Dynamic connector.28</title>
 			<v:userDefs>
 				<v:ud v:nameU="visVersion" v:val="VT0(11):26"/>
 			</v:userDefs>
 			<path d="M0 320.79 L-37.43 320.79" class="st4"/>
 		</g>
 		<g id="shape29-45" v:mID="29" v:groupContext="shape" v:layerMember="0" transform="translate(186.895,-285.122)">
-			<title content="structured text">Process.29</title>
-			<desc content="structured text">Determine possible rules to fire</desc>
+			<title>Process.29</title>
+			<desc>Determine possible rules to fire</desc>
 			<v:custProps>
 				<v:cp v:nameU="Cost" v:lbl="Cost" v:type="7" v:format="@" v:langID="1033"/>
 				<v:cp v:nameU="Duration" v:lbl="Duration" v:type="2" v:langID="1033"/>
@@ -187,27 +194,29 @@
 			<v:textBlock v:margins="rect(2,2,2,2)" v:tabSpace="42.5197"/>
 			<v:textRect cx="35.4331" cy="306.622" width="70.87" height="42.5197"/>
 			<rect x="0" y="285.362" width="70.8661" height="42.5197" rx="8.50394" ry="8.50394" class="st1"/>
-			<text x="16.97" y="299.42" class="st2" v:langID="2057"><v:paragraph v:horizAlign="1"/><v:tabList/>Determine <tspan x="6.52" dy="1.2em" class="st3">possible rules to </tspan><tspan x="29.87" dy="1.2em" class="st3">fire</tspan></text>		</g>
+			<text x="16.97" y="299.42" class="st2" v:langID="2057"><v:paragraph v:horizAlign="1"/><v:tabList/>Determine <tspan
+						x="6.52" dy="1.2em" class="st3">possible rules to </tspan><tspan x="29.87" dy="1.2em" class="st3">fire</tspan></text>		</g>
 		<g id="shape30-50" v:mID="30" v:groupContext="shape" v:layerMember="1" transform="translate(94.7693,-230.999)">
-			<title content="structured text">Dynamic connector.30</title>
+			<title>Dynamic connector.30</title>
 			<v:userDefs>
 				<v:ud v:nameU="visVersion" v:val="VT0(11):26"/>
 			</v:userDefs>
 			<path d="M0 327.88 L0 252.5 L86.61 252.5" class="st4"/>
 		</g>
 		<g id="shape31-55" v:mID="31" v:groupContext="shape" v:layerMember="1" transform="translate(257.761,-306.382)">
-			<title content="structured text">Dynamic connector.31</title>
+			<title>Dynamic connector.31</title>
 			<v:userDefs>
 				<v:ud v:nameU="visVersion" v:val="VT0(11):26"/>
 			</v:userDefs>
 			<path d="M0 327.88 L155.91 327.88 L155.91 440" class="st4"/>
 		</g>
 		<g id="shape20-60" v:mID="20" v:groupContext="shape" transform="translate(284.297,-167.484)">
-			<title content="structured text">Sheet.20</title>
-			<desc content="structured text">Rule Found</desc>
+			<title>Sheet.20</title>
+			<desc>Rule Found</desc>
 			<v:textBlock v:margins="rect(2,2,2,2)" v:tabSpace="42.5197"/>
 			<v:textRect cx="50" cy="321.882" width="100.01" height="12"/>
 			<rect x="0" y="315.882" width="100" height="12" class="st7"/>
-			<text x="41.77" y="314.68" class="st2" v:langID="2057"><v:paragraph v:horizAlign="1"/><v:tabList/>Rule<v:newlineChar/><tspan x="38.66" dy="1.2em" class="st3">Found</tspan><v:newlineChar/></text>		</g>
+			<text x="41.77" y="314.68" class="st2" v:langID="2057"><v:paragraph v:horizAlign="1"/><v:tabList/>Rule<v:newlineChar/><tspan
+						x="38.66" dy="1.2em" class="st3">Found</tspan><v:newlineChar/></text>		</g>
 	</g>
-</svg>
\ No newline at end of file
+</svg>

Modified: labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Engine/Two_Phase.vsd
===================================================================
(Binary files differ)




More information about the jboss-svn-commits mailing list