[jboss-svn-commits] JBL Code SVN: r26095 - labs/jbossrules/trunk/drools-docs/drools-docs-expert/src/main/docbook/en-US/Chapter-Quick_Start.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Fri Apr 17 05:35:45 EDT 2009
Author: laune
Date: 2009-04-17 05:35:45 -0400 (Fri, 17 Apr 2009)
New Revision: 26095
Modified:
labs/jbossrules/trunk/drools-docs/drools-docs-expert/src/main/docbook/en-US/Chapter-Quick_Start/Section-More_On_Building_And_Deploying.xml
Log:
improvements
Modified: labs/jbossrules/trunk/drools-docs/drools-docs-expert/src/main/docbook/en-US/Chapter-Quick_Start/Section-More_On_Building_And_Deploying.xml
===================================================================
--- labs/jbossrules/trunk/drools-docs/drools-docs-expert/src/main/docbook/en-US/Chapter-Quick_Start/Section-More_On_Building_And_Deploying.xml 2009-04-17 09:35:31 UTC (rev 26094)
+++ labs/jbossrules/trunk/drools-docs/drools-docs-expert/src/main/docbook/en-US/Chapter-Quick_Start/Section-More_On_Building_And_Deploying.xml 2009-04-17 09:35:45 UTC (rev 26095)
@@ -13,19 +13,21 @@
<section>
<title>KnowledgeBase by Configuration using Changesets</title>
- <para>The programmatic api has been used so far to build a
- KnowledgeBase, quite often it's more desirable to this via
- configuration. To facilitate this drools supports the changeset.xml
- which contains a list of resources, it's recursive so it can actually
- also point to other changeset.xml. Currently the changeset has a single
- "add" element, support for remove and modify will be added in the future
- for more powerful incremental changes over time. There is currently no
- XSD for the xml, we hope to add one soon, so a few examples will be
- shown to give the jist of things. A resource approach is used that uses
- a prefix of the used protocol, it supports all the protocolols provided
- by java.net.URL, such as file" and "http", as well as an additional
- "classpath". Currently the type attribute must always be specified for a
- resource, it is not inferred from the file name extension. Here is a
+ <para>So far, the programmatic API has been used to build a
+ KnowledgeBase. Quite often it's more desirable to do this via
+ configuration. To facilitate this, Drools supports the "changeset"
+ feature. The file changeset.xml contains a list of resources, and it
+ may also point recursively to another changeset.xml. Currently the
+ changeset has only a single "add" element, but support for remove
+ and modify will be added in the future, for more powerful incremental
+ changes over time. Currently there is no XML schema for the changeset
+ XML, but we hope to add one soon. A few examples will be
+ shown to give you the gist of things. A resource approach is employed
+ that uses a prefix to indicate the protocol. All the protocols provided
+ by java.net.URL, such as "file" and "http" are supported, as well as an
+ additional "classpath". Currently the type attribute must always be
+ specified for a resource, as it is not inferred from the file name extension.
+ Here is a
simple example that points to a http location for some rules.</para>
<programlisting> <change-set xmlns='http://drools.org/drools-5.0/change-set'
@@ -37,7 +39,7 @@
</change-set>
</programlisting>
- <para>To use the above xml the code is almost identical as before,
+ <para>To use the above XML the code is almost identical as before,
except we change the ResourceType to CHANGE_SET.</para>
<programlisting>KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
@@ -47,15 +49,15 @@
System.err.println( builder.getErrors().toString() );
} </programlisting>
- <para>Change sets can include any number of resources and even supports
+ <para>Changesets can include any number of resources, and they even support
additional configuration information, which currently is only needed for
- decision tables. Below the example is expanded to load the rules from a
- http url location and an excel decision table from the classpath.</para>
+ decision tables. The example below is expanded to load the rules from a
+ http URL location, and an Excel decision table from the classpath.</para>
<programlisting> <change-set xmlns='http://drools.org/drools-5.0/change-set'
xmlns:xs='http://www.w3.org/2001/XMLSchema-instance'
- xs:schemaLocation='http://drools.org/drools-5.0/change-set drools-change-set-5.0.xsd' >
- <add>
+ xs:schemaLocation='http://drools.org/drools-5.0/change-set.xsd' >
+ <add>
<resource source='http:org/domain/myrules.drl' type='DRL' />
<resource source='classpath:data/IntegrationExampleTest.xls' type="DTABLE">
<decisiontable-conf input-type="XLS" worksheet-name="Tables_2" />
@@ -64,15 +66,15 @@
</change-set>
</programlisting>
- <para>It is also possible to specify a directory, where the contents of
- that directory will be added, it is expected that all the contents are
- of the type specified, type is not yet inferred from file name
+ <para>It is also possible to specify a directory, to add the contents of
+ that directory. It is expected that all the files are
+ of the specified type, since type is not yet inferred from the file name
extensions.</para>
<programlisting> <change-set xmlns='http://drools.org/drools-5.0/change-set'
xmlns:xs='http://www.w3.org/2001/XMLSchema-instance'
- xs:schemaLocation='http://drools.org/drools-5.0/change-set drools-change-set-5.0.xsd' >
- <add>
+ xs:schemaLocation='http://drools.org/drools-5.0/change-set.xsd' >
+ <add>
<resource source='file://myfolder/' type='DRL' />
</add>
</change-set>
@@ -83,7 +85,7 @@
<title>Knowledge Agent</title>
<para>The KnowlegeAgent provides automatic loading, caching and
- re-loading, of resources and is configured from a properties files. The
+ re-loading of resources and is configured from a properties files. The
KnowledgeAgent can update or rebuild this KnowlegeBase as the resources
it uses are changed. The strategy for this is determined by the
configuration given to the factory, but it is typically pull based using
@@ -95,10 +97,10 @@
KnowledgeBase kbase = kagent.getKnowledgeBase();</programlisting>
<para>The KnowledgeAgent will continously scan all the added resources,
- using a default polling of 60s, and if their last modified date is
+ using a default polling interval of 60s, and if their last modified date is
updated it will rebuild the cached KnowledgeBase using the new
- resources. Note the previous KnowledgeBase reference will still exist
- and you'll have to call getKnowledgeBase() to accessly the newly built
+ resources. Note that the previous KnowledgeBase reference will still exist
+ and you'll have to call getKnowledgeBase() to access the newly built
KnowledgeBase. If a directory is specified as part of the change set,
the entire contents of that directory will be scanned for
changes.</para>
More information about the jboss-svn-commits
mailing list