Re: [rules-users] Kie-Spring Integration
That's the standard maven project structure. The resources will be copied to your class path: Within artifact producing source directories (ie. main and test), there is one directory for the language java (under which the normal package hierarchy exists), and one for resources (the structure which is copied to the target classpath given the default resource definition). http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html — Sent from Mailbox On Mon, Aug 25, 2014 at 8:35 PM, gribeiro geovanny.ribe...@gmail.com wrote: Hi, Folks !I´m actually working on a project using Drools 6.0.1.Final and I´ve recevied the following request:1) All the .drl files are store inside my maven project under src/main/resources/drools-rules and here´s my drools.xml : Maybe I was blind while searching on documentation, but I couldn´t find a way to load rules (.drl files) from file system (outside the classpath).Please, anyone could help me on this matter?Rgds,Geovanny RibeiroGreeting from Brazil -- View this message in context: http://drools.46999.n3.nabble.com/Kie-Spring-Integration-tp4030717.html Sent from the Drools: User forum mailing list archive at Nabble.com.___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Kie-Spring Integration
Just reinforcing my question: I need load rules (.drl files) from a network storage (outside the classpath), therefore Maven is not an option for me. Is there a way to do that using Kie-Spring or I´ll have to do it programmatically ? -- View this message in context: http://drools.46999.n3.nabble.com/Kie-Spring-Integration-tp4030717p4030719.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Kie-Spring Integration
This list is now closed. This list has also moved to Google Groups: http://drools.org/community/forum.html https://groups.google.com/forum/#!forum/drools-usage Mark On 25 Aug 2014, at 21:26, gribeiro geovanny.ribe...@gmail.com wrote: Just reinforcing my question: I need load rules (.drl files) from a network storage (outside the classpath), therefore Maven is not an option for me. Is there a way to do that using Kie-Spring or I´ll have to do it programmatically ? -- View this message in context: http://drools.46999.n3.nabble.com/Kie-Spring-Integration-tp4030717p4030719.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Kie Spring integration
Thanks Vinod it's working now. This class was not present in last Final release(6.0.1.Final) I updated to latest CR(6.1.0.CR1) and it's working now. Thanks for the help. On Mon, Jul 7, 2014 at 4:48 AM, vinodkiran vinodki...@usa.net wrote: try changing your kiePostProcessor from org.kie.spring.KModuleBeanFactoryPostProcessor to the following and then check if the @Inject works. bean id=kiePostProcessor class=org.kie.spring.annotations.KModuleAnnotationPostProcessor/ -- View this message in context: http://drools.46999.n3.nabble.com/Kie-Spring-integration-tp4030243p4030252.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Kie Spring integration
Annotations support for Kie-spring was introduced in 6.1. This was not part of the 6.0 release. -Vinod -- View this message in context: http://drools.46999.n3.nabble.com/Kie-Spring-integration-tp4030243p4030259.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Kie Spring integration
If you are using kie-spring, you need a spring XML and not a kmodule.xml https://github.com/droolsjbpm/droolsjbpm-integration/blob/master/kie-spring/src/test/resources/org/kie/spring/beans-internal2.xml if you are using kie-spring-annotations, please look at https://github.com/droolsjbpm/droolsjbpm-integration/blob/master/kie-spring/src/test/java/org/kie/spring/beans/annotations/NamedKieBean.java -Vinod -- View this message in context: http://drools.46999.n3.nabble.com/Kie-Spring-integration-tp4030243p4030246.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Kie Spring integration
Even if I create a spring integration file it doesn't directly injects the objects i.e. if I use @Inject annotation it throws no qualifying bean exception, but it works if I inject an application context bean and then try to getBean using context.getBean(beanName) method. Note:- bean name is same what I give in @KBase annotation. Moreover if my drl or rdrl files are in a jar which I imported through maven in my project it doesn't load the rules in that Kie Base it just creates a new KieBase object with no rules. But if I put my drl files directly into my resources folder than it works just fine and all rules are fired. On Sun, Jul 6, 2014 at 8:06 PM, vinodkiran [via Drools] ml-node+s46999n4030246...@n3.nabble.com wrote: If you are using kie-spring, you need a spring XML and not a kmodule.xml https://github.com/droolsjbpm/droolsjbpm-integration/blob/master/kie-spring/src/test/resources/org/kie/spring/beans-internal2.xml if you are using kie-spring-annotations, please look at https://github.com/droolsjbpm/droolsjbpm-integration/blob/master/kie-spring/src/test/java/org/kie/spring/beans/annotations/NamedKieBean.java -Vinod -- If you reply to this email, your message will be added to the discussion below: http://drools.46999.n3.nabble.com/Kie-Spring-integration-tp4030243p4030246.html To unsubscribe from Kie Spring integration, click here http://drools.46999.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=4030243code=c3VtaXRkaGFuaXlhQGdtYWlsLmNvbXw0MDMwMjQzfDEzODgxODEzMTM= . NAML http://drools.46999.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml -- View this message in context: http://drools.46999.n3.nabble.com/Kie-Spring-integration-tp4030243p4030248.html Sent from the Drools: User forum mailing list archive at Nabble.com.___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Kie Spring integration
if you are using a spring XML with annotations please ensure that the following declaration is available in the XML file bean id=kiePostProcessor class=org.kie.spring.annotations.KModuleAnnotationPostProcessor/ Sample: https://github.com/droolsjbpm/droolsjbpm-integration/blob/master/kie-spring/src/test/resources/org/kie/spring/annotations/kie-spring-annotations.xml -- View this message in context: http://drools.46999.n3.nabble.com/Kie-Spring-integration-tp4030243p4030249.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Kie Spring integration
Sorry I didn't mentioned this earlier but when I deploy my project below are few errors I get :- INFO ClasspathKieProject - Found kmodule: jar:file:/C:/Users/Sumit%20Dhaniya/.m2/repository/com/demo/FirstDemo/1.0/FirstDemo-1.0.jar!/META-INF/kmodule.xml ERROR ClasspathKieProject - Unable to load pom.properties from/C:/Users/Sumit Dhaniya/.m2/repository/com/demo/FirstDemo/1.0/FirstDemo-1.0.jar as jarPath cannot be found /Users/Sumit Dhaniya/.m2/repository/com/demo/FirstDemo/1.0/FirstDemo-1.0.jar ERROR ClasspathKieProject - Unable to load pom.properties from/C:/Users/Sumit Dhaniya/.m2/repository/com/demo/FirstDemo/1.0/FirstDemo-1.0.jar \Users\Sumit Dhaniya\.m2\repository\com\demo\FirstDemo\1.0\FirstDemo-1.0.jar (The system cannot find the path specified) ERROR ClasspathKieProject - Unable to build index of kmodule.xml url=jar:file:/C:/Users/Sumit%20Dhaniya/.m2/repository/com/demo/FirstDemo/1.0/FirstDemo-1.0.jar!/META-INF/kmodule.xml Below is the conf. I did for drools in my conf. file :- kie:kmodule id=kmodule1 kie:kbase name=defaultKieBase default=true eventProcessingMode=cloud equalsBehavior=identity declarativeAgenda=disabled scope=javax.enterprise.context.ApplicationScoped packages=com.sophic.drool kie:ksession name=defaultKieSession type=stateful default=true clockType=realtime scope=javax.enterprise.context.ApplicationScoped / kie:ksession name=defaultStatelessKieSession type=stateless default=true clockType=realtime scope=javax.enterprise.context.ApplicationScoped / /kie:kbase /kie:kmodule bean id=kiePostProcessor class=org.kie.spring.KModuleBeanFactoryPostProcessor / On Sun, Jul 6, 2014 at 9:39 PM, vinodkiran vinodki...@usa.net wrote: if you are using a spring XML with annotations please ensure that the following declaration is available in the XML file bean id=kiePostProcessor class=org.kie.spring.annotations.KModuleAnnotationPostProcessor/ Sample: https://github.com/droolsjbpm/droolsjbpm-integration/blob/master/kie-spring/src/test/resources/org/kie/spring/annotations/kie-spring-annotations.xml -- View this message in context: http://drools.46999.n3.nabble.com/Kie-Spring-integration-tp4030243p4030249.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Kie Spring integration
try changing your kiePostProcessor from org.kie.spring.KModuleBeanFactoryPostProcessor to the following and then check if the @Inject works. bean id=kiePostProcessor class=org.kie.spring.annotations.KModuleAnnotationPostProcessor/ -- View this message in context: http://drools.46999.n3.nabble.com/Kie-Spring-integration-tp4030243p4030252.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users