I am new with Drools. I am integrating Drools with Scala. I am trying the project given at http://www.gettingcirrius.com/2010/12/using-jboss-rules-drools-in-scala.html. I have made a small change in the code to supply the Drools rule file as given below:
File f = new File("WeatherRules.drl");
kbuilder.add(ResourceFactory.newFileResource(f), ResourceType.DRL);
The code is running fine and there is no error but the rules are not working. The output I got is:
Creating Knowledge Session
Creating and insertng Temperature
Firing all rules
It seems that the configured rules are not working. The dependencies I am using in for is:
Scala: 2.9.0.1
Sbt: 0.7.7
jaxb-xjc: 2.2.4-1
drools-core: 5.2.0.Final
drools-compiler: 5.2.0.Final
jxl: 2.6
xstream: 1.3.1
Am I missing something? Please help me to integrate Drools with scala. Thanks in advance. Any help will be appreciated.
thanks, Puneet
I got the solution to the problem. The solution is at:
http://drools.46999.n3.nabble.com/Drools5-2-2-integration-with-scala2-9-0-1-td3229566.html
Puneet
I think you should also include the Knowledge-API jar in your dependencies for execution, but it makes me wonder that the code didn't throw any exception so far...
good luck, Ivano
来源:https://stackoverflow.com/questions/6963710/help-drools-integration-with-scala