[jboss-svn-commits] JBL Code SVN: r15219 - 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 Sep 18 23:43:33 EDT 2007


Author: mark.proctor at jboss.com
Date: 2007-09-18 23:43:33 -0400 (Tue, 18 Sep 2007)
New Revision: 15219

Modified:
   labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/HonestPolitician.drl
Log:
added needed salience values

Modified: labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/HonestPolitician.drl
===================================================================
--- labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/HonestPolitician.drl	2007-09-19 02:51:17 UTC (rev 15218)
+++ labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/HonestPolitician.drl	2007-09-19 03:43:33 UTC (rev 15219)
@@ -4,35 +4,36 @@
 import org.drools.examples.HonestPoliticianExample.Hope;
  
 rule "We have an honest Politician"
-	when
-		exists( Politician( honest == true ) )
-	then
-		insertLogical( new Hope() );
+    salience 10
+    when
+        exists( Politician( honest == true ) )
+    then
+        insertLogical( new Hope() );
 end
 
 rule "Hope Lives"
     salience 10
-	when
-		exists( Hope() )
-	then
-		System.out.println("Hurrah!!! Democracy Lives");
+    when
+        exists( Hope() )
+    then
+        System.out.println("Hurrah!!! Democracy Lives");
 end
 
 rule "Hope is Dead"
-	when
-		not( Hope() )
-	then
-		System.out.println( "We are all Doomed!!! Democracy is Dead" );
+    when
+        not( Hope() )
+    then
+        System.out.println( "We are all Doomed!!! Democracy is Dead" );
 end
 
 rule "Currupt the Honest"
    salience 5
-	when
-		politician : Politician( honest == true )	
-		exists( Hope() )
-	then
-	    System.out.println( "I'm an evil corporation and I have corrupted " + politician.getName() );
-		politician.setHonest( false );
-		update( politician );
+    when
+        politician : Politician( honest == true )   
+        exists( Hope() )
+    then
+        System.out.println( "I'm an evil corporation and I have corrupted " + politician.getName() );
+        politician.setHonest( false );
+        update( politician );
 end
 




More information about the jboss-svn-commits mailing list