[rules-users] how to use xml file instead of java object ?

tv.raghavan tvraghavan at gmail.com
Wed Aug 19 23:53:34 EDT 2009


I remember seeing a sample in jboss-esb sample where they were able to use
xpath to query a xml file

[sample extract]
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 destinations;

rule "Blue Routing Rule using XPATH"	
	when
		xpathEquals "/Order/@statusCode", "0"
	then 
	    Log : "Blue Team";
		Destination : "blue";		
end

Is it possible to use this approach to use a xml as input to drool vs java
object ?

Thanks,
-Raghav
-- 
View this message in context: http://www.nabble.com/how-to-use-xml-file-instead-of-java-object---tp25029652p25029652.html
Sent from the drools - user mailing list archive at Nabble.com.




More information about the rules-users mailing list