[jboss-svn-commits] JBL Code SVN: r24220 - labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Tue Dec 2 17:45:13 EST 2008


Author: KrisVerlaenen
Date: 2008-12-02 17:45:13 -0500 (Tue, 02 Dec 2008)
New Revision: 24220

Modified:
   labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/NumberGuess.rf
Log:
 - added missing import

Modified: labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/NumberGuess.rf
===================================================================
--- labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/NumberGuess.rf	2008-12-02 21:24:15 UTC (rev 24219)
+++ labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/NumberGuess.rf	2008-12-02 22:45:13 UTC (rev 24220)
@@ -1,71 +1,72 @@
-<?xml version="1.0" encoding="UTF-8"?> 
-<process xmlns="http://drools.org/drools-4.0/process"
-         xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
-         xs:schemaLocation="http://drools.org/drools-4.0/process drools-processes-4.0.xsd"
-         type="RuleFlow" name="Number Guess" id="Number Guess" package-name="org.drools.examples" >
-
-  <header>
-    <imports>
-      <import name="org.drools.examples.NumberGuessExample.Game" />
-      <import name="org.drools.examples.NumberGuessExample.GameRules" />
-      <import name="org.drools.examples.NumberGuessExample.RandomNumber" />
-    </imports>
-  </header>
-
-  <nodes>
-    <start id="1" name="Start" x="76" y="60" width="80" height="40" />
-    <actionNode id="2" name="Guess correct" x="219" y="260" width="102" height="40" >
-      <action type="expression" dialect="mvel" >System.out.println( "You guessed correctly" );</action>
-    </actionNode>
-    <ruleSet id="3" name="No more Guesses" x="499" y="260" width="109" height="40" ruleFlowGroup="No more Guesses" />
-    <end id="4" name="End" x="373" y="336" width="80" height="40" />
-    <split id="5" name="Guess correct?" x="59" y="261" width="115" height="40" type="2" >
-      <constraints>
-        <constraint toNodeId="13" toType="DROOLS_DEFAULT" name="too low" priority="1" type="rule" dialect="mvel" >RandomNumber( randomValue : value )
-Guess( value &lt; randomValue )</constraint>
+<?xml version="1.0" encoding="UTF-8"?> 
+<process xmlns="http://drools.org/drools-4.0/process"
+         xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
+         xs:schemaLocation="http://drools.org/drools-4.0/process drools-processes-4.0.xsd"
+         type="RuleFlow" name="Number Guess" id="Number Guess" package-name="org.drools.examples" >
+
+  <header>
+    <imports>
+      <import name="org.drools.examples.NumberGuessExample.Game" />
+      <import name="org.drools.examples.NumberGuessExample.GameRules" />
+      <import name="org.drools.examples.NumberGuessExample.Guess" />
+      <import name="org.drools.examples.NumberGuessExample.RandomNumber" />
+    </imports>
+  </header>
+
+  <nodes>
+    <end id="4" name="End" x="373" y="336" width="80" height="40" />
+    <split id="8" name="More Guesses?" x="629" y="261" width="93" height="40" type="2" >
+      <constraints>
+        <constraint toNodeId="3" toType="DROOLS_DEFAULT" name="No more Guesses" priority="1" type="rule" dialect="mvel" >GameRules( allowed : allowedGuesses  )
+Game( guessCount &gt;= allowed )</constraint>
+        <constraint toNodeId="6" toType="DROOLS_DEFAULT" name="More guesses" priority="1" type="rule" dialect="mvel" >GameRules( allowed : allowedGuesses  )
+Game( guessCount &lt; allowed )</constraint>
+      </constraints>
+    </split>
+    <ruleSet id="11" name="Guess incorrect" x="79" y="455" width="80" height="40" ruleFlowGroup="Guess incorrect" />
+    <ruleSet id="3" name="No more Guesses" x="499" y="260" width="109" height="40" ruleFlowGroup="No more Guesses" />
+    <ruleSet id="7" name="Guess" x="76" y="198" width="80" height="40" ruleFlowGroup="Guess" />
+    <actionNode id="12" name="Too high" x="3" y="325" width="80" height="40" >
+        <action type="expression" dialect="mvel" >System.out.println( "Your guess was too high" );</action>
+    </actionNode>
+    <actionNode id="2" name="Guess correct" x="219" y="260" width="102" height="40" >
+        <action type="expression" dialect="mvel" >System.out.println( "You guessed correctly" );</action>
+    </actionNode>
+    <actionNode id="13" name="Too low" x="154" y="324" width="80" height="40" >
+        <action type="expression" dialect="mvel" >System.out.println( "Your guess was too low" );</action>
+    </actionNode>
+    <join id="9" name="Incorrect guess" x="67" y="387" width="103" height="40" type="2" />
+    <join id="6" name="More guesses Join" x="57" y="135" width="119" height="40" type="2" />
+    <start id="1" name="Start" x="76" y="60" width="80" height="40" />
+    <join id="10" name="No more guesses Join" x="350" y="261" width="128" height="40" type="2" />
+    <split id="5" name="Guess correct?" x="59" y="261" width="115" height="40" type="2" >
+      <constraints>
         <constraint toNodeId="12" toType="DROOLS_DEFAULT" name="too high" priority="1" type="rule" dialect="mvel" >RandomNumber( randomValue : value )
-Guess( value &gt; randomValue )</constraint>
+Guess( value &gt; randomValue )</constraint>
         <constraint toNodeId="2" toType="DROOLS_DEFAULT" name="correct" priority="1" type="rule" dialect="mvel" >RandomNumber( randomValue : value )
-Guess( value == randomValue )</constraint>
-      </constraints>
-    </split>
-    <join id="6" name="More guesses Join" x="57" y="135" width="119" height="40" type="2" />
-    <ruleSet id="7" name="Guess" x="76" y="198" width="80" height="40" ruleFlowGroup="Guess" />
-    <split id="8" name="More Guesses?" x="629" y="261" width="93" height="40" type="2" >
-      <constraints>
-        <constraint toNodeId="6" toType="DROOLS_DEFAULT" name="More guesses" priority="1" type="rule" dialect="mvel" >GameRules( allowed : allowedGuesses  )
-Game( guessCount &lt; allowed )</constraint>
-        <constraint toNodeId="3" toType="DROOLS_DEFAULT" name="No more Guesses" priority="1" type="rule" dialect="mvel" >GameRules( allowed : allowedGuesses  )
-Game( guessCount &gt;= allowed )</constraint>
-      </constraints>
-    </split>
-    <join id="9" name="Incorrect guess" x="67" y="387" width="103" height="40" type="2" />
-    <join id="10" name="No more guesses Join" x="350" y="261" width="128" height="40" type="2" />
-    <ruleSet id="11" name="Guess incorrect" x="79" y="455" width="80" height="40" ruleFlowGroup="Guess incorrect" />
-    <actionNode id="12" name="Too high" x="3" y="325" width="80" height="40" >
-      <action type="expression" dialect="mvel" >System.out.println( "Your guess was too high" );</action>
-    </actionNode>
-    <actionNode id="13" name="Too low" x="154" y="324" width="80" height="40" >
-      <action type="expression" dialect="mvel" >System.out.println( "Your guess was too low" );</action>
-    </actionNode>
-  </nodes>
-
-  <connections>
-    <connection from="5" to="2" />
-    <connection from="8" to="3" />
-    <connection from="10" to="4" />
-    <connection from="7" to="5" />
-    <connection from="1" to="6" />
-    <connection from="8" to="6" bendpoints="[675,154]" />
-    <connection from="6" to="7" />
-    <connection from="11" to="8" bendpoints="[675,474]" />
-    <connection from="12" to="9" />
-    <connection from="13" to="9" />
-    <connection from="3" to="10" />
-    <connection from="2" to="10" />
-    <connection from="9" to="11" />
-    <connection from="5" to="12" />
-    <connection from="5" to="13" />
-  </connections>
-
+Guess( value == randomValue )</constraint>
+        <constraint toNodeId="13" toType="DROOLS_DEFAULT" name="too low" priority="1" type="rule" dialect="mvel" >RandomNumber( randomValue : value )
+Guess( value &lt; randomValue )</constraint>
+      </constraints>
+    </split>
+  </nodes>
+
+  <connections>
+    <connection from="10" to="4" />
+    <connection from="11" to="8" bendpoints="[675,474]" />
+    <connection from="9" to="11" />
+    <connection from="8" to="3" />
+    <connection from="6" to="7" />
+    <connection from="5" to="12" />
+    <connection from="5" to="2" />
+    <connection from="5" to="13" />
+    <connection from="12" to="9" />
+    <connection from="13" to="9" />
+    <connection from="1" to="6" />
+    <connection from="8" to="6" bendpoints="[675,154]" />
+    <connection from="3" to="10" />
+    <connection from="2" to="10" />
+    <connection from="7" to="5" />
+  </connections>
+
 </process>
\ No newline at end of file




More information about the jboss-svn-commits mailing list