[jboss-svn-commits] JBL Code SVN: r18657 - in labs/jbossrules/branches/irooskov_docs/drools-docs/drools-docs-userguide/en: Chapter-Rule_Engine and 1 other directory.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Mon Mar 3 01:04:58 EST 2008
Author: irooskov at redhat.com
Date: 2008-03-03 01:04:56 -0500 (Mon, 03 Mar 2008)
New Revision: 18657
Modified:
labs/jbossrules/branches/irooskov_docs/drools-docs/drools-docs-userguide/en/Chapter-Release_Notes/Section-Upgrade_tips.xml
labs/jbossrules/branches/irooskov_docs/drools-docs/drools-docs-userguide/en/Chapter-Release_Notes/Section-What_is_new.xml
labs/jbossrules/branches/irooskov_docs/drools-docs/drools-docs-userguide/en/Chapter-Rule_Engine/Section-Rete_Algorithm.xml
labs/jbossrules/branches/irooskov_docs/drools-docs/drools-docs-userguide/en/Chapter-Rule_Engine/Section-Rules.xml
labs/jbossrules/branches/irooskov_docs/drools-docs/drools-docs-userguide/en/Chapter-Rule_Engine/Section-The_Drools_Rule_Engine.xml
labs/jbossrules/branches/irooskov_docs/drools-docs/drools-docs-userguide/en/Chapter-Rule_Engine/Section-What_is_a_Rule_Engine.xml
labs/jbossrules/branches/irooskov_docs/drools-docs/drools-docs-userguide/en/Chapter-Rule_Engine/Section-Why_use_a_Rule_Engine.xml
Log:
Updated files with spelling and grammar changes. Taken notes on book split changes relating to files up to 2.5.4.6 of Drools User Guide
Modified: labs/jbossrules/branches/irooskov_docs/drools-docs/drools-docs-userguide/en/Chapter-Release_Notes/Section-Upgrade_tips.xml
===================================================================
--- labs/jbossrules/branches/irooskov_docs/drools-docs/drools-docs-userguide/en/Chapter-Release_Notes/Section-Upgrade_tips.xml 2008-03-03 00:46:52 UTC (rev 18656)
+++ labs/jbossrules/branches/irooskov_docs/drools-docs/drools-docs-userguide/en/Chapter-Release_Notes/Section-Upgrade_tips.xml 2008-03-03 06:04:56 UTC (rev 18657)
@@ -21,7 +21,7 @@
<para>Drools 3.0.x had only one working memory type that worked like a
stateful working memory. Drools 4.0.x introduces separate APIs for
- Stateful and Stateless working memories that are called now Rule
+ Stateful and Stateless working memories that are now called Rule
Sessions. In Drools 3.0.x, the code to create a working memory
was:</para>
@@ -133,7 +133,7 @@
<section>
<title>Primitive support and unboxing</title>
- <para>Drools 3.0.x did not had native support for primitive types and
+ <para>Drools 3.0.x did not have native support for primitive types and
consequently, it auto-boxed all primitives in it's respective wrapper
classes. That way, any use of a boxed variable binding required a manual
unbox.</para>
@@ -177,19 +177,21 @@
of DRL files from Drools 3.0.x to Drools 4.0.x.</para>
<para>At this point, its main objective is to upgrade the memory action
- calls from 3.0.x to 4.0.x, but expect it to grow over the next few weeks
- covering additional scenarios. It is important to note that it does not
- make a dumb text search and replace in rules file, but it actually parses
- the rules file and try to make sure it is not doing anything unexpected,
- and as so, it is a safe tool to use for upgrade large sets of rule
+ calls from 3.0.x to 4.0.x, but expect it to grow to covering additional
+scenarios. It is important to note that it does not
+ make a dumb text search and replace in the rules file, but it actually
+parses
+ the rules file and tries to make sure it is not doing anything
+unexpected,
+ and as so, it is a safe tool to use for upgrading large sets of rule
files.</para>
<para>The drools update tool can be found as a maven project in the
following source repository
http://anonsvn.labs.jboss.com/labs/jbossrules/trunk/experimental/drools-update/
you just need to check it out, and execute the maven clean install action
- with the project's pom.xml file. After resolve all the class path
- dependencies you are able to run the toll with the following
+ with the project's pom.xml file. After, resolve all the class path
+ dependencies you are able to and run the tool with the following
command:</para>
<programlisting>java -cp $CLASSPATH org.drools.tools.update.UpdateTool -f <filemask> [-d <basedir>] [-s <sufix>]</programlisting>
@@ -222,7 +224,7 @@
<para>It is important to note that the DSL template engine was rewritten
from scratch to improve flexibility. One of the new features of DSL
- grammars is the support to Regular Expressions. This way, now you can
+ grammars is the support to Regular Expressions. This way, you can now
write your mappings using regexp to have additional flexibility, as
explained in the DSL chapter. Although, now you have to escape characters
with regexp meaning. Example: if previously you had a matching
Modified: labs/jbossrules/branches/irooskov_docs/drools-docs/drools-docs-userguide/en/Chapter-Release_Notes/Section-What_is_new.xml
===================================================================
--- labs/jbossrules/branches/irooskov_docs/drools-docs/drools-docs-userguide/en/Chapter-Release_Notes/Section-What_is_new.xml 2008-03-03 00:46:52 UTC (rev 18656)
+++ labs/jbossrules/branches/irooskov_docs/drools-docs/drools-docs-userguide/en/Chapter-Release_Notes/Section-What_is_new.xml 2008-03-03 06:04:56 UTC (rev 18657)
@@ -3,7 +3,7 @@
<title>What is new in Drools 4.0</title>
<para>Drools 4.0 is a major update over the previous Drools 3.0.x series. A
- whole new set of features were developed which special focus on language
+ whole new set of features were developed with special focus on language
expressiveness, engine performance and tools availability. The following is
a list of the most interesting changes.</para>
Modified: labs/jbossrules/branches/irooskov_docs/drools-docs/drools-docs-userguide/en/Chapter-Rule_Engine/Section-Rete_Algorithm.xml
===================================================================
--- labs/jbossrules/branches/irooskov_docs/drools-docs/drools-docs-userguide/en/Chapter-Rule_Engine/Section-Rete_Algorithm.xml 2008-03-03 00:46:52 UTC (rev 18656)
+++ labs/jbossrules/branches/irooskov_docs/drools-docs/drools-docs-userguide/en/Chapter-Rule_Engine/Section-Rete_Algorithm.xml 2008-03-03 06:04:56 UTC (rev 18657)
@@ -12,7 +12,7 @@
into 2 parts: rule compilation and runtime execution.</para>
<para>The compilation algorithm describes how the Rules in the Production
- Memory to generate an efficient discrimination network. In non-technical
+ Memory generate an efficient discrimination network. In non-technical
terms, a discrimination network is used to filter data. The idea is to
filter data as it propagates through the network. At the top of the network
the nodes would have many matches and as we go down the network, there would be
@@ -56,7 +56,7 @@
</mediaobject>
</figure>
- <para>ObjectTypdeNodes can propagate to AlphaNodes, LeftInputAdapterNodes
+ <para>ObjectTypeNodes can propagate to AlphaNodes, LeftInputAdapterNodes
and BetaNodes. AlphaNodes are used to evaluate literal conditions. Although
the 1982 paper only covers equality conditions, many RETE implementations
support other operations. For example, Account.name == "Mr Trout" is a
@@ -100,7 +100,7 @@
can do a hash lookup on that String value. This means when facts enter from
the opposite side, instead of iterating over all the facts to find valid
joins, we do a lookup returning potentially valid candidates. At any
- point a valid join is found the Tuple is joined with the Object; which is
+ point if a valid join is found the Tuple is joined with the Object; which is
referred to as a partial match; and then propagated to the next node.</para>
<figure>
@@ -113,7 +113,7 @@
</mediaobject>
</figure>
- <para>To enable the first Object, in the above case Cheese, to enter the
+ <para>To enable the first Object (in the above case this is Cheese) to enter the
network we use a LeftInputNodeAdapter - this takes an Object as an input and
propagates a single Object Tuple.</para>
@@ -126,7 +126,7 @@
<para>Drools also performs node sharing. Many rules repeat the same
patterns, node sharing allows us to collapse those patterns so that they
don't have to be re-evaluated for every single instance. The following two
- rules share the first same pattern, but not the last:</para>
+ rules share the same first pattern, but not the last:</para>
<programlisting>
<![CDATA[
Modified: labs/jbossrules/branches/irooskov_docs/drools-docs/drools-docs-userguide/en/Chapter-Rule_Engine/Section-Rules.xml
===================================================================
--- labs/jbossrules/branches/irooskov_docs/drools-docs/drools-docs-userguide/en/Chapter-Rule_Engine/Section-Rules.xml 2008-03-03 00:46:52 UTC (rev 18656)
+++ labs/jbossrules/branches/irooskov_docs/drools-docs/drools-docs-userguide/en/Chapter-Rule_Engine/Section-Rules.xml 2008-03-03 06:04:56 UTC (rev 18657)
@@ -247,9 +247,9 @@
<para>So in Java we can say that a simple proposition is of the form
'variable' 'operator' 'value' - where we often refer to 'value' as being a
literal value - a proposition can be thought as a field constraint.
- Further to this propositions can be combined with conjunctive and
+ Further to this, propositions can be combined with conjunctive and
disjunctive connectives, which is the logic theorists way of saying
- '&&' and '||'. The following shows two open propositional
+ '&&'(and) and '||' (or). The following shows two open propositional
statements connected together with a single disjunctive connective.</para>
<programlisting>
@@ -292,7 +292,7 @@
each of the courses the Student attended for that semester, referenced by
the List collection. At the end of the semester each Module has a score.
If the Student has a Module score below 40 then they will fail that
- semester - the existential quantifier can be used used with the "less than
+ semester - the existential quantifier can be used with the "less than
40" open proposition to check for the existence of a Module that is true
for the specified criteria.</para>
Modified: labs/jbossrules/branches/irooskov_docs/drools-docs/drools-docs-userguide/en/Chapter-Rule_Engine/Section-The_Drools_Rule_Engine.xml
===================================================================
--- labs/jbossrules/branches/irooskov_docs/drools-docs/drools-docs-userguide/en/Chapter-Rule_Engine/Section-The_Drools_Rule_Engine.xml 2008-03-03 00:46:52 UTC (rev 18656)
+++ labs/jbossrules/branches/irooskov_docs/drools-docs/drools-docs-userguide/en/Chapter-Rule_Engine/Section-The_Drools_Rule_Engine.xml 2008-03-03 06:04:56 UTC (rev 18657)
@@ -115,7 +115,7 @@
</mediaobject>
</figure>
- <para>It has default values that can be overridden programmatically via
+ <para>PackageBuilder has default values that can be overridden programmatically via
setters or on first use via property settings. At the heart of the
settings is the ChainedProperties class which searches a number of
locations looking for drools.packagebuilder.conf files; as it finds them
@@ -123,7 +123,7 @@
level precedence. In order of precedence those locations are: System
Properties, user defined file in System Properties, user home directory,
working directory, various META-INF locations. Further to this the
- droosl-compiler jar has the default settings in its META-INF
+ drools-compiler jar has the default settings in its META-INF
directory.</para>
<para>Currently the PackageBuilderConfiguration handles the registry of
@@ -131,7 +131,7 @@
ClassLoader.</para>
<para>Drools has a pluggable Dialect system, which allows other languages
- to compile and execution expressions and blocks, the two currently
+ to compile and execute expressions and blocks, the two currently
supported dialects are Java and MVEL. Each has its own
DialectConfiguration Implementation; the javadocs provide details for each
setter/getter and the property names used to configure them.</para>
@@ -148,7 +148,7 @@
</figure>
<para>The JavaDialectConfiguration allows the compiler and language levels
- to be supported. You can override by setting the
+ to be supported. You can override this by setting the
"drools.dialect.java.compiler" property in a packagebuilder.conf file that
the ChainedProperties instance will find, or you can do it at runtime as
shown below.</para>
@@ -162,9 +162,9 @@
javaConf.setCompiler( JavaDialectConfiguration.JANINO ); </programlisting>
</example>
- <para>if you do not have Eclipse JDT Core in your classpath you must
+ <para>If you do not have Eclipse JDT Core in your classpath you must
override the compiler setting before you instantiate this PackageBuilder,
- you can either do that with a packagebuilder properties file the
+ you can either do that with a packagebuilder properties file that the
ChainedProperties class will find, or you can do it programmatically as
shown below; note this time I use properties to inject the value for
startup.</para>
@@ -187,7 +187,7 @@
"1.4" with the parent class loader set to
"Thread.currentThread().getContextClassLoader()".</para>
- <para>The following show how to specify the JANINO compiler
+ <para>The following shows how to specify the JANINO compiler
programmatically:</para>
<example>
@@ -200,7 +200,7 @@
</example>
<para>The MVELDialectConfiguration is much simpler and only allows strict
- mode to be turned on and off, by default strict is true; this means all
+ mode to be turned on and off; by default strict is true. This means all
method calls must be type safe either by inference or by explicit
typing.</para>
@@ -256,7 +256,7 @@
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>
+ expensive when talking about time.</para>
<para>A Rule Base instance is thread safe, in the sense that you can have
the one instance shared across threads in your application, which may be a
@@ -323,9 +323,9 @@
</mediaobject>
</figure>
- <para>It holds references to all data that has been "inserted" into it
+ <para>Working Memory 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
+ application occurs. Working memories are stateful objects that may be
shortlived or longlived.</para>
<section>
@@ -336,7 +336,7 @@
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
data. Strings and other classes without getters and setters are not
- valid Facts and can't be used with Field Constraints which rely on the
+ valid Facts, and can't be used with Field Constraints which rely on the
JavaBean standard of getters and setters to interact with the
object.</para>
</section>
@@ -352,8 +352,8 @@
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
+ made available to the system, however due to assert becoming a keyword
+ in most languages we 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.
@@ -361,7 +361,7 @@
thus causing new work to be needed.
-->
- <para>When an Object is insert it returns a FactHandle. This FactHandle
+ <para>When an Object is inserted 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>
@@ -369,7 +369,7 @@
<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
+ <para>As mentioned in the Rule Base section, Working Memory may operate
in two assertions modes equality and identity - identity is
default.</para>
@@ -381,7 +381,7 @@
<para>Equality means the Working Memory uses a HashMap to store all
asserted Objects. New instance assertions will only return a new
- FactHandle if a not equal classes have been asserted.</para>
+ FactHandle if a "not equal" class have been asserted.</para>
</section>
<section>
@@ -404,8 +404,7 @@
<section>
<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
+ <para>The Rule Engine must be notified of modified Facts, so that it can re-process. Modification internally is actually a retract and then an
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.
Modified: labs/jbossrules/branches/irooskov_docs/drools-docs/drools-docs-userguide/en/Chapter-Rule_Engine/Section-What_is_a_Rule_Engine.xml
===================================================================
--- labs/jbossrules/branches/irooskov_docs/drools-docs/drools-docs-userguide/en/Chapter-Rule_Engine/Section-What_is_a_Rule_Engine.xml 2008-03-03 00:46:52 UTC (rev 18656)
+++ labs/jbossrules/branches/irooskov_docs/drools-docs/drools-docs-userguide/en/Chapter-Rule_Engine/Section-What_is_a_Rule_Engine.xml 2008-03-03 06:04:56 UTC (rev 18657)
@@ -36,7 +36,7 @@
general purpose Rule Engines by providing, business user focused, systems
for rule creation, management, deployment, collaboration, analysis and end
user tools. Further adding to this value is the fast evolving and popular
- methodology "Business Rules Approach", which is a helping to formalize the
+ methodology "Business Rules Approach", which is helping to formalize the
role of Rule Engines in the enterprise.</para>
<para>The term Rule Engine is quite ambiguous in that it can be any system
@@ -51,13 +51,13 @@
subtleties of Rules Engines differences, who was hoping to find some
hidden secrets to help improve the Drools engine. JBoss jBPM uses
expressions and delegates in its Decision nodes; which control the
- transitions in a Workflow. At each node it evaluates has a rule set that
+ transitions in a Workflow. At each node it evaluates there is a rule set that
dictates the transition to undertake - this is also a Rule Engine. While a
Production Rule System is a kind of Rule Engine and also an Expert System,
- the validation and expression evaluation Rule Engines mention previously
+ the validation and expression evaluation Rule Engines mentioned previously
are not Expert Systems.</para>
- <para>A Production Rule System is turing complete with a focus on
+ <para>A Production Rule System focuses on
knowledge representation to express propositional and first order logic in
a concise, non ambiguous and declarative manner. The brain of a Production
Rules System is an Inference Engine that is able to scale to a large
@@ -100,9 +100,7 @@
<para>Drools implements and extends the <indexterm>
<primary>Rete</primary>
</indexterm> Rete algorithm, <indexterm>
- <primary>Leaps</primary>
- </indexterm> Leaps use to be supported but was removed due to poor
- maintenance. The Drools <indexterm>
+ </indexterm>The Drools <indexterm>
<primary>Rete</primary>
</indexterm> Rete implementation is called ReteOO, signifying that
Drools has an enhanced and optimized implementation of the Rete algorithm
Modified: labs/jbossrules/branches/irooskov_docs/drools-docs/drools-docs-userguide/en/Chapter-Rule_Engine/Section-Why_use_a_Rule_Engine.xml
===================================================================
--- labs/jbossrules/branches/irooskov_docs/drools-docs/drools-docs-userguide/en/Chapter-Rule_Engine/Section-Why_use_a_Rule_Engine.xml 2008-03-03 00:46:52 UTC (rev 18656)
+++ labs/jbossrules/branches/irooskov_docs/drools-docs/drools-docs-userguide/en/Chapter-Rule_Engine/Section-Why_use_a_Rule_Engine.xml 2008-03-03 06:04:56 UTC (rev 18657)
@@ -43,9 +43,8 @@
<para>Rule systems are capable of solving very, very hard problems,
providing an explanation of how the solution was arrived at and why
- each "decision" along the way was made (not so easy with other of AI
- systems like neural networks or the human brain - I have no idea why I
- scratched the side of the car).</para>
+ each "decision" along the way was made (not so easy with other AI
+ systems like neural networks or the human brain).</para>
</listitem>
<listitem>
@@ -65,8 +64,8 @@
<listitem>
<para>Speed and Scalability</para>
- <para>The Rete algorithm, Leaps algorithm, and its descendants such as
- Drools' Reteoo (and Leaps), provide very efficient ways of matching
+ <para>The Rete algorithm, and its descendants such as
+ Drools' ReteOO, provide very efficient ways of matching
rule patterns to your domain object data. These are especially
efficient when you have datasets that do not change entirely (as the
rule engine can remember past matches). These algorithms are battle
@@ -77,7 +76,7 @@
<para>Centralization of Knowledge</para>
<para>By using rules, you create a repository of knowledge (a
- knowledgebase) which is executable. This means it's a single point of
+ knowledge base) which is executable. This means it's a single point of
truth, for business policy (for instance) - ideally rules are so
readable that they can also serve as documentation.</para>
</listitem>
@@ -85,7 +84,7 @@
<listitem>
<para>Tool Integration</para>
- <para>Tools such as Eclipse (and in future, Web based UIs) provide
+ <para>Tools such as Eclipse (and in the future, Web based User Interfaces) provide
ways to edit and manage rules and get immediate feedback, validation
and content assistance. Auditing and debugging tools are also
available.</para>
@@ -106,7 +105,7 @@
Languages that model your problem domain you can set yourself up to
write rules that are very close to natural language. They lend
themselves to logic that is understandable to, possibly nontechnical,
- domain experts as they are expressed in their language (as all the
+ domain experts as they are expressed in their language (all the
program plumbing, the "How", is in the usual code, hidden
away).</para>
</listitem>
@@ -121,7 +120,7 @@
answer, some more explanation is required. The reason why there is no
"traditional" approach is possibly one of the following: <itemizedlist>
<listitem>
- <para>The problem is just too fiddle for traditional code.</para>
+ <para>The problem is just too fiddly for traditional code.</para>
<para>The problem may not be complex, but you can't see a
non-fragile way of building it.</para>
@@ -132,7 +131,7 @@
solution.</para>
<para>It is a complex problem to solve, there are no obvious
- traditional solutions or basically the problem isn't fully
+ traditional solutions or the problem isn't fully
understood.</para>
</listitem>
@@ -180,7 +179,7 @@
no algorithms or patterns for, consider using rules.</para>
<para>Rules could be used embedded in your application or perhaps as a
- service. Often rules work best as "stateful" component - hence they are
+ service. Often rules work best as "stateful" components - hence they are
often an integral part of an application. However, there have been
successful cases of creating reusable rule services which are
stateless.</para>
@@ -205,7 +204,7 @@
it's designed for."</para>
<para>As rule engines are dynamic (dynamic in the sense that the rules can
- be stored and managed and updated as data), they are often looked at as a
+ be stored, managed and updated as data), they are often looked at as a
solution to the problem of deploying software (most IT departments seem to
exist for the purpose of preventing software being rolled out). If this is
the reason you wish to use a rule engine, be aware that rule engines work
@@ -224,9 +223,9 @@
<para>Alternatives are script-based engines that provide the dynamicness
for "changes on the fly" (there are many solutions here).</para>
- <para>Alternatively Process Engines (also capable of workflow) such as
+ <para>Alternatively, Process Engines (also capable of workflow) such as
jBPM allow you to graphically (or programmatically) describe steps in a
- process - those steps can also involve decision point which are in
+ process - those steps can also involve decision points which are in
themselves a simple rule. Process engines and rules often can work nicely
together, so it is not an either-or proposition.</para>
More information about the jboss-svn-commits
mailing list