[jboss-svn-commits] JBL Code SVN: r33447 - labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Commands/Section-Commands.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Thu Jun 10 17:02:49 EDT 2010


Author: lucazamador
Date: 2010-06-10 17:02:48 -0400 (Thu, 10 Jun 2010)
New Revision: 33447

Modified:
   labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Commands/Section-Commands/Section-FireAllRulesCommand.xml
   labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Commands/Section-Commands/Section-GetGlobalCommand.xml
   labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Commands/Section-Commands/Section-GetObjectCommand.xml
   labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Commands/Section-Commands/Section-GetObjectsCommand.xml
   labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Commands/Section-Commands/Section-InsertElementsCommand.xml
   labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Commands/Section-Commands/Section-ModifyCommand.xml
   labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Commands/Section-Commands/Section-RetractCommand.xml
   labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Commands/Section-Commands/Section-SetGlobalCommand.xml
   labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Commands/Section-Commands/Section-SignalEventCommand.xml
Log:
JBRULES-2542: Drools Commands documentation
- added more example details

Modified: labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Commands/Section-Commands/Section-FireAllRulesCommand.xml
===================================================================
--- labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Commands/Section-Commands/Section-FireAllRulesCommand.xml	2010-06-10 19:57:45 UTC (rev 33446)
+++ labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Commands/Section-Commands/Section-FireAllRulesCommand.xml	2010-06-10 21:02:48 UTC (rev 33447)
@@ -86,7 +86,7 @@
           <para>XStream</para>
 
           <para><programlisting>&lt;batch-execution lookup="ksession1"&gt;
-  &lt;fire-all-rules max="10" outIdentifier="firedActivations"/&gt;
+  &lt;fire-all-rules max="10" out-identifier="firedActivations"/&gt;
 &lt;/batch-execution&gt;
 </programlisting></para>
 
@@ -96,7 +96,7 @@
         <listitem>
           <para>JSON</para>
 
-          <para><programlisting>{"batch-execution":{"lookup":"ksession1","commands":{"fire-all-rules":{"max":10,"outIdentifier":"firedActivations"}}}}</programlisting></para>
+          <para><programlisting>{"batch-execution":{"lookup":"ksession1","commands":{"fire-all-rules":{"max":10,"out-identifier":"firedActivations"}}}}</programlisting></para>
 
           <para></para>
         </listitem>
@@ -106,7 +106,7 @@
 
           <para><programlisting>&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
 &lt;batch-execution lookup="ksession1"&gt;
-   &lt;fire-all-rules outIdentifier="firedActivations" max="10"/&gt;
+   &lt;fire-all-rules out-identifier="firedActivations" max="10"/&gt;
 &lt;/batch-execution&gt;</programlisting></para>
 
           <para></para>

Modified: labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Commands/Section-Commands/Section-GetGlobalCommand.xml
===================================================================
--- labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Commands/Section-Commands/Section-GetGlobalCommand.xml	2010-06-10 19:57:45 UTC (rev 33446)
+++ labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Commands/Section-Commands/Section-GetGlobalCommand.xml	2010-06-10 21:02:48 UTC (rev 33447)
@@ -60,10 +60,10 @@
     <listitem>
       <para>Command creation<programlisting>BatchExecutionCommand command = new BatchExecutionCommand();
 command.setLookup("ksession1");
-GetGlobalCommand setGlobalCommand = new GetGlobalCommand();
-setGlobalCommand.setIdentifier("helper");
-setGlobalCommand.setOutIdentifier("helperOutput");
-command.getCommands().add(setGlobalCommand);</programlisting></para>
+GetGlobalCommand getGlobalCommand = new GetGlobalCommand();
+getGlobalCommand.setIdentifier("helper");
+getGlobalCommand.setOutIdentifier("helperOutput");
+command.getCommands().add(getGlobalCommand);</programlisting></para>
 
       <para></para>
     </listitem>

Modified: labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Commands/Section-Commands/Section-GetObjectCommand.xml
===================================================================
--- labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Commands/Section-Commands/Section-GetObjectCommand.xml	2010-06-10 19:57:45 UTC (rev 33446)
+++ labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Commands/Section-Commands/Section-GetObjectCommand.xml	2010-06-10 21:02:48 UTC (rev 33447)
@@ -96,7 +96,7 @@
 
           <para><programlisting>&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
 &lt;batch-execution lookup="ksession1"&gt;
-    &lt;get-object out-identifier="john" factHandle="0:234:345:456:567"/&gt;
+    &lt;get-object out-identifier="john" fact-handle="0:234:345:456:567"/&gt;
 &lt;/batch-execution&gt;</programlisting></para>
 
           <para></para>

Modified: labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Commands/Section-Commands/Section-GetObjectsCommand.xml
===================================================================
--- labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Commands/Section-Commands/Section-GetObjectsCommand.xml	2010-06-10 19:57:45 UTC (rev 33446)
+++ labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Commands/Section-Commands/Section-GetObjectsCommand.xml	2010-06-10 21:02:48 UTC (rev 33447)
@@ -62,6 +62,7 @@
       <para>Command creation<programlisting>BatchExecutionCommand command = new BatchExecutionCommand();
 command.setLookup("ksession1");
 GetObjectsCommand getObjectsCommand = new GetObjectsCommand();
+getObjectsCommand.setOutIdentifier("objects");
 command.getCommands().add(getObjectsCommand);</programlisting></para>
 
       <para></para>
@@ -75,7 +76,7 @@
           <para>XStream</para>
 
           <para><programlisting>&lt;batch-execution lookup="ksession1"&gt;
-  &lt;get-objects/&gt;
+  &lt;get-objects out-identifier="objects"/&gt;
 &lt;/batch-execution&gt;</programlisting></para>
 
           <para></para>
@@ -84,7 +85,7 @@
         <listitem>
           <para>JSON</para>
 
-          <para><programlisting>{"batch-execution":{"lookup":"ksession1","commands":{"get-objects":""}}} </programlisting></para>
+          <para><programlisting>{"batch-execution":{"lookup":"ksession1","commands":{"get-objects":{"out-identifier":"objects"}}}}</programlisting></para>
 
           <para></para>
         </listitem>
@@ -94,7 +95,7 @@
 
           <para><programlisting>&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
 &lt;batch-execution lookup="ksession1"&gt;
-    &lt;get-objects/&gt;
+    &lt;get-objects out-identifier="objects"/&gt;
 &lt;/batch-execution&gt;</programlisting></para>
 
           <para></para>

Modified: labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Commands/Section-Commands/Section-InsertElementsCommand.xml
===================================================================
--- labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Commands/Section-Commands/Section-InsertElementsCommand.xml	2010-06-10 19:57:45 UTC (rev 33446)
+++ labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Commands/Section-Commands/Section-InsertElementsCommand.xml	2010-06-10 21:02:48 UTC (rev 33447)
@@ -115,7 +115,7 @@
 
           <para><programlisting>&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
 &lt;batch-execution lookup="ksession1"&gt;
-    &lt;insert-elements returnObject="true"&gt;
+    &lt;insert-elements return-objects="true"&gt;
         &lt;objects xsi:type="person" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
             &lt;age&gt;25&lt;/age&gt;
             &lt;name&gt;john&lt;/name&gt;

Modified: labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Commands/Section-Commands/Section-ModifyCommand.xml
===================================================================
--- labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Commands/Section-Commands/Section-ModifyCommand.xml	2010-06-10 19:57:45 UTC (rev 33446)
+++ labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Commands/Section-Commands/Section-ModifyCommand.xml	2010-06-10 21:02:48 UTC (rev 33447)
@@ -97,7 +97,7 @@
 
           <para><programlisting>&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
 &lt;batch-execution lookup="ksession1"&gt;
-    &lt;modify factHandle="0:234:345:456:567"&gt;
+    &lt;modify fact-handle="0:234:345:456:567"&gt;
         &lt;set value="30" accessor="age"/&gt;
     &lt;/modify&gt;
 &lt;/batch-execution&gt;</programlisting></para>

Modified: labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Commands/Section-Commands/Section-RetractCommand.xml
===================================================================
--- labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Commands/Section-Commands/Section-RetractCommand.xml	2010-06-10 19:57:45 UTC (rev 33446)
+++ labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Commands/Section-Commands/Section-RetractCommand.xml	2010-06-10 21:02:48 UTC (rev 33447)
@@ -104,7 +104,7 @@
 
           <para><programlisting>&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
 &lt;batch-execution lookup="ksession1"&gt;
-    &lt;retract factHandle="0:234:345:456:567"/&gt;
+    &lt;retract fact-handle="0:234:345:456:567"/&gt;
 &lt;/batch-execution&gt;</programlisting></para>
 
           <para></para>

Modified: labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Commands/Section-Commands/Section-SetGlobalCommand.xml
===================================================================
--- labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Commands/Section-Commands/Section-SetGlobalCommand.xml	2010-06-10 19:57:45 UTC (rev 33446)
+++ labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Commands/Section-Commands/Section-SetGlobalCommand.xml	2010-06-10 21:02:48 UTC (rev 33447)
@@ -79,6 +79,8 @@
 SetGlobalCommand setGlobalCommand = new SetGlobalCommand();
 setGlobalCommand.setIdentifier("helper");
 setGlobalCommand.setObject(new Person("kyle", 30));
+setGlobalCommand.setOut(true);
+setGlobalCommand.setOutIdentifier("output");
 command.getCommands().add(setGlobalCommand);</programlisting></para>
 
       <para></para>
@@ -92,7 +94,7 @@
           <para>XStream</para>
 
           <para><programlisting>&lt;batch-execution lookup="ksession1"&gt;
-  &lt;set-global identifier="helper"&gt;
+  &lt;set-global identifier="helper" out-identifier="output"&gt;
     &lt;org.drools.test.Person&gt;
       &lt;name&gt;kyle&lt;/name&gt;
       &lt;age&gt;30&lt;/age&gt;
@@ -106,7 +108,7 @@
         <listitem>
           <para>JSON</para>
 
-          <para><programlisting>{"batch-execution":{"lookup":"ksession1","commands":{"set-global":{"identifier":"helper","object":{"org.drools.test.Person":{"name":"kyle","age":30}}}}}}</programlisting></para>
+          <para><programlisting>{"batch-execution":{"lookup":"ksession1","commands":{"set-global":{"identifier":"helper","out-identifier":"output","object":{"org.drools.test.Person":{"name":"kyle","age":30}}}}}}</programlisting></para>
 
           <para></para>
         </listitem>
@@ -116,7 +118,7 @@
 
           <para><programlisting>&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
 &lt;batch-execution lookup="ksession1"&gt;
-    &lt;set-global out="false" identifier="helper"&gt;
+    &lt;set-global out="true" out-identifier="output" identifier="helper"&gt;
         &lt;object xsi:type="person" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
             &lt;age&gt;30&lt;/age&gt;
             &lt;name&gt;kyle&lt;/name&gt;

Modified: labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Commands/Section-Commands/Section-SignalEventCommand.xml
===================================================================
--- labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Commands/Section-Commands/Section-SignalEventCommand.xml	2010-06-10 19:57:45 UTC (rev 33446)
+++ labs/jbossrules/trunk/drools-docs/drools-docs-integration/src/main/docbook/en-US/Chapter-Commands/Section-Commands/Section-SignalEventCommand.xml	2010-06-10 21:02:48 UTC (rev 33447)
@@ -67,6 +67,7 @@
       <para>Command creation<programlisting>BatchExecutionCommand command = new BatchExecutionCommand();
 command.setLookup("ksession1");
 SignalEventCommand signalEventCommand = new SignalEventCommand();
+signalEventCommand.setProcessInstanceId(1001);
 signalEventCommand.setEventType("start");
 signalEventCommand.setEvent(new Person("john", 25));
 command.getCommands().add(signalEventCommand);</programlisting></para>
@@ -82,11 +83,11 @@
           <para>XStream</para>
 
           <para><programlisting>&lt;batch-execution lookup="ksession1"&gt;
-  &lt;signal-event event-type="start"&gt;
-    &lt;org.drools.test.Person&gt;
+  &lt;signal-event process-instance-id="1001" event-type="start"&gt;
+    &lt;org.drools.pipeline.camel.Person&gt;
       &lt;name&gt;john&lt;/name&gt;
       &lt;age&gt;25&lt;/age&gt;
-    &lt;/org.drools.test.Person&gt;
+    &lt;/org.drools.pipeline.camel.Person&gt;
   &lt;/signal-event&gt;
 &lt;/batch-execution&gt;</programlisting></para>
 
@@ -96,7 +97,7 @@
         <listitem>
           <para>JSON</para>
 
-          <para><programlisting>{"batch-execution":{"lookup":"ksession1","commands":{"signal-event":{"@event-type":"start","event-type":"start","object":{"org.drools.test.Person":{"name":"john","age":25}}}}}} </programlisting></para>
+          <para><programlisting>{"batch-execution":{"lookup":"ksession1","commands":{"signal-event":{"process-instance-id":1001,"@event-type":"start","event-type":"start","object":{"org.drools.pipeline.camel.Person":{"name":"john","age":25}}}}}}</programlisting></para>
 
           <para></para>
         </listitem>
@@ -106,7 +107,7 @@
 
           <para><programlisting>&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
 &lt;batch-execution lookup="ksession1"&gt;
-    &lt;signal-event event-type="start" process-instance-id="-1"&gt;
+    &lt;signal-event event-type="start" process-instance-id="1001"&gt;
         &lt;event xsi:type="person" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
             &lt;age&gt;25&lt;/age&gt;
             &lt;name&gt;john&lt;/name&gt;



More information about the jboss-svn-commits mailing list