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

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Wed Sep 19 11:17:59 EDT 2007


Author: KrisVerlaenen
Date: 2007-09-19 11:17:59 -0400 (Wed, 19 Sep 2007)
New Revision: 15235

Added:
   labs/jbossrules/trunk/documentation/manual/en/Chapter-IDE/debug-overview.png
   labs/jbossrules/trunk/documentation/manual/en/Chapter-IDE/debug.png
   labs/jbossrules/trunk/documentation/manual/en/Chapter-IDE/debugAsDrools.png
   labs/jbossrules/trunk/documentation/manual/en/Chapter-IDE/debug_rules_configuration.png
   labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Language/ruleflow_nodes.png
Removed:
   labs/jbossrules/trunk/documentation/manual/en/Chapter-IDE/debug.JPG
   labs/jbossrules/trunk/documentation/manual/en/Chapter-IDE/debug_rules_configuration.JPG
Modified:
   labs/jbossrules/trunk/documentation/manual/en/Chapter-IDE/Section-QuickStart.xml
   labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Language/Section-RuleFlow.xml
   labs/jbossrules/trunk/documentation/manual/en/master.xml
Log:
Updated documentation for ruleflow and IDE

Modified: labs/jbossrules/trunk/documentation/manual/en/Chapter-IDE/Section-QuickStart.xml
===================================================================
--- labs/jbossrules/trunk/documentation/manual/en/Chapter-IDE/Section-QuickStart.xml	2007-09-19 14:59:47 UTC (rev 15234)
+++ labs/jbossrules/trunk/documentation/manual/en/Chapter-IDE/Section-QuickStart.xml	2007-09-19 15:17:59 UTC (rev 15235)
@@ -7,7 +7,7 @@
   <para>
     The IDE provides developers (and very technical users) with an environment to edit and test rules in various formats, and integrate it deeply with their applications. In cases where you prefer business rules and web tooling, you will want to look at the BRMS (but using the BRMS and the IDE together is not uncommon).</para>
 
-  <para>The JBoss Drools IDE is delivered as an eclipse plugin, which
+  <para>The Drools IDE is delivered as an eclipse plugin, which
   allows you to author and manage rules from within Eclipse, as well as
   integrate rules with your application. This is an optional tool, and not all
   components are required to be used, you can use what components are relevant
@@ -38,11 +38,11 @@
 
     <para>The rules IDE has the following features</para>
 
-    <itemizedlist>
+    <orderedlist>
       <listitem>
         <para>Textual/graphical rule editor</para>
 
-        <itemizedlist>
+        <orderedlist>
           <listitem>
             <para>An editor that is aware of DRL syntax, and provides content
             assistance (including an outline view)</para>
@@ -50,7 +50,7 @@
 	  <listitem>
 	    <para>An editor that is aware of DSL (domain specific langauge) extensions, and provides content assistance.</para>
 	  </listitem>
-        </itemizedlist>
+        </orderedlist>
       </listitem>
 
       <listitem>
@@ -61,7 +61,7 @@
       <listitem>
         <para>Wizards to accelerate and ...</para>
 
-        <itemizedlist>
+        <orderedlist>
           <listitem>
             <para>Help you quickly create a new "rules" project</para>
           </listitem>
@@ -79,31 +79,31 @@
 	  </listitem>
 
 
-        </itemizedlist>
+        </orderedlist>
       </listitem>
 
       <listitem>
         <para>A domain specific language editor</para>
 
-        <itemizedlist>
+        <orderedlist>
           <listitem>
             <para>Create and manage mappings from your users language to the
             rule language</para>
           </listitem>
-        </itemizedlist>
+        </orderedlist>
       </listitem>
 
       <listitem>
         <para>Rule validation</para>
 
-        <itemizedlist>
+        <orderedlist>
           <listitem>
             <para>As rules are entered, the rule is "built" in the background
             and errors reported via the problem "view" where possible</para>
           </listitem>
-        </itemizedlist>
+        </orderedlist>
       </listitem>
-    </itemizedlist>
+    </orderedlist>
 
     <para>You can see the above features make use of Eclipse infrastructure
     and features. All of the power of eclipse is available.</para>
@@ -119,10 +119,6 @@
 
     <figure>
       <title>New rule project scaffolding</title>
-
-
-      <para>When you choose to create a new "rule project" - you will get a choice to add some default artifacts to it (like rules, decision tables, ruleflows etc). These can serve as a starting point, and will give you something executable to play with (which you can then modify and mould to your needs). The simplest case (a hello world rule) is shown below. Feel free to experiment with the plugin at this point.</para>
-
       <mediaobject>
         <imageobject>
           <imagedata align="center" fileref="new_project1.jpg" format="JPG" />
@@ -130,6 +126,8 @@
       </mediaobject>
     </figure>
 
+      <para>When you choose to create a new "rule project" - you will get a choice to add some default artifacts to it (like rules, decision tables, ruleflows etc). These can serve as a starting point, and will give you something executable to play with (which you can then modify and mould to your needs). The simplest case (a hello world rule) is shown below. Feel free to experiment with the plugin at this point.</para>
+
     <figure>
       <title>New rule project result</title>
 
@@ -298,7 +296,7 @@
     rules can then be used to show the details of the selected working
     memory:</para>
 
-    <itemizedlist>
+    <orderedlist>
       <listitem>
         <para>The Working Memory shows all elements in the working memory of
         the Drools working memory.</para>
@@ -313,7 +311,7 @@
         <para>The Global Data View shows all global data currently defined in
         the Drools working memory.</para>
       </listitem>
-    </itemizedlist>
+    </orderedlist>
 
     <para>The Audit view can be used to show audit logs that contain events
     that were logged during the execution of a rules engine in a tree
@@ -334,14 +332,14 @@
       <para>An action is added to the right of the view, to customize what is
       shown:</para>
 
-      <itemizedlist>
+      <orderedlist>
         <listitem>
           <para>The Show Logical Structure toggles showing the logical
           structure of the elements in the working memory, or all their
           details. Logical structures allow for example visualizing sets of
           elements in a more obvious way.</para>
         </listitem>
-      </itemizedlist>
+      </orderedlist>
     </section>
 
     <section>
@@ -359,7 +357,7 @@
       <para>An action is added to the right of the view, to customize what is
       shown:</para>
 
-      <itemizedlist>
+      <orderedlist>
         <listitem>
           <para>The Show Logical Structure toggles showing the logical
           structure of the agenda item, or all their details. Logical
@@ -368,7 +366,7 @@
           that is represented by the AgendaItem, and the values of all the
           parameters used in the rule.</para>
         </listitem>
-      </itemizedlist>
+      </orderedlist>
     </section>
 
     <section>
@@ -386,14 +384,14 @@
       <para>An action is added to the right of the view, to customize what is
       shown:</para>
 
-      <itemizedlist>
+      <orderedlist>
         <listitem>
           <para>The Show Logical Structure toggles showing the logical
           structure of the elements in the working memory, or all their
           details. Logical structures allow for example visualizing sets of
           elements in a more obvious way.</para>
         </listitem>
-      </itemizedlist>
+      </orderedlist>
     </section>
 
     <section>
@@ -424,20 +422,20 @@
 
       <para>Open the log by clicking the Open Log action (first action in the
       Audit View) and select the file. The Audit view now shows all events
-      that where logged during the executing of the rules. There are five
+      that where logged during the executing of the rules. There are different
       types of events (each with a different icon):</para>
 
-      <itemizedlist>
+      <orderedlist>
         <listitem>
-          <para>Object asserted (green square)</para>
+          <para>Object inserted (green square)</para>
         </listitem>
 
         <listitem>
-          <para>Object modified (yellow square)</para>
+          <para>Object updated (yellow square)</para>
         </listitem>
 
         <listitem>
-          <para>Object retracted (red square)</para>
+          <para>Object removed (red square)</para>
         </listitem>
 
         <listitem>
@@ -451,8 +449,24 @@
         <listitem>
           <para>Activation executed (blue diamond)</para>
         </listitem>
-      </itemizedlist>
+ 
+        <listitem>
+          <para>Ruleflow started / ended (process icon)</para>
+        </listitem>
+ 
+        <listitem>
+          <para>Ruleflow-group activated / deactivated (process icon)</para>
+        </listitem>
+   
+        <listitem>
+          <para>Rule package added / removed (Drools icon)</para>
+        </listitem>
 
+        <listitem>
+          <para>Rule added / removed (Drools icon)</para>
+        </listitem>
+   </orderedlist>
+
       <para>All these events show extra information concerning the event, like
       the id and toString representation of the object in case of working
       memory events (assert, modify and retract), the name of the rule and all
@@ -461,7 +475,7 @@
       activation, it is shown as a child of the activation executed event. For
       some events, you can retrieve the "cause":</para>
 
-      <itemizedlist>
+      <orderedlist>
         <listitem>
           <para>The cause of an object modified or retracted event is the last
           object event for that object. This is either the object asserted
@@ -472,7 +486,7 @@
           <para>The cause of an activation cancelled or executed event is the
           corresponding activation created event.</para>
         </listitem>
-      </itemizedlist>
+      </orderedlist>
 
       <para>When selecting an event, the cause of that event is shown in green
       in the audit view (if visible of course). You can also right click the
@@ -631,7 +645,16 @@
 
       <title>Debugging rules</title>
 
-      <para>You can debug rules during the execution of your Drools application.
+           <figure>
+          <title>Debugging</title>
+           <mediaobject>
+             <imageobject>
+               <imagedata align="center" fileref="debug-overview.png" format="PNG"/>
+             </imageobject>
+           </mediaobject>
+        </figure>
+        
+     <para>You can debug rules during the execution of your Drools application.
       You can add breakpoints in the consequences of your rules, and whenever
       such a breakpoint is uncounted during the execution of the rules, the execution
       is halted.  You can then inspect the variables known at that point and use any
@@ -643,7 +666,7 @@
      <title>Creating breakpoints</title>
      <para>You can add/remove rule breakpoints in drl files in two ways, similar to adding
      breakpoints to Java files:</para>
-      <itemizedlist>
+      <orderedlist>
         <listitem>
           <para>Double-click the ruler of the DRL editor at the line where you want to
           add a breakpoint.  Note that rule breakpoints can only be created in the
@@ -658,7 +681,7 @@
           breakpoint is allowed at that line.  Clicking the action will add a breakpoint at the
           selected line, or remove it if there was one already.</para>
         </listitem>
-     </itemizedlist>
+     </orderedlist>
      <para>The Debug Perspective contains a Breakpoints view which can be used to see
      all defined breakpoints, get their properties, enable/disable or remove them, etc.</para>
 </section>
@@ -666,45 +689,56 @@
      <title>Debugging rules</title>
      <para>Drools breakpoints are only enabled if you debug your application as
       a Drools Application.  You can do this like this:</para>
-      <itemizedlist>
+      
+         <figure>
+          <title>Debug as Drools Application</title>
+           <mediaobject>
+             <imageobject>
+               <imagedata align="center" fileref="debugAsDrools.png" format="PNG" role="" />
+             </imageobject>
+           </mediaobject>
+        </figure>
+
+      <orderedlist>
         <listitem>
           <para>Select the main class of your application. Right click it and select the
-          "Debug As >" sub-menu.  There, select the "Debug ..." menu item to open a
+          "Debug As >" sub-menu and select Drools Application. Alternatively, you can also select
+          the "Debug ..." menu item to open a
           new dialog for creating, managing and running debug configurations (see
           screenshot below)</para>
-        </listitem>
-        <listitem>
-          <para>Select the "JBoss Rules Application" item in the left tree and click the "New
+          <orderedlist>
+            <listitem>
+              <para>Select the "Drools Application" item in the left tree and click the "New
           launch configuration" button (leftmost icon in the toolbar above the tree).  This
           will create a new configuration and already fill in some of the properties
           (like the project and main class) based on main class you selected in the beginning.
           All properties shown here are the same as any standard Java program.</para>
-        </listitem>
-        <listitem>
-          <para>Change the name of your debug configuration to something meaningful.
+            </listitem>
+            <listitem>
+              <para>Change the name of your debug configuration to something meaningful.
           You can just accept the defaults for all other properties.  For more information
           about these properties, please check the eclipse jdt documentation.</para>
-        </listitem>
-        <listitem>
-          <para>Click the "Debug" button on the bottom to start debugging your application.
-          </para>
-        </listitem>
-     </itemizedlist>
-
-      <mediaobject>
-        <imageobject>
-          <imagedata fileref="debug_rules_configuration.JPG" />
-        </imageobject>
-      </mediaobject>
-
-     <para>You only have to define your debug configuration once.  The next time you try to run your
-     JBoss Rules application, you don't have to create a new one but select the one you defined
-     previously by selecting it in the tree on the left, as a sub-element of the "JBoss Rules Application"
+            </listitem>
+            <listitem>
+              <para>Click the "Debug" button on the bottom to start debugging your application. You only have to define your debug configuration once.  The next time you try to run your Drools application, you don't have to create a new one but select the one you defined previously by selecting it in the tree on the left, as a sub-element of the "Drools Application"
      tree node, and then click the Debug button.  The eclipse toolbar also contains shortcut
      buttons to quickly re-execute the one of your previous configurations (at least when the
-     Java, Java Debug, or JBoss Rules perspective has been selected).
-     </para>
+     Java, Java Debug, or Drools perspective has been selected).
+              </para>
+            </listitem>
+          </orderedlist>
+        </listitem>
+     </orderedlist>
 
+          <figure>
+          <title>Debug as Drools Application Configuration</title>
+           <mediaobject>
+             <imageobject>
+               <imagedata align="center" fileref="debug_rules_configuration.png" format="PNG" role="" />
+             </imageobject>
+           </mediaobject>
+        </figure>
+        
      <para>After clicking the "Debug" button, the application starts executing and will halt if any
      breakpoint is encountered.  This can be a Drools rule breakpoint, or any other standard
      Java breakpoint.  Whenever a Drools rule breakpoint is encountered, the corresponding drl
@@ -716,13 +750,17 @@
      is automatically shown).
      </para>
 
-      <mediaobject>
-        <imageobject>
-          <imagedata fileref="debug_rules_configuration.JPG" />
-        </imageobject>
-      </mediaobject>
+          <figure>
+          <title>Debugging</title>
+           <mediaobject>
+             <imageobject>
+               <imagedata align="center" fileref="debug.png" format="PNG"/>
+             </imageobject>
+           </mediaobject>
+        </figure>
+        
+   </section>
     </section>
-    </section>
 
 
 </section>

Added: labs/jbossrules/trunk/documentation/manual/en/Chapter-IDE/debug-overview.png
===================================================================
(Binary files differ)


Property changes on: labs/jbossrules/trunk/documentation/manual/en/Chapter-IDE/debug-overview.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Deleted: labs/jbossrules/trunk/documentation/manual/en/Chapter-IDE/debug.JPG
===================================================================
(Binary files differ)

Added: labs/jbossrules/trunk/documentation/manual/en/Chapter-IDE/debug.png
===================================================================
(Binary files differ)


Property changes on: labs/jbossrules/trunk/documentation/manual/en/Chapter-IDE/debug.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbossrules/trunk/documentation/manual/en/Chapter-IDE/debugAsDrools.png
===================================================================
(Binary files differ)


Property changes on: labs/jbossrules/trunk/documentation/manual/en/Chapter-IDE/debugAsDrools.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Deleted: labs/jbossrules/trunk/documentation/manual/en/Chapter-IDE/debug_rules_configuration.JPG
===================================================================
(Binary files differ)

Added: labs/jbossrules/trunk/documentation/manual/en/Chapter-IDE/debug_rules_configuration.png
===================================================================
(Binary files differ)


Property changes on: labs/jbossrules/trunk/documentation/manual/en/Chapter-IDE/debug_rules_configuration.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Language/Section-RuleFlow.xml
===================================================================
--- labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Language/Section-RuleFlow.xml	2007-09-19 14:59:47 UTC (rev 15234)
+++ labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Language/Section-RuleFlow.xml	2007-09-19 15:17:59 UTC (rev 15235)
@@ -19,19 +19,21 @@
   specify the order in which rule sets should be evaluated by using a flow
   chart. This allows you to define which rule sets should be evaluated in
   sequence or in parallel, to specify conditions under which rule sets should
-  be evaluated, etc. Here are two examples of a ruleflow:.</para>
+  be evaluated, etc. This chapter contains a few ruleflow examples.</para>
 
   <para>A rule flow is a graphical description of a sequence of steps that the
   rule engine needs to take, where the order is important. The ruleflow can
-  also deal with conditional branching.</para>
+  also deal with conditional branching, parallelism, synchonization, etc.</para>
 
-  <para>To use a ruleflow, you use rule attributes ("options" in the GUI) to
-  give each rule a ruleflow group to belong to - you then define a rule flow
-  graph (which is a flow chart) to describe the order in which the rules
-  should be considered.</para>
+  <para>To use a ruleflow to describe the order in which rules should be
+  evaluatied, you should first group rules into rulefow-groups using the ruleflow-group
+  rule attribute ("options" in the GUI).  Then you should create a ruleflow 
+  graph (which is a flow chart) that graphically describe the order in which the rules
+  should be considered (by specifying the order in which the ruleflow-groups should
+  be evaluated).</para>
 
   <section>
-    <title>Setting a rules ruleflow group</title>
+    <title>Assigning rules to a ruleflow group</title>
 
     <programlisting>
   rule 'YourRule'
@@ -43,8 +45,7 @@
     end  
   </programlisting>
 
-    <para>This rule will then be placed in the group called "group1", along
-    with any other groups that are defined in the package.</para>
+    <para>This rule will then be placed in the ruleflow-group called "group1".</para>
   </section>
 
   <section>
@@ -61,21 +62,26 @@
       </mediaobject>
     </figure>
 
-    <para>The above rule flow specifies that the groups "Check Order" must be
-    done before "Process Order". This means that in your rules, firstly only
-    rules which are market as having a ruleflow-group of "Check Order" will be
-    considered first, and then "Process Order". Thats about it. You could
-    achieve similar to this with either salience (setting priorities, but this
+    <para>The above rule flow specifies that the rules in the group "Check Order" must be
+    executed before the rules in the group "Process Order". This means that only
+    rules which are marked as having a ruleflow-group of "Check Order" will be
+    considered first, and then "Process Order". That's about it. You could
+    achieve similar results with either using salience (setting priorities, but this
     is harder to maintain, and makes the time-relationship implicit in the
     rules), or agenda groups. However, using a ruleflow makes the order of
-    processing explicit, almost like a meta-rule.</para>
+    processing explicit, almost like a meta-rule, and makes managing more complex
+    situations a lot easier.  The various elements that can be used inside a ruleflow
+    will be explained in more detail later.</para>
   </section>
 
   <section>
     <title>How to build a rule flow</title>
 
-    <para>Firstly you use the IDE, and when in a project, use "control+N" to
-    launch the new wizard:</para>
+    <para>Ruleflows can only be created by using the graphical ruleflow editor which is
+    part of the Drools plugin for Eclipse.  Once you have set up a Drools project (check
+    the IDE chapter if you do not know how to do this), you can start adding ruleflows.
+    When in a project, use "control+N" to launch the new wizard, or right-click the directory
+    you would like to put your ruleflow in and select "New ... Other ...":</para>
 
     <figure>
       <title>Ruleflow</title>
@@ -88,13 +94,15 @@
       </mediaobject>
     </figure>
 
-    <para>Choose the section on "JBoss Rules" and then pick "RuleFlow file".
+    <para>Choose the section on "Drools" and then pick "RuleFlow file".
     This will create a new .rf file.</para>
 
-    <para>Next you will see the graphical ruleflow editor. The first thing you
-    should do is switch to the "rule perspective" - this will tweak the UI so
+    <para>Next you will see the graphical ruleflow editor. Now would be a good time to
+    switch to the "Drools perspective" (if you haven't done so already) - this will tweak the UI so
     it is optimal for rules. Then ensure that you can see the "properties"
-    panel down the bottom of the eclipse window:</para>
+    panel down the bottom of the eclipse window, as it will be necessary to fill in the different
+    properties of the elements in your ruleflow.  If you cannot see the properties view, open it using
+    the Menu Window - Show View - Other ..., and under the General folder select the Properties view.</para>
 
     <figure>
       <title>Groups</title>
@@ -107,9 +115,12 @@
       </mediaobject>
     </figure>
 
-    <para>Click on the RuleFlowGroup icon in the Component Pallette of the GUI
-    - you can then draw a few rule flow groups. Clicking on them allows you to
-    set the name.</para>
+    <para>The RuleFlow editor consists of a palette, a canvas and an outline view.  To add
+    new elements to the canvas, select the element you would like to create in the palette
+    and then add them to the canvas by clicking on the preferred location.  For example, 
+    click on the RuleFlowGroup icon in the Component Pallette of the GUI
+    - you can then draw a few rule flow groups. Clicking on an element in your ruleflow 
+    allows you to set the properties of that element.</para>
 
     <para>Click on a ruleflow group, and you should see the following:</para>
 
@@ -130,14 +141,14 @@
     <para>Next step is to join the groups together (if its a simple sequence
     of steps) - you use this by using "create connection" from the component
     palette. You should also create an "End" node (also from the component
-    palette) - you only have one of these.</para>
+    palette).</para>
 
     <para>In practice, if you are using ruleflow, you will most likely be
     doing more then setting a simple sequence of groups to progress though.
     You are more likely modeling branches of processing. In this case you use
     "Split" and "Join" items from the component pallette. You use connections
     to connect from the start to ruleflow groups, or to Splits, and from
-    splits to groups, joins etc (ie basically like a simple flow chart that
+    splits to groups, joins etc. (i.e. basically like a simple flow chart that
     models your processing). You can work entirely graphically until you get
     the graph approximately right.</para>
 
@@ -228,18 +239,120 @@
 
     <para>Once you have a valid ruleflow (you can check its valid by pressing
     the green "tick" icon in the IDE), you can add a rule flow to a package
-    just like a drl: <programlisting>Reader rf = ... (rule flow reader)
-packageBuilder.addRuleFlow(rf);
-</programlisting></para>
+    just like a drl.  However, the IDE creates two versions of your ruleflow: one containing
+    the ruleflow definition (*.rfm) and one containing additional graphical information (*.rf).
+    When adding a ruleflow to a package, you should make sure that you are adding the
+    .rfm file to your ruleflow (and not the .rf file).
+    <programlisting>
+Reader rfm = ... (rule flow reader, select your .RFM file here)
+packageBuilder.addRuleFlow(rfm);
+    </programlisting>
+    </para>
 
     <para>Alternatively, you can upload the .rf file to the BRMS (as a
     ruleflow asset) and it will automatically be included in packages that are
     deployed from it.</para>
 
-    <para>To activate a particular ruleflow in your runtime code, you will
-    need to use the WorkingMemory interface. After you have asserted your
-    facts, you use: <programlisting>workingMemory.startProcess("ID_From_your_Ruleflow_properties");</programlisting>
-    And then call fireAllRules(). This tells the engine what process is in
-    effect (as you may have multiple processes to consider). Thats it !</para>
+    <para>Ruleflows are only executed if you explicitly state that they should be
+    executed.  This is because you could potentially define a lot of ruleflows in 
+    your package and the engine has no way to know when you would like to start
+    each of these.  To activate a particular ruleflow, you will
+    need to start the process by calling the startProcess method on the working memory.
+    For example, if you want to start a particular workflow after you have asserted your
+    facts into the working memory, use: 
+    <programlisting>workingMemory.startProcess("ID_From_your_Ruleflow_properties");</programlisting>
+    (The ruleflow id can be specified in the properties view when you click the background canvas of your ruleflow).
+    And then call fireAllRules(). This will start executing rules, taking the order specified in the ruleflow into account.
+    Thats it !</para>
+    
+    <para> You can also start a ruleflow process from within a rule consequence using
+    <programlisting>drools.getWorkingMemory().startProcess("ID_From_your_Ruleflow_properties");</programlisting>
+    </para>
   </section>
+  
+  <section>
+    <title>Different types of nodes in a ruleflow</title>
+    <para>A ruleflow is a flow chart where different types of nodes are linked using connections.  It has the following properties: a (unique) id, a (display) name and a version.  You can also specify how the connections are visualized on the canvas using the connection layout property: 
+      <orderedlist>
+        <listitem>
+          <para>manual always draws your connections as lines going straight from their start to end point (with the possibility to use intermediate break points)
+          </para>
+        </listitem>
+        <listitem>
+          <para>shortest path is similar, but it tries to go around any obstacles is might encounter between the start and end point (to avoid lines crossing nodes)
+          </para>
+        </listitem>
+        <listitem>
+          <para>manhatten draws connections by only using horizontal and vertical lines
+          </para>
+        </listitem>
+      </orderedlist>
+    </para>
+   
+         <figure>
+          <title>The different types of ruleflow nodes</title>
+           <mediaobject>
+             <imageobject>
+               <imagedata align="center" fileref="ruleflow_nodes.png" format="PNG" role="" />
+             </imageobject>
+           </mediaobject>
+        </figure>
+
+   <para>Currently, ruleflow supports eight types of nodes:
+    <orderedlist>
+      <listitem>
+        <para>Start: the start of the ruleflow.  A ruleflow should have exactly one start node.  The start node cannot have incoming cnnections and should have one outgoing connection.  It contains one property "name" which is the display name of the node.  Whenever ruleflow process is started, the ruleflow will start executing here and automatically continue to the first node linked to this start node</para>
+      </listitem>
+      <listitem>
+        <para>End: the end of the ruleflow.  A ruleflow should have one or more end nodes.  The end node should have one incoming connection and cannot have outgoing connections.  It contains one property "name" which is the display name of the node.  When an end node is reached in the ruleflow, the ruleflow is terminated (including other remaining active nodes when parallelism is used).</para>
+      </listitem>
+      <listitem>
+        <para>RuleFlowGroup: represents a set of rules.  A RuleFlowGroup node should have one incoming connection and one outgoing connection.  It contains a property "name" which is the display name of the node, and the property ruleflow-group which is used to specify the name of the ruleflow-group that represents the set of rules of this RuleFlowGroup node.  When a RuleFlowGroup node is reached in the ruleflow, the engine will start executing rules that are part of the corresponding ruleflow-group.  Execution will automatically continue to the next node if there are no more active rules in this ruleflow-group.  This means that, during the execution of a ruleflow-group, it is possible that new activations belonging to the currently active ruleflow-group are added to the agenda due to changes made to the facts by the other rules. Note that the ruleflow will immediately continue with the next node if it encounters a ruleflow-group where there are no active rules at that poin!
 t.</para>
+      </listitem>
+      <listitem>
+        <para>Split: allows you to create branches in your ruleflow.  A split node should have one incoming connection and two or more outgoing connections.  It contains a property "name" which is the display name of the node.  There are three types of splits currently supported:
+          <orderedlist>
+           <listitem>
+            <para>AND means that the control flow will continue in all outgoing connections simultaneously
+            </para>
+           </listitem>
+           <listitem>
+             <para>XOR means that exactly one of the outgoing connections will be chosen.  Connections are chosen by evaluating the constraints that are linked to each of the outgoing connections.  Constraints are specified using the same syntax as the left-had side of a rule. The constraint with the lowest priority number that evaluates to true is selected.  Note that you should make sure that at least one of the outgoing connections will evaluate to true at runtime, or the ruleflow will throw an exception at runtime if it cannot find an outgoing connection.  For example, you could use a connection which is always true with a high priority number to specify what should happen if none of the other connections can be taken.
+             </para>
+           </listitem>
+           <listitem>
+             <para>OR means that all outgoing connections whose condition evaluates to true are selected.  Conditions are similar to the XOR split, except that the priorities are not taken into account.  Note that you should make sure that at least one of the outgoing connections will evaluate to true at runtime, or the ruleflow will throw an exception at runtime if it cannot find an outgoing connection.
+             </para>
+           </listitem>
+          </orderedlist>
+
+        </para>
+      </listitem>
+      <listitem>
+        <para>Join: allows you to synchronize multiple branches.  A join node should have two or more incoming connections and one outgoing connection.  It contains a property "name" which is the display name of the node.  There are two types of splits currently supported:
+          <orderedlist>
+           <listitem>
+            <para>AND means that is will wait until all incoming branches are completed before continuing
+            </para>
+           </listitem>
+           <listitem>
+             <para>XOR means that it continues if one of its incoming branches has been completed
+             </para>
+           </listitem>
+          </orderedlist>
+        </para>
+      </listitem>
+      <listitem>
+        <para>Milestone: represents a wait state.  A milestone should have one incoming connection and one outgoing connection.  It contains a property "name" which is the display name of the node, and the property "constraint" which specifies how long the ruleflow should wait in this state before continuing.  For example, a milestone constraint in an order entry application might specify that the ruleflow should wait until (a fact in the working memory specifies that) no more errors are found in the given order.  Constraints are specified using the same syntax as the left-had side of a rule.   When a Milestone node is reached in the ruleflow, the engine will check the associated constraint.  If the constraint evaluates to true directly, the flow will continue imediately.  Otherwise, the flow will continue if the constraint is satisfied later on, for example when a facts in the working memory is inserted, updated or removed.</para>
+      </listitem>
+      <listitem>
+        <para>Subflow: represents the invocation of another ruleflow from withing this ruleflow.  A subflow node should have one incoming connection and one outgoing connection.  It contains a property "name" which is the display name of the node, and the property "processId" which specifies the id of the process that should be executed.  When a Subflow node is reached in the ruleflow, the engine will start the process with the given id.  The subflow node will only continue if that subflow process has terminated its execution.  Note that the subflow process is started as an independent process, which means that the subflow process will not be terminated if this process reaches an end node.</para>
+      </listitem>
+      <listitem>
+        <para>Action: represents an action that should be executed in this ruleflow.  An action node should have one incoming connection and one outgoing connection.  It contains a property "name" which is the display name of the node, and the property "action" which specifies the action that should be executed.  When an action node is reached in the ruleflow, it will execute the action and continue with the next node.  An action should be specified as a piece of (valid) MVEL code.</para>
+      </listitem>
+    </orderedlist>
+    </para>
+  </section>
+  
 </section>
\ No newline at end of file

Added: labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Language/ruleflow_nodes.png
===================================================================
(Binary files differ)


Property changes on: labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Language/ruleflow_nodes.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: labs/jbossrules/trunk/documentation/manual/en/master.xml
===================================================================
--- labs/jbossrules/trunk/documentation/manual/en/master.xml	2007-09-19 14:59:47 UTC (rev 15234)
+++ labs/jbossrules/trunk/documentation/manual/en/master.xml	2007-09-19 15:17:59 UTC (rev 15235)
@@ -1,214 +1,220 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<book xmlns:xi="http://www.w3.org/2003/XInclude">
-  <bookinfo>
-    <title>Drools</title>
-
-    <subtitle>Drools Documentation</subtitle>
-
-    <releaseinfo>4.0.2.SNAPSHOT</releaseinfo>
-
-    <author>
-      <firstname>Mark</firstname>
-
-      <surname>Proctor</surname>
-    </author>
-
-    <author>
-      <firstname>Michael</firstname>
-
-      <surname>Neale</surname>
-    </author>
-
-    <author>
-      <firstname>Michael</firstname>
-
-      <surname>Frandsen</surname>
-    </author>
-
-    <author>
-      <firstname>Sam</firstname>
-
-      <surname>Griffith Jr.</surname>
-    </author>
-
-    <author>
-      <firstname>Edson</firstname>
-
-      <surname>Tirelli</surname>
-    </author>
-
-    <author>
-      <firstname>Fernando</firstname>
-
-      <surname>Meyer</surname>
-    </author>
-  </bookinfo>
-
-  <toc />
-
-  <preface id="preface" revision="2">
-    <title>Preface</title>
-
-    <mediaobject>
-      <imageobject>
-        <imagedata fileref="drools_logo.png" />
-      </imageobject>
-    </mediaobject>
-
-    <para />
-  </preface>
-
-  <title>Drools Manual</title>
-
-  <part>
-    <title>Reference Manual</title>
-
-    <chapter>
-      <title>Drools 4.0 Release Notes</title>
-
-      <xi:include href="Chapter-Release_Notes/Section-What_is_new.xml" />
-
-      <xi:include href="Chapter-Release_Notes/Section-Upgrade_tips.xml" />
-    </chapter>
-
-    <chapter>
-      <title>The Rule Engine</title>
-
-      <xi:include href="Chapter-Rule_Engine/Section-What_is_a_Rule_Engine.xml" />
-
-      <xi:include href="Chapter-Rule_Engine/Section-Why_use_a_Rule_Engine.xml" />
-
-      <xi:include href="Chapter-Rule_Engine/Section-Rules.xml" />
-
-      <xi:include href="Chapter-Rule_Engine/Section-Rete_Algorithm.xml" />
-
-      <xi:include href="Chapter-Rule_Engine/Section-The_Drools_Rule_Engine.xml" />
-
-      <!--xi:include href="Chapter-Rule_Engine/Section-Rule_Base.xml" />
-
-      <xi:include href="Chapter-Rule_Engine/Section-Working_Memory.xml" />
-
-      <xi:include href="Chapter-Rule_Engine/Section-Agenda.xml" />
-
-      <xi:include href="Chapter-Rule_Engine/Section-Event_Model.xml" /-->
-    </chapter>
-
-    <chapter>
-      <title>Installation and Setup (Core and IDE)</title>
-
-      <xi:include href="Chapter-Install/Section-Install.xml" />
-
-      <xi:include href="Chapter-Install/Section-Setup.xml" />
-
-      <xi:include href="Chapter-Install/Section-Checkout.xml" />
-
-      <xi:include href="Chapter-Install/Section-Maven_build.xml" />
-
-      <xi:include href="Chapter-Install/Section-Eclipse.xml" />
-    </chapter>
-
-    <chapter>
-      <title>Decision Tables</title>
-
-      <xi:include href="Chapter-Decision_Tables/Section-Spreadsheet.xml" />
-    </chapter>
-
-    <chapter>
-      <title>The (Eclipse based) Rule IDE</title>
-
-      <xi:include href="Chapter-IDE/Section-QuickStart.xml" />
-    </chapter>
-
-    <chapter>
-      <title>The Rule Language</title>
-
-      <xi:include href="Chapter-Rule_Language/Section-Overview.xml" />
-
-      <xi:include href="Chapter-Rule_Language/Section-Comments.xml" />
-
-      <xi:include href="Chapter-Rule_Language/Section-Package.xml" />
-
-      <xi:include href="Chapter-Rule_Language/Section-Function.xml" />
-
-      <xi:include href="Chapter-Rule_Language/Section-Rule.xml" />
-
-      <xi:include href="Chapter-Rule_Language/Section-Query.xml" />
-
-      <xi:include href="Chapter-Rule_Language/Section-DSL.xml" />
-
-      <xi:include href="Chapter-Rule_Language/Section-RuleFlow.xml" />
-
-      <xi:include href="Chapter-Rule_Language/Section-XML.xml" />
-
-      <!--xi:include href="Chapter-Rule_Language/Section-Column.xml" />
-
-      <xi:include href="Chapter-Rule_Language/Section-Field_Constraints.xml" />
-
-      <xi:include href="Chapter-Rule_Language/Section-Conditional_Elements.xml" /-->
-    </chapter>
-
-    <chapter>
-      <title>Deployment and Testing</title>
-
-      <xi:include href="Chapter-Deployment/Section-Deployment.xml" />
-
-      <xi:include href="Chapter-Deployment/Section-Testing.xml" />
-    </chapter>
-
-      <chapter>
-        <title>The Java Rule Engine API</title>
-
-        <xi:include href="Chapter-JSR94/Section-Introduction.xml" />
-
-        <!-- Removed till it can be completed -->
-
-        <!-- include href="Chapter-JSR94/Section-Specification.xml" /-->
-
-        <xi:include href="Chapter-JSR94/Section-How_To_Use.xml" />
-
-        <xi:include href="Chapter-JSR94/Section-References.xml" />
-      </chapter>
-
-      <chapter>
-        <title>The BRMS (Business Rule Management System)</title>
-
-        <xi:include href="Chapter-BRMS/Section-Introduction.xml" />
-
-        <xi:include href="Chapter-BRMS/Section-AdminGuide.xml" />
-
-        <xi:include href="Chapter-BRMS/Section-Architecture.xml" />
-
-        <xi:include href="Chapter-BRMS/Section-UserGuide.xml" />
-
-        <xi:include href="Chapter-BRMS/Section-ExamplesAndTutorials.xml" />
-      </chapter>
-
-	  <!--
-      <chapter>
-        <title>The Drools Solver (experimental)</title>
-
-        <xi:include href="Chapter-Solver/Section-Solver_introduction.xml" />
-
-        <xi:include href="Chapter-Solver/Section-Solver_configuration.xml" />
-
-        <xi:include href="Chapter-Solver/Section-Score_calculation.xml" />
-
-        <xi:include href="Chapter-Solver/Section-Local_Search_Solver.xml" />
-      </chapter>
-	  -->
-
-	<chapter>
-      <title>Examples</title>
-
-      <xi:include href="Chapter-Examples/Section-Examples.xml" />
-    </chapter>
-
-    <!--<chapter>
-      <title>Papers</title>
-
-      <xi:include href="Chapter-Papers/Section-Manners.xml" />
-    </chapter-->
-  </part>
-
-  <index />
+<?xml version="1.0" encoding="UTF-8"?>
+<book xmlns:xi="http://www.w3.org/2003/XInclude">
+  <bookinfo>
+    <title>Drools</title>
+
+    <subtitle>Drools Documentation</subtitle>
+
+    <releaseinfo>4.0.2.SNAPSHOT</releaseinfo>
+
+    <author>
+      <firstname>Mark</firstname>
+
+      <surname>Proctor</surname>
+    </author>
+
+    <author>
+      <firstname>Michael</firstname>
+
+      <surname>Neale</surname>
+    </author>
+
+    <author>
+      <firstname>Michael</firstname>
+
+      <surname>Frandsen</surname>
+    </author>
+
+    <author>
+      <firstname>Sam</firstname>
+
+      <surname>Griffith Jr.</surname>
+    </author>
+
+    <author>
+      <firstname>Edson</firstname>
+
+      <surname>Tirelli</surname>
+    </author>
+
+    <author>
+      <firstname>Fernando</firstname>
+
+      <surname>Meyer</surname>
+    </author>
+
+    <author>
+      <firstname>Kris</firstname>
+
+      <surname>Verlaenen</surname>
+    </author>
+  </bookinfo>
+
+  <toc />
+
+  <preface id="preface" revision="2">
+    <title>Preface</title>
+
+    <mediaobject>
+      <imageobject>
+        <imagedata fileref="drools_logo.png" />
+      </imageobject>
+    </mediaobject>
+
+    <para />
+  </preface>
+
+  <title>Drools Manual</title>
+
+  <part>
+    <title>Reference Manual</title>
+
+    <chapter>
+      <title>Drools 4.0 Release Notes</title>
+
+      <xi:include href="Chapter-Release_Notes/Section-What_is_new.xml" />
+
+      <xi:include href="Chapter-Release_Notes/Section-Upgrade_tips.xml" />
+    </chapter>
+
+    <chapter>
+      <title>The Rule Engine</title>
+
+      <xi:include href="Chapter-Rule_Engine/Section-What_is_a_Rule_Engine.xml" />
+
+      <xi:include href="Chapter-Rule_Engine/Section-Why_use_a_Rule_Engine.xml" />
+
+      <xi:include href="Chapter-Rule_Engine/Section-Rules.xml" />
+
+      <xi:include href="Chapter-Rule_Engine/Section-Rete_Algorithm.xml" />
+
+      <xi:include href="Chapter-Rule_Engine/Section-The_Drools_Rule_Engine.xml" />
+
+      <!--xi:include href="Chapter-Rule_Engine/Section-Rule_Base.xml" />
+
+      <xi:include href="Chapter-Rule_Engine/Section-Working_Memory.xml" />
+
+      <xi:include href="Chapter-Rule_Engine/Section-Agenda.xml" />
+
+      <xi:include href="Chapter-Rule_Engine/Section-Event_Model.xml" /-->
+    </chapter>
+
+    <chapter>
+      <title>Installation and Setup (Core and IDE)</title>
+
+      <xi:include href="Chapter-Install/Section-Install.xml" />
+
+      <xi:include href="Chapter-Install/Section-Setup.xml" />
+
+      <xi:include href="Chapter-Install/Section-Checkout.xml" />
+
+      <xi:include href="Chapter-Install/Section-Maven_build.xml" />
+
+      <xi:include href="Chapter-Install/Section-Eclipse.xml" />
+    </chapter>
+
+    <chapter>
+      <title>Decision Tables</title>
+
+      <xi:include href="Chapter-Decision_Tables/Section-Spreadsheet.xml" />
+    </chapter>
+
+    <chapter>
+      <title>The (Eclipse based) Rule IDE</title>
+
+      <xi:include href="Chapter-IDE/Section-QuickStart.xml" />
+    </chapter>
+
+    <chapter>
+      <title>The Rule Language</title>
+
+      <xi:include href="Chapter-Rule_Language/Section-Overview.xml" />
+
+      <xi:include href="Chapter-Rule_Language/Section-Comments.xml" />
+
+      <xi:include href="Chapter-Rule_Language/Section-Package.xml" />
+
+      <xi:include href="Chapter-Rule_Language/Section-Function.xml" />
+
+      <xi:include href="Chapter-Rule_Language/Section-Rule.xml" />
+
+      <xi:include href="Chapter-Rule_Language/Section-Query.xml" />
+
+      <xi:include href="Chapter-Rule_Language/Section-DSL.xml" />
+
+      <xi:include href="Chapter-Rule_Language/Section-RuleFlow.xml" />
+
+      <xi:include href="Chapter-Rule_Language/Section-XML.xml" />
+
+      <!--xi:include href="Chapter-Rule_Language/Section-Column.xml" />
+
+      <xi:include href="Chapter-Rule_Language/Section-Field_Constraints.xml" />
+
+      <xi:include href="Chapter-Rule_Language/Section-Conditional_Elements.xml" /-->
+    </chapter>
+
+    <chapter>
+      <title>Deployment and Testing</title>
+
+      <xi:include href="Chapter-Deployment/Section-Deployment.xml" />
+
+      <xi:include href="Chapter-Deployment/Section-Testing.xml" />
+    </chapter>
+
+      <chapter>
+        <title>The Java Rule Engine API</title>
+
+        <xi:include href="Chapter-JSR94/Section-Introduction.xml" />
+
+        <!-- Removed till it can be completed -->
+
+        <!-- include href="Chapter-JSR94/Section-Specification.xml" /-->
+
+        <xi:include href="Chapter-JSR94/Section-How_To_Use.xml" />
+
+        <xi:include href="Chapter-JSR94/Section-References.xml" />
+      </chapter>
+
+      <chapter>
+        <title>The BRMS (Business Rule Management System)</title>
+
+        <xi:include href="Chapter-BRMS/Section-Introduction.xml" />
+
+        <xi:include href="Chapter-BRMS/Section-AdminGuide.xml" />
+
+        <xi:include href="Chapter-BRMS/Section-Architecture.xml" />
+
+        <xi:include href="Chapter-BRMS/Section-UserGuide.xml" />
+
+        <xi:include href="Chapter-BRMS/Section-ExamplesAndTutorials.xml" />
+      </chapter>
+
+	  <!--
+      <chapter>
+        <title>The Drools Solver (experimental)</title>
+
+        <xi:include href="Chapter-Solver/Section-Solver_introduction.xml" />
+
+        <xi:include href="Chapter-Solver/Section-Solver_configuration.xml" />
+
+        <xi:include href="Chapter-Solver/Section-Score_calculation.xml" />
+
+        <xi:include href="Chapter-Solver/Section-Local_Search_Solver.xml" />
+      </chapter>
+	  -->
+
+	<chapter>
+      <title>Examples</title>
+
+      <xi:include href="Chapter-Examples/Section-Examples.xml" />
+    </chapter>
+
+    <!--<chapter>
+      <title>Papers</title>
+
+      <xi:include href="Chapter-Papers/Section-Manners.xml" />
+    </chapter-->
+  </part>
+
+  <index />
 </book>
\ No newline at end of file




More information about the jboss-svn-commits mailing list