[jboss-svn-commits] JBL Code SVN: r33547 - in labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Camel: Section-Introduction and 1 other directory.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Fri Jun 18 12:35:11 EDT 2010


Author: lucazamador
Date: 2010-06-18 12:35:11 -0400 (Fri, 18 Jun 2010)
New Revision: 33547

Modified:
   labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Camel/Section-API/Section-CamelRoutesCreation.xml
   labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Camel/Section-API/Section-CreatingDroolsCommands.xml
   labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Camel/Section-API/Section-CreatingOurCamelContext.xml
   labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Camel/Section-API/Section-RegisteringKnowledgeSession.xml
   labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Camel/Section-API/Section-SendingMessagesExchanges.xml
   labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Camel/Section-Introduction/Section-Introduction.xml
Log:
JBRULES-2542: Drools Commands documentation
- more details added

Modified: labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Camel/Section-API/Section-CamelRoutesCreation.xml
===================================================================
--- labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Camel/Section-API/Section-CamelRoutesCreation.xml	2010-06-18 14:02:46 UTC (rev 33546)
+++ labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Camel/Section-API/Section-CamelRoutesCreation.xml	2010-06-18 16:35:11 UTC (rev 33547)
@@ -6,53 +6,53 @@
          xmlns:m="http://www.w3.org/1998/Math/MathML"
          xmlns:html="http://www.w3.org/1999/xhtml"
          xmlns:db="http://docbook.org/ns/docbook">
+  <title>Camel Routes creation</title>
 
-    <title>Camel Routes creation</title>
+  <para>This is the most powerful feature of this integration, because of the
+  very large library of <link
+  xlink:href="http://camel.apache.org/component.html">Components</link>
+  provided by Camel to build pipelines.</para>
 
-    <para>This is the most powerful feature of this integration because Camel
-    bring us a very large Components library that we can use to create our
-    pipelines. In this section</para>
+  <note>
+    <para>A Camel Component is a factory of Endpoint instances</para>
+  </note>
 
-    <note>
-      <para>A Camel Component is a factory of Endpoint instances</para>
-    </note>
+  <para>The declaration of a Drools Endpoint needs a few parameters, as shown
+  below:</para>
 
-    <para>The declaration of a Drools Endpoint need a few parameters, that we
-    can see next:</para>
+  <para>drools:{0}/{1}?dataFormat={2}</para>
 
-    <para>drools:{0}/{1}?dataFormat={2}</para>
+  <para>{0} : Execution Node identifier that was registered in the
+  CamelContext</para>
 
-    <para>{0} : Execution Node identifier that was registered in the
-    CamelContext</para>
+  <para>{1} : Knowledge Session identifier that was registered in the
+  Execution Node with identifier {0}</para>
 
-    <para>{1} : Knowledge Session identifier that was registered in the
-    Execution Node with identifier {0}</para>
+  <para>{2} : XML command transformer that is going to be used. Currently, we
+  provide three implementations: drools-xstream, drools-jaxb and
+  drools-json.</para>
 
-    <para>{2} : XML command transformer that is going to be used. At this
-    moment we have two implementations: drools-xstream &amp;
-    drools-jaxb</para>
+  <para></para>
 
-    <para></para>
+  <para>The most important thing in this section is to know how to create your
+  Drools Endpoint, best shown in an example:</para>
 
-    <para>The most important thing in this section is know how create your
-    Drools Endpoint, so what is best that having a example:</para>
-
-    <para><programlisting>RouteBuilder rb = new RouteBuilder() { 
+  <para><programlisting>RouteBuilder rb = new RouteBuilder() { 
    public void configure() throws Exception {
       from("direct:with-session-xstream").to("drools:sm/ksession1?dataFormat=drools-xstream");
    }
 };
 camelContext.addRoutes(rb);</programlisting></para>
 
-    <para></para>
+  <para></para>
 
-    <para>In this example we created a simple route with a Direct Endpoint as
-    the input and a Drools Endpoint as the output. A Direct input allow us to
-    send the commands directly to the next endpoint in the route, invocating
-    their consumer, and which will process the XML command.</para>
+  <para>In this example we created a simple route with a <link
+  xlink:href="http://camel.apache.org/direct.html">Direct Endpoint</link> as
+  the input and a Drools Endpoint as the output. A Direct input allow us to
+  send the commands directly to the next endpoint in the route, invoking their
+  consumer, which in this case will process the XML command.</para>
 
-    <note>
-       When you send a XML command to a route, the format must be equal to the dataFormat transformer used in the route creation. 
-    </note>
-
+  <note>
+    Bear in mind that when you send a XML command to a route, the format must the same as the dataFormat transformer used in the route creation.
+  </note>
 </section>

Modified: labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Camel/Section-API/Section-CreatingDroolsCommands.xml
===================================================================
--- labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Camel/Section-API/Section-CreatingDroolsCommands.xml	2010-06-18 14:02:46 UTC (rev 33546)
+++ labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Camel/Section-API/Section-CreatingDroolsCommands.xml	2010-06-18 16:35:11 UTC (rev 33547)
@@ -6,81 +6,80 @@
          xmlns:m="http://www.w3.org/1998/Math/MathML"
          xmlns:html="http://www.w3.org/1999/xhtml"
          xmlns:db="http://docbook.org/ns/docbook">
+  <title>Creating Drools Commands</title>
 
-    <title>Creating Drools Commands</title>
+  <para>The next step is create our commands to be converted to XML. All our
+  commands must be added in a BatchExecutionCommand object because the lookup
+  is a required parameter in the XML format. The lookup parameter must be the
+  KnowledgeSession identifier in which we want to execute the commands.</para>
 
-    <para>The next step is create our commands to be converted to XML. All our
-    commands must be added in a BatchExecutionCommand object because the
-    lookup is a required parameter in the XML format. The lookup parameter
-    must be the KnowledgeSession identifier in which we want to execute the
-    commands.</para>
+  <para></para>
 
-    <para></para>
-
-    <para><programlisting>BatchExecutionCommand cmd = new BatchExecutionCommand();
+  <para><programlisting>BatchExecutionCommand cmd = new BatchExecutionCommand();
 cmd.setLookup("ksession1");
 cmd.getCommands().add(new InsertObjectCommand(new Person("lucaz", 25), "person1"));
 cmd.getCommands().add(new InsertObjectCommand(new Person("hadrian", 25), "person2"));
 cmd.getCommands().add(new InsertObjectCommand(new Person("baunax", 21), "person3"));
 cmd.getCommands().add(new FireAllRulesCommand());</programlisting></para>
 
-    <para>At this moment, the supported commands are:</para>
+  <para>At this moment, the supported commands are:</para>
 
-    <itemizedlist>
-      <listitem>
-         AbortWorkItemCommand 
-      </listitem>
+  <itemizedlist>
+    <listitem>
+       AbortWorkItemCommand 
+    </listitem>
 
-      <listitem>
-         CompleteWorkItemCommand 
-      </listitem>
+    <listitem>
+       CompleteWorkItemCommand 
+    </listitem>
 
-      <listitem>
-         FireAllRulesCommand 
-      </listitem>
+    <listitem>
+       FireAllRulesCommand 
+    </listitem>
 
-      <listitem>
-         GetGlobalCommand 
-      </listitem>
+    <listitem>
+       GetGlobalCommand 
+    </listitem>
 
-      <listitem>
-         InsertObjectCommand 
-      </listitem>
+    <listitem>
+       InsertObjectCommand 
+    </listitem>
 
-      <listitem>
-         RetractCommand 
-      </listitem>
+    <listitem>
+       RetractCommand 
+    </listitem>
 
-      <listitem>
-         ModifyCommand 
-      </listitem>
+    <listitem>
+       ModifyCommand 
+    </listitem>
 
-      <listitem>
-         InsertElementsCommand 
-      </listitem>
+    <listitem>
+       InsertElementsCommand 
+    </listitem>
 
-      <listitem>
-         QueryCommand 
-      </listitem>
+    <listitem>
+       QueryCommand 
+    </listitem>
 
-      <listitem>
-         SetGlobalCommand 
-      </listitem>
+    <listitem>
+       SetGlobalCommand 
+    </listitem>
 
-      <listitem>
-         SignalEventCommand 
-      </listitem>
+    <listitem>
+       SignalEventCommand 
+    </listitem>
 
-      <listitem>
-         StartProcessCommand 
-      </listitem>
-    </itemizedlist>
+    <listitem>
+       StartProcessCommand 
+    </listitem>
+  </itemizedlist>
 
-    <para></para>
+  <para></para>
 
-    <para>In the next sections you will see how to marshall/unmarshall the
-    commands to XML to XStream and JAXB</para>
+  <para>In the next sections you will see how to marshall/unmarshall the
+  commands to XML to XStream and JAXB</para>
 
-    <para></para>
-
+  <para><note>
+      For more information check the Drools Commands documentation
+    </note></para>
 </section>

Modified: labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Camel/Section-API/Section-CreatingOurCamelContext.xml
===================================================================
--- labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Camel/Section-API/Section-CreatingOurCamelContext.xml	2010-06-18 14:02:46 UTC (rev 33546)
+++ labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Camel/Section-API/Section-CreatingOurCamelContext.xml	2010-06-18 16:35:11 UTC (rev 33547)
@@ -6,26 +6,24 @@
          xmlns:m="http://www.w3.org/1998/Math/MathML"
          xmlns:html="http://www.w3.org/1999/xhtml"
          xmlns:db="http://docbook.org/ns/docbook">
+  <title>Creating our Camel Context</title>
 
-    <title>Creating our Camel Context</title>
+  <para>We need to create our own CamelContext to start. The first thing that
+  we should do is create and register the grid node that we are going to use
+  inside the CamelContext. In the most common cases we need to implement the
+  Local grid connection. The next step after the LocalConnection creation is
+  to get a new ExecutionNode and register this inside the CamelContext.</para>
 
-    <para>We need to create our own CamelContext to start. The first thing
-    that we should do is create and register the grid node that we are going
-    to use inside the CamelContext. In the most common cases we use the Local grid connection. 
-    The next step after the LocalConnection creation is get a new ExecutionNode and register this
-    inside the CamelContext.</para>
-
-    <programlisting>LocalConnection connection = new LocalConnection();
+  <programlisting>LocalConnection connection = new LocalConnection();
 ExecutionNode node = connection.getExecutionNode();
-node.setId("sm");
+node.setId("node");
 Context jndiContext = new JndiContext();
-jndiContext.bind("sm", node);
+jndiContext.bind("node", node);
 CamelContext camelContext = new DefaultCamelContext(jndiContext);</programlisting>
 
-    <para>After all this code now we have a properly configured CamelContext
-    with all the configuration to use the DroolsComponent. But isn't ready yet
-    to execute Drools, there're another steps left to reach that.</para>
+  <para>After this code, we have a properly configured CamelContext with all
+  the configurations to use a DroolsComponent. However, before we are ready to
+  execute Drools, we need to configure Camel entry points.</para>
 
-    <para></para>
-
+  <para></para>
 </section>

Modified: labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Camel/Section-API/Section-RegisteringKnowledgeSession.xml
===================================================================
--- labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Camel/Section-API/Section-RegisteringKnowledgeSession.xml	2010-06-18 14:02:46 UTC (rev 33546)
+++ labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Camel/Section-API/Section-RegisteringKnowledgeSession.xml	2010-06-18 16:35:11 UTC (rev 33547)
@@ -6,13 +6,11 @@
          xmlns:m="http://www.w3.org/1998/Math/MathML"
          xmlns:html="http://www.w3.org/1999/xhtml"
          xmlns:db="http://docbook.org/ns/docbook">
- 
-    <title>Registering our KnowledgeSession</title>
+  <title>Registering our KnowledgeSession</title>
 
-    <para>Once you have your CamelContext configured is necesary register all
-    the KnowledgeSession's that you are going to use inside the
-    ExecutionNode.</para>
+  <para>Using the previous configured CamelContext it's necessary to register
+  into the ExecutionNode all the KnowledgeSessions that you are going to
+  use.</para>
 
-    <programlisting>node.get(DirectoryLookupFactoryService.class).register("ksession1", ksession);    </programlisting>
-
+  <programlisting>node.get(DirectoryLookupFactoryService.class).register("ksession1", ksession);    </programlisting>
 </section>

Modified: labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Camel/Section-API/Section-SendingMessagesExchanges.xml
===================================================================
--- labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Camel/Section-API/Section-SendingMessagesExchanges.xml	2010-06-18 14:02:46 UTC (rev 33546)
+++ labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Camel/Section-API/Section-SendingMessagesExchanges.xml	2010-06-18 16:35:11 UTC (rev 33547)
@@ -6,148 +6,144 @@
          xmlns:m="http://www.w3.org/1998/Math/MathML"
          xmlns:html="http://www.w3.org/1999/xhtml"
          xmlns:db="http://docbook.org/ns/docbook">
+  <title>Sending messages exchanges</title>
 
-    <title>Sending messages exchanges</title>
+  <para>In order to send messages to a Camel Endpoint we need to create a
+  <link
+  xlink:href="http://camel.apache.org/producertemplate.html">ProducerTemplate</link></para>
 
-    <para>To send messages to the Camel Endpoints we need to create a <link
-    xlink:href="http://camel.apache.org/producertemplate.html">ProducerTemplate</link></para>
+  <para><programlisting>ProducerTemplate template = camelContext.createProducerTemplate();</programlisting></para>
 
-    <para><programlisting>ProducerTemplate template = camelContext.createProducerTemplate();</programlisting></para>
+  <para>After you have a template, you can start to send message exchange to
+  your route:</para>
 
-    <para>Once you have this you can start to send message exchange to your
-    route:</para>
-
-    <para><programlisting>String xml = "&lt;xml&gt;example&lt;/xml&gt;";
+  <para><programlisting>String xml = "&lt;xml&gt;example&lt;/xml&gt;";
 template.requestBody("direct:with-session-xstream", xml);</programlisting></para>
 
-    <note>
-      <para>When we use commands created with JAXB we need to use a special
-      method to send the JaxbContext to our route. This will be more detailed
-      in the next section</para>
-    </note>
+  <note>
+    <para>When we use commands created with JAXB we need to use a special
+    method to send the JaxbContext to our route. This will be explained in
+    more detail in the Using JAXB section.</para>
+  </note>
 
-    <para></para>
+  <para></para>
 
-    <section>
-      <title>Using XStream</title>
+  <section>
+    <title>Using XStream</title>
 
-      <para>To create XML commands with XStream we use the
-      BatchExecutionHelper. The steps are the nexts:</para>
+    <para>Using XStream To create XML commands with XStream we use the
+    BatchExecutionHelper. The steps are the following:</para>
 
-      <orderedlist>
-        <listitem>
-          <para>BatchExecutionCommand marshalling</para>
+    <orderedlist>
+      <listitem>
+        <para>BatchExecutionCommand marshalling</para>
 
-          <para>String xml =
-          BatchExecutionHelper.newXStreamMarshaller().toXML(batchExecutionCommand);</para>
-        </listitem>
+        <para>String xml =
+        BatchExecutionHelper.newXStreamMarshaller().toXML(batchExecutionCommand);</para>
+      </listitem>
 
-        <listitem>
-          <para>Sending the commands through the ProducerTemplate</para>
+      <listitem>
+        <para>Sending the commands through the ProducerTemplate</para>
 
-          <para>String xmlOutput = new
-          String((byte[])template.requestBody("direct:test-with-session",
-          xml)</para>
-        </listitem>
+        <para>String xmlOutput = new
+        String((byte[])template.requestBody("direct:test-with-session",
+        xml)</para>
+      </listitem>
 
-        <listitem>
-          <para>Converting the Drools Endpoint XML response to
-          ExecutionResults</para>
+      <listitem>
+        <para>Transforming the Drools Endpoint XML response into a
+        ExecutionResults instance</para>
 
-          <para>ExecutionResults result = (ExecutionResults)
-          BatchExecutionHelper.newXStreamMarshaller().fromXML(xmlOutput);</para>
-        </listitem>
-      </orderedlist>
+        <para>ExecutionResults result = (ExecutionResults)
+        BatchExecutionHelper.newXStreamMarshaller().fromXML(xmlOutput);</para>
+      </listitem>
+    </orderedlist>
 
-      <para></para>
-    </section>
+    <para></para>
+  </section>
 
-    <section>
-      <title>Using JAXB</title>
+  <section>
+    <title>Using JAXB</title>
 
-      <para>JAXB is more powerful because allow us to define our model on a
-      XSD file, and with this isn't necesary to copy/duplicate our model jar
-      file using drools-camel in a remote enviroment, or even create a Java
-      model in our project. In this case we need to send the JAXBContext with
-      our XML command.</para>
+    <para>JAXB is more powerful because it allows us to define our model in a
+    XSD file, making it unnecessary to duplicate our Java model, or even
+    create a Java model in our project. In this case we need to send the
+    JAXBContext with our XML command.</para>
 
-      <para>Once you have created your JAXBContext, and even you can use the
-      XSD files in a KnowledgeBuilder to represent the model, you need to
-      convert this to XML.</para>
+    <para>You can use XSD files to represent your fact model inside a
+    KnowledgeBuilder. In the following example we are going to use a POJO Java
+    model and a XSD to duplicate the same model representation.</para>
 
-      <para>Note: in this snippet code we are going to use a POJO Java model
-      and a XSD to duplicate the same model representation.</para>
+    <para></para>
 
-      <orderedlist>
-        <listitem>
-          <para>JAXBContext creation:</para>
+    <orderedlist>
+      <listitem>
+        <para>JAXBContext creation:</para>
 
-          <para>Here we are adding our XSD model definition to our
-          KnowledgeBuilder and storing the classNames in a array.</para>
+        <para>Here we are adding our XSD model definition to our
+        KnowledgeBuilder as a resource</para>
 
-          <para><programlisting>Options xjcOpts = new Options();
+        <para><programlisting>Options xjcOpts = new Options();
 xjcOpts.setSchemaLanguage( Language.XMLSCHEMA );
-String classNames[] = null;
+JaxbConfiguration jaxbConfiguration = KnowledgeBuilderFactory.newJaxbConfiguration( xjcOpts, "xsd" );
+kbuilder.add( ResourceFactory.newClassPathResource("person.xsd", getClass()), ResourceType.XSD, jaxbConfiguration);</programlisting>Then
+        you need to add your knowledge resources into the kbuilder and create
+        your KnowledgeBase. These steps are the same as those in the Drools
+        Expert documentation. Finally, we are going to create the
+        JAXBContext</para>
+
+        <para><programlisting>// Add object model to classes array
+List&lt;String&gt; classesName = new ArrayList&lt;String&gt;();
+classesName.add("org.drools.model.AddressType");
+classesName.add("org.drools.model.ObjectFactory");
+classesName.add("org.drools.model.Person");
+
 try {
-   classNames = KnowledgeBuilderHelper.addXsdModel(ResourceFactory.newClassPathResource("person.xsd", getClass()),
-                                                   kbuilder,
-                                                   xjcOpts,
-                                                   "xsd");
+   jaxbContext = KnowledgeBuilderHelper.newJAXBContext( classesName.toArray(new String[classesName.size()]), kbase );
 }
-catch (IOException e) {
-   LOG.error("Errors while adding xsd model.", kbuilder.getErrors());
-}</programlisting>Then you need to add your rules/processes in the kbuilder
-          and create your KnowledgeBase. That steps are the sames that you can
-          read in the Drools Expert documentation. Finally, we are going to
-          create the JAXBContext</para>
-
-          <para><programlisting>try {
-   jaxbContext = KnowledgeBuilderHelper.newJAXBContext(allClasses.toArray(new String[allClasses.size()]), kbase);
-}
 catch (Exception e) {
    LOG.info("Errors while creating JAXB Context.", e);
-    throw new RuntimeException(e);
+   throw new RuntimeException(e);
 }</programlisting></para>
-        </listitem>
+      </listitem>
 
-        <listitem>
-          <para>BatchExecutionCommand marshalling <programlisting>StringWriter xmlReq = new StringWriter();
+      <listitem>
+        <para>BatchExecutionCommand marshalling <programlisting>StringWriter xmlReq = new StringWriter();
 Marshaller marshaller = jaxbContext.createMarshaller();
 marshaller.setProperty("jaxb.formatted.output", true);
 marshaller.marshal(batchExecutionCommand, xmlReq);</programlisting></para>
-        </listitem>
+      </listitem>
 
-        <listitem>
-          <para>Sending the commands through the ProducerTemplate</para>
+      <listitem>
+        <para>Sending the commands through the ProducerTemplate</para>
 
-          <para>In this step we need to use another ProducerTemplate method
-          called requestBodyAndHeader() because the Drools Component needs to
-          know wich JAXBContext must use to unmarshall the XML.</para>
+        <para>In this step we need to use another ProducerTemplate method
+        called requestBodyAndHeader() because the Drools Component needs to
+        know wich JAXBContext must use to unmarshall the XML.</para>
 
-          <para><programlisting>String xml = xmlReq.toString();
+        <para><programlisting>String xml = xmlReq.toString();
 byte[] xmlOutput = (byte[]) template.requestBodyAndHeader("direct:test-with-session", xmlReq.toString(), "jaxb-context", jaxbContext);</programlisting></para>
-        </listitem>
+      </listitem>
 
-        <listitem>
-          <para>Converting the Drools Endpoint XML response to
-          ExecutionResults</para>
+      <listitem>
+        <para>Transforming the Drools Endpoint XML response to
+        ExecutionResults</para>
 
-          <para>And the final step is convert the XML output to a
-          ExecutionResults</para>
+        <para>And the final step is to convert the XML output to an
+        ExecutionResults instance</para>
 
-          <para><programlisting>ExecutionResults resp = (ExecutionResults) jaxbContext.createUnmarshaller().unmarshal(new ByteArrayInputStream(xmlOutput));</programlisting></para>
+        <para><programlisting>ExecutionResults resp = (ExecutionResults) jaxbContext.createUnmarshaller().unmarshal(new ByteArrayInputStream(xmlOutput));</programlisting></para>
 
-          <para></para>
-        </listitem>
-      </orderedlist>
+        <para></para>
+      </listitem>
+    </orderedlist>
 
-      <para></para>
+    <para></para>
 
-      <note>
-        The XML output convertion is not required, but is recommended to have a more legible response output.
-      </note>
+    <note>
+      The XML output conversion is not required, but is recommended to have a more legible data output. 
+    </note>
 
-      <para></para>
-    </section>
-
+    <para></para>
+  </section>
 </section>

Modified: labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Camel/Section-Introduction/Section-Introduction.xml
===================================================================
--- labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Camel/Section-Introduction/Section-Introduction.xml	2010-06-18 14:02:46 UTC (rev 33546)
+++ labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Camel/Section-Introduction/Section-Introduction.xml	2010-06-18 16:35:11 UTC (rev 33547)
@@ -6,69 +6,72 @@
          xmlns:m="http://www.w3.org/1998/Math/MathML"
          xmlns:html="http://www.w3.org/1999/xhtml"
          xmlns:db="http://docbook.org/ns/docbook">
-    <title>Introduction</title>
+  <title>Introduction</title>
 
-    <para>The Apache Camel integration allow us interact with a Drools
-    Stateless or Stateful session through a pipeline. It simple works
-    transforming XML commands into executable commands and executing them. The
-    advantage of this integration is that Apache Camel brings the possibility
-    to implement more advanced enterprise integration patterns than a simple
-    transformation pipeline. This integration with Drools allow us to add any
-    of the current Camel components. Using any of the Apache Components you
-    could, for example, execute commands thats come an a JMS queue/Atom
-    Feed/Mina connection/a Mail/etc and send the execution result to any type
-    of supported components. As you can see, this brings a more powerful
-    connection scenario to implement Drools.</para>
+  <para>The Apache Camel integration allows us to interact with a Drools
+  Stateless or Stateful session through a pipeline. It simply works by
+  transforming XML commands into executable commands and executing them. The
+  advantage of this integration is that Apache Camel makes possible the
+  implemention of more advanced enterprise integration patterns, which is an
+  improvement of drools pipeline.</para>
 
-    <para></para>
+  <para></para>
 
-    <section>
-      <title>Architecture</title>
+  <para>This integration with Drools allows us to add any of the current Camel
+  components. Using the <link
+  xlink:href="http://camel.apache.org/components.html">Apache
+  Components</link> you can, receive commands from several entry points and
+  send the execution result to another entry point. To name a few, JMS
+  queue/Atom Feed/Mina connection/a Mail/etc. As you can see, this brings a
+  more powerful interoperability mechanism to integrate your application with
+  Drools</para>
 
-      <para>&lt;insert architecture graphic here&gt;</para>
+  <section>
+    <title>Architecture</title>
 
-      <para></para>
-    </section>
+    <para>&lt;insert architecture graphic here&gt;</para>
 
-    <section>
-      <title>Introduction to drools-grid</title>
+    <para></para>
+  </section>
 
-      <para>Camel integration is coupled with another drools module called:
-      drools-grid. This module allow us to interact with Drools sessions
-      independent of the JVM location. At this moment we can use two
-      implementations:</para>
+  <section>
+    <title>Introduction to drools-grid</title>
 
-      <table>
-        <title>drools-grid implementations</title>
+    <para>Introduction to drools-grid Camel integration is coupled with
+    another drools module called: drools-grid. This module allow us to
+    interact with Drools sessions independent of the JVM location. At the
+    moment we can use two implementations:</para>
 
-        <tgroup cols="2">
-          <tbody>
-            <row>
-              <entry>Local</entry>
+    <table>
+      <title>drools-grid implementations</title>
 
-              <entry>used when the drools session's and client's are in the
-              same JVM.</entry>
-            </row>
+      <tgroup cols="2">
+        <tbody>
+          <row>
+            <entry>Local</entry>
 
-            <row>
-              <entry>Remote</entry>
+            <entry>Used when the drools sessions and clients are in the same
+            JVM</entry>
+          </row>
 
-              <entry>used when you've drools session's on a remote JVM. At
-              this moment is the only implementation is using Apache Mina, but
-              is planned to add HornetQ support in the next release.</entry>
-            </row>
-          </tbody>
-        </tgroup>
-      </table>
+          <row>
+            <entry>Remote</entry>
 
-      <para></para>
+            <entry>Used when you have drools sessions on a remote JVM.
+            Currently, the only implementation is based on Apache Mina.
+            HornetQ support will be added in the next release</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </table>
 
-      <para>Drools Grid is embedded inside the Drools Camel component, so
-      don't worry about more implementation information because this should be
-      enough. With this information we can start to configure our Camel
-      Context.</para>
+    <para></para>
 
-      <para></para>
-    </section>
+    <para>Drools Grid is embedded inside the Drools Camel component, so don't
+    worry about further implementation information because this is hidden by
+    Drools. With this information we can start to configure our Camel
+    Context.</para>
 
+    <para></para>
+  </section>
 </section>



More information about the jboss-svn-commits mailing list