[jboss-svn-commits] JBL Code SVN: r7630 - in labs/jbossesb/workspace/b_georges/product/core/services: . rules

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Thu Nov 16 02:47:24 EST 2006


Author: b_georges
Date: 2006-11-16 02:47:21 -0500 (Thu, 16 Nov 2006)
New Revision: 7630

Added:
   labs/jbossesb/workspace/b_georges/product/core/services/rules/
   labs/jbossesb/workspace/b_georges/product/core/services/rules/JBossESBRules-XPath.drl
   labs/jbossesb/workspace/b_georges/product/core/services/rules/JBossESBRules.drl
   labs/jbossesb/workspace/b_georges/product/core/services/rules/XPathLanguage.dsl
Log:
added rules conf

Added: labs/jbossesb/workspace/b_georges/product/core/services/rules/JBossESBRules-XPath.drl
===================================================================
--- labs/jbossesb/workspace/b_georges/product/core/services/rules/JBossESBRules-XPath.drl	2006-11-15 22:29:12 UTC (rev 7629)
+++ labs/jbossesb/workspace/b_georges/product/core/services/rules/JBossESBRules-XPath.drl	2006-11-16 07:47:21 UTC (rev 7630)
@@ -0,0 +1,29 @@
+#created on: Nov 8, 2006
+package com.jboss.soa.esb.routing.cbr
+
+#list any import classes here.
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.format.MessageType;
+
+expander XPathLanguage.dsl
+
+#declare any global variables here
+global java.util.List destinationServices;
+
+rule "Routing Rule using XPATH match"
+	
+	when
+		xpathMatch "/jbossesb"
+	then 
+		Log : "XPath Matched";
+		Destination : "test_category:JBOSS_XML_XPath_Destination";
+end
+
+rule "Routing Rule using XPATH equals"
+	
+	when
+		xpathEquals "/Dave", "rocks"
+	then 
+		Log : "XPath Equals";
+		Destination : "test_category:JBOSS_XML_XPath_Dave_Destination";
+end

Added: labs/jbossesb/workspace/b_georges/product/core/services/rules/JBossESBRules.drl
===================================================================
--- labs/jbossesb/workspace/b_georges/product/core/services/rules/JBossESBRules.drl	2006-11-15 22:29:12 UTC (rev 7629)
+++ labs/jbossesb/workspace/b_georges/product/core/services/rules/JBossESBRules.drl	2006-11-16 07:47:21 UTC (rev 7630)
@@ -0,0 +1,29 @@
+#created on: Oct 30, 2006
+package com.jboss.soa.esb.routing.cbr
+
+#list any import classes here.
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.format.MessageType;
+
+#declare any global variables here
+global java.util.List destinationServices;
+
+
+rule "Routing Rule - Serialized based message"
+	
+	when
+		Message( type == MessageType.JAVA_SERIALIZED)
+	then
+		System.out.println("Serialized");
+		destinationServices.add("test_category:Serialized_ServiceDestination");
+		
+end
+
+rule "Routing Rule - XML based message"
+	
+	when
+		Message( type == MessageType.JBOSS_XML)
+	then 
+		System.out.println("JBoss_XML"); 
+		destinationServices.add("test_category:JBOSS_XMLDestination");
+end
\ No newline at end of file

Added: labs/jbossesb/workspace/b_georges/product/core/services/rules/XPathLanguage.dsl
===================================================================
--- labs/jbossesb/workspace/b_georges/product/core/services/rules/XPathLanguage.dsl	2006-11-15 22:29:12 UTC (rev 7629)
+++ labs/jbossesb/workspace/b_georges/product/core/services/rules/XPathLanguage.dsl	2006-11-16 07:47:21 UTC (rev 7630)
@@ -0,0 +1,5 @@
+#JBossESB Content Based Routing using XPath DSL
+[when]xpathMatch "{xpath}"=msg : Message( type == MessageType.JBOSS_XML ) and eval( org.jboss.internal.soa.esb.services.routing.cbr.DslHelper.xmlContentMatches(msg, "{xpath}") )
+[when]xpathEquals "{xpath}", "{value}"=msg : Message( type == MessageType.JBOSS_XML ) and eval( org.jboss.internal.soa.esb.services.routing.cbr.DslHelper.xmlContentEquals(msg, "{xpath}", "{value}") )
+[then]Log : "{message}"=System.out.println("{message}");
+[then]Destination : "{message}"=destinationServices.add("{message}");




More information about the jboss-svn-commits mailing list