Hi i am facing some problems while using java classes in a drl file of drools
component. 

I need to use some external POJO s in my rules file.  My drl file is as
follows:

package org.apache.servicemix.drools
 
import org.apache.servicemix.drools.model.Exchange;
import org.example.URIHelper;

global org.apache.servicemix.drools.model.JbiHelper jbi;

rule "Route to target1"
        when
                me : Exchange( status == Exchange.ACTIVE, in : in != null )
                urih:URIHelper();
                eval( in.xpath("/test/@id = 1") )
        then
                jbi.route(urih.getURIName("target1"));
end

Here i am using URIHelper to get the name of the service to be invoked for
this rule. 

I  defined the endpoint as :

 <drools:endpoint service="validator:Validate"    endpoint="MyValidator"
                   ruleBaseResource="classpath:rules.drl" />

But , the problem is  when i invoke the above created service to test the
rule created above. I am getting an exception like 
java.lang.Exception: No rules have handled the exchange. Check your rule
base..

When i use the same rule with out any  URIHelper class , it is working fine
and the request is being forwarded to the specified service. 

I think there is some problem with the creation of object for URIHelper. I
have placed the required java file(URIHelper.java) in the  src\main\java
folder of the drools su component. 

Can any one tell me how to solve this problem. 

Thanks in advance....



 
-- 
View this message in context: 
http://www.nabble.com/issue-with-the-drools-component-tp15610287s12049p15610287.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to