Re: [rules-users] Drools 6 Spring JTA Persistence
Hey Martin, haven't looked at your code yet, but I have Drools 6 CR1 and 2 running in grails though without local HT and JTA persistence. It was pretty straight forward, just included the dependencies and pruned duplicate entries (check the dependency report). If I get the plugin working I would be glad to share a demo project. However, I think that a fully fledged release of the plugin to grails central would take some more time. Cheers, Alex Am 03.09.2013 um 21:23 schrieb Martin Minka martin.mi...@gmail.com: Alex, I am sorry, I don't have solution for your problem, but maybe I will work soon on same issue. Are you using Drools 6.0.0.CR2 ? If yes, where you able to overcome this problem http://drools.46999.n3.nabble.com/rules-users-classloader-problem-in-Drools-6-0-0-CR1-and-CR2-working-in-Beta5-td4025726.html ? Do you mind to share your plugin code with community ? Best regards, Martin 2013/9/3 Alexander Herwix a...@herwix.com Hey guys, I'm working on a Grails plugin for Drools/Jbpm 6 and I have trouble to get persistence working in a user friendly way. It would be awesome if someone with a better understanding of drools and especially drools spring integration could help me to figure this out :) I have considered multiple approaches: - Use a spring LocalContainerEntityManagerFactoryBean with a local JpaTransactionManager to configure a KieEnvironment via Spring. I basically got this working, but this doesn't provide real integration with Grails, as there are 2 seperate local TransactionManagers involved - limiting the ability to integrate drools in the grails app. - Use JTA-Transactions. As I want the plugin to be as user friendly as possible I would like to keep using the default tomcat container for development. There is the Atomikos Plugin for Grails which configures Grails to work with JTA. This works pretty nicely and should suffice for the development environment. My problem is integrating the Atomikos backed JTATransactionManager with the drools 6 spring environment configuration as I have not much experience with JTA. I have looked at the Tests for Kie-Spring and looked at as much documentation as I could find, but I can't seem to figure this out. This is what I use to configure the environment via spring (in Grails groovy syntax) jbpmGlobals(MapGlobalResolver) dacceptor(ClassObjectMarshallingStrategyAcceptor,['*.*']) kie.kstore(id:'kiestore') kie.environment(id: 'jbpmEnv'){ kie.'entity-manager-factory'(ref:'entityManagerFactory') kie.globals(ref:'jbpmGlobals') kie.'object-marshalling-strategies'(){ kie.'jpa-placeholder-resolver-strategy'() kie.'serializable-placeholder-resolver-strategy'('strategy-acceptor-ref':dacceptor) } } //Tried to wrap my JtaTransactionManager with KieSpringTransactionManager jbpmTransactionManager(KieSpringTransactionManager, ref('transactionManager')) the environment value for transactionManager cannot be set here, because the parser expects a JpaTransactionManager. I tried to add the transactionManager manually to the environment and found the KieSpringTransactionManager, which looked like it could help me somehow, but in the end, there is always the default implementation of the JtaTransactionManager used which can't find the transactionManager that I configured. Error: NamingException occurred when processing request: [GET] /bpm/test/testJbpm Cannot create resource instance. Stacktrace follows: javax.naming.NamingException: Cannot create resource instance at org.apache.naming.factory.TransactionFactory.getObjectInstance(TransactionFactory.java:116) at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:321) at org.apache.naming.NamingContext.lookup(NamingContext.java:843) at org.apache.naming.NamingContext.lookup(NamingContext.java:154) at org.apache.naming.NamingContext.lookup(NamingContext.java:831) at org.apache.naming.NamingContext.lookup(NamingContext.java:168) at org.apache.naming.SelectorContext.lookup(SelectorContext.java:158) at javax.naming.InitialContext.lookup(InitialContext.java:411) at org.drools.persistence.jta.JtaTransactionManager.findUserTransaction(JtaTransactionManager.java:122) at org.drools.persistence.jta.JtaTransactionManager.init(JtaTransactionManager.java:69) at org.drools.persistence.SingleSessionCommandService.initTransactionManager(SingleSessionCommandService.java:325) at org.drools.persistence.SingleSessionCommandService.init(SingleSessionCommandService.java:114) at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.buildCommandService(KnowledgeStoreServiceImpl.java:129) at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.newKieSession(KnowledgeStoreServiceImpl.java:67) at
Re: [rules-users] Drools 6 Spring JTA Persistence
Hi Alex, I'm developing a Grails Drools Plugin, too. At the moment I'm working on an ECA (Event Correlation Analysis) solution so my current focus is on expert fusion. But jBPM is also an important module that I'll need in the future. Maybe we can come togehter and create one feature rich grails plugin. Let me know if you're interested. Cheers -markus 2013/9/4 Alexander Herwix a...@herwix.com Hey Martin, haven't looked at your code yet, but I have Drools 6 CR1 and 2 running in grails though without local HT and JTA persistence. It was pretty straight forward, just included the dependencies and pruned duplicate entries (check the dependency report). If I get the plugin working I would be glad to share a demo project. However, I think that a fully fledged release of the plugin to grails central would take some more time. Cheers, Alex Am 03.09.2013 um 21:23 schrieb Martin Minka martin.mi...@gmail.com: Alex, I am sorry, I don't have solution for your problem, but maybe I will work soon on same issue. Are you using Drools 6.0.0.CR2 ? If yes, where you able to overcome this problem http://drools.46999.n3.nabble.com/rules-users-classloader-problem-in-Drools-6-0-0-CR1-and-CR2-working-in-Beta5-td4025726.html? Do you mind to share your plugin code with community ? Best regards, Martin 2013/9/3 Alexander Herwix a...@herwix.com Hey guys, I'm working on a Grails plugin for Drools/Jbpm 6 and I have trouble to get persistence working in a user friendly way. It would be awesome if someone with a better understanding of drools and especially drools spring integration could help me to figure this out :) I have considered multiple approaches: - Use a spring LocalContainerEntityManagerFactoryBean with a local JpaTransactionManager to configure a KieEnvironment via Spring. I basically got this working, but this doesn't provide real integration with Grails, as there are 2 seperate local TransactionManagers involved - limiting the ability to integrate drools in the grails app. - Use JTA-Transactions. As I want the plugin to be as user friendly as possible I would like to keep using the default tomcat container for development. There is the Atomikos Plugin for Grails which configures Grails to work with JTA. This works pretty nicely and should suffice for the development environment. My problem is integrating the Atomikos backed JTATransactionManager with the drools 6 spring environment configuration as I have not much experience with JTA. I have looked at the Tests for Kie-Spring and looked at as much documentation as I could find, but I can't seem to figure this out. This is what I use to configure the environment via spring (in Grails groovy syntax) jbpmGlobals(MapGlobalResolver) dacceptor(ClassObjectMarshallingStrategyAcceptor,['*.*']) kie.kstore(id:'kiestore') kie.environment(id: 'jbpmEnv'){ kie.'entity-manager-factory'(ref:'entityManagerFactory') kie.globals(ref:'jbpmGlobals') kie.'object-marshalling-strategies'(){ kie.'jpa-placeholder-resolver-strategy'() kie.'serializable-placeholder-resolver-strategy'('strategy-acceptor-ref':dacceptor) } } //Tried to wrap my JtaTransactionManager with KieSpringTransactionManager jbpmTransactionManager(KieSpringTransactionManager, ref('transactionManager')) the environment value for transactionManager cannot be set here, because the parser expects a JpaTransactionManager. I tried to add the transactionManager manually to the environment and found the KieSpringTransactionManager, which looked like it could help me somehow, but in the end, there is always the default implementation of the JtaTransactionManager used which can't find the transactionManager that I configured. Error: NamingException occurred when processing request: [GET] /bpm/test/testJbpm Cannot create resource instance. Stacktrace follows: javax.naming.NamingException: Cannot create resource instance at org.apache.naming.factory.TransactionFactory.getObjectInstance(TransactionFactory.java:116) at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:321) at org.apache.naming.NamingContext.lookup(NamingContext.java:843) at org.apache.naming.NamingContext.lookup(NamingContext.java:154) at org.apache.naming.NamingContext.lookup(NamingContext.java:831) at org.apache.naming.NamingContext.lookup(NamingContext.java:168) at org.apache.naming.SelectorContext.lookup(SelectorContext.java:158) at javax.naming.InitialContext.lookup(InitialContext.java:411) at org.drools.persistence.jta.JtaTransactionManager.findUserTransaction(JtaTransactionManager.java:122) at org.drools.persistence.jta.JtaTransactionManager.init(JtaTransactionManager.java:69) at org.drools.persistence.SingleSessionCommandService.initTransactionManager(SingleSessionCommandService.java:325) at
Re: [rules-users] Drools 6 Spring JTA Persistence
Hey Markus, that sounds really interesting! I would love to know your opinion on how to integrate grails and drools in the best way. If we have similar ideas and goals for the plugin that would be really good way to proceed. Maybe we can set up a talk in irc or the like? I'm currently working on this full time so just hit me up on my mail address to set something up. Cheers, Alex Am 04.09.2013 um 19:44 schrieb Markus Schneider markus.schneide...@gmail.com: Hi Alex, I'm developing a Grails Drools Plugin, too. At the moment I'm working on an ECA (Event Correlation Analysis) solution so my current focus is on expert fusion. But jBPM is also an important module that I'll need in the future. Maybe we can come togehter and create one feature rich grails plugin. Let me know if you're interested. Cheers -markus 2013/9/4 Alexander Herwix a...@herwix.com Hey Martin, haven't looked at your code yet, but I have Drools 6 CR1 and 2 running in grails though without local HT and JTA persistence. It was pretty straight forward, just included the dependencies and pruned duplicate entries (check the dependency report). If I get the plugin working I would be glad to share a demo project. However, I think that a fully fledged release of the plugin to grails central would take some more time. Cheers, Alex Am 03.09.2013 um 21:23 schrieb Martin Minka martin.mi...@gmail.com: Alex, I am sorry, I don't have solution for your problem, but maybe I will work soon on same issue. Are you using Drools 6.0.0.CR2 ? If yes, where you able to overcome this problem http://drools.46999.n3.nabble.com/rules-users-classloader-problem-in-Drools-6-0-0-CR1-and-CR2-working-in-Beta5-td4025726.html ? Do you mind to share your plugin code with community ? Best regards, Martin 2013/9/3 Alexander Herwix a...@herwix.com Hey guys, I'm working on a Grails plugin for Drools/Jbpm 6 and I have trouble to get persistence working in a user friendly way. It would be awesome if someone with a better understanding of drools and especially drools spring integration could help me to figure this out :) I have considered multiple approaches: - Use a spring LocalContainerEntityManagerFactoryBean with a local JpaTransactionManager to configure a KieEnvironment via Spring. I basically got this working, but this doesn't provide real integration with Grails, as there are 2 seperate local TransactionManagers involved - limiting the ability to integrate drools in the grails app. - Use JTA-Transactions. As I want the plugin to be as user friendly as possible I would like to keep using the default tomcat container for development. There is the Atomikos Plugin for Grails which configures Grails to work with JTA. This works pretty nicely and should suffice for the development environment. My problem is integrating the Atomikos backed JTATransactionManager with the drools 6 spring environment configuration as I have not much experience with JTA. I have looked at the Tests for Kie-Spring and looked at as much documentation as I could find, but I can't seem to figure this out. This is what I use to configure the environment via spring (in Grails groovy syntax) jbpmGlobals(MapGlobalResolver) dacceptor(ClassObjectMarshallingStrategyAcceptor,['*.*']) kie.kstore(id:'kiestore') kie.environment(id: 'jbpmEnv'){ kie.'entity-manager-factory'(ref:'entityManagerFactory') kie.globals(ref:'jbpmGlobals') kie.'object-marshalling-strategies'(){ kie.'jpa-placeholder-resolver-strategy'() kie.'serializable-placeholder-resolver-strategy'('strategy-acceptor-ref':dacceptor) } } //Tried to wrap my JtaTransactionManager with KieSpringTransactionManager jbpmTransactionManager(KieSpringTransactionManager, ref('transactionManager')) the environment value for transactionManager cannot be set here, because the parser expects a JpaTransactionManager. I tried to add the transactionManager manually to the environment and found the KieSpringTransactionManager, which looked like it could help me somehow, but in the end, there is always the default implementation of the JtaTransactionManager used which can't find the transactionManager that I configured. Error: NamingException occurred when processing request: [GET] /bpm/test/testJbpm Cannot create resource instance. Stacktrace follows: javax.naming.NamingException: Cannot create resource instance at org.apache.naming.factory.TransactionFactory.getObjectInstance(TransactionFactory.java:116) at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:321) at org.apache.naming.NamingContext.lookup(NamingContext.java:843) at org.apache.naming.NamingContext.lookup(NamingContext.java:154) at org.apache.naming.NamingContext.lookup(NamingContext.java:831) at
Re: [rules-users] Drools 6 Spring JTA Persistence
If you don't mind, I am also interested to share opinions and work. Martin 2013/9/4 Alexander Herwix a...@herwix.com Hey Markus, that sounds really interesting! I would love to know your opinion on how to integrate grails and drools in the best way. If we have similar ideas and goals for the plugin that would be really good way to proceed. Maybe we can set up a talk in irc or the like? I'm currently working on this full time so just hit me up on my mail address to set something up. Cheers, Alex Am 04.09.2013 um 19:44 schrieb Markus Schneider markus.schneide...@gmail.com: Hi Alex, I'm developing a Grails Drools Plugin, too. At the moment I'm working on an ECA (Event Correlation Analysis) solution so my current focus is on expert fusion. But jBPM is also an important module that I'll need in the future. Maybe we can come togehter and create one feature rich grails plugin. Let me know if you're interested. Cheers -markus 2013/9/4 Alexander Herwix a...@herwix.com Hey Martin, haven't looked at your code yet, but I have Drools 6 CR1 and 2 running in grails though without local HT and JTA persistence. It was pretty straight forward, just included the dependencies and pruned duplicate entries (check the dependency report). If I get the plugin working I would be glad to share a demo project. However, I think that a fully fledged release of the plugin to grails central would take some more time. Cheers, Alex Am 03.09.2013 um 21:23 schrieb Martin Minka martin.mi...@gmail.com: Alex, I am sorry, I don't have solution for your problem, but maybe I will work soon on same issue. Are you using Drools 6.0.0.CR2 ? If yes, where you able to overcome this problem http://drools.46999.n3.nabble.com/rules-users-classloader-problem-in-Drools-6-0-0-CR1-and-CR2-working-in-Beta5-td4025726.html? Do you mind to share your plugin code with community ? Best regards, Martin 2013/9/3 Alexander Herwix a...@herwix.com Hey guys, I'm working on a Grails plugin for Drools/Jbpm 6 and I have trouble to get persistence working in a user friendly way. It would be awesome if someone with a better understanding of drools and especially drools spring integration could help me to figure this out :) I have considered multiple approaches: - Use a spring LocalContainerEntityManagerFactoryBean with a local JpaTransactionManager to configure a KieEnvironment via Spring. I basically got this working, but this doesn't provide real integration with Grails, as there are 2 seperate local TransactionManagers involved - limiting the ability to integrate drools in the grails app. - Use JTA-Transactions. As I want the plugin to be as user friendly as possible I would like to keep using the default tomcat container for development. There is the Atomikos Plugin for Grails which configures Grails to work with JTA. This works pretty nicely and should suffice for the development environment. My problem is integrating the Atomikos backed JTATransactionManager with the drools 6 spring environment configuration as I have not much experience with JTA. I have looked at the Tests for Kie-Spring and looked at as much documentation as I could find, but I can't seem to figure this out. This is what I use to configure the environment via spring (in Grails groovy syntax) jbpmGlobals(MapGlobalResolver) dacceptor(ClassObjectMarshallingStrategyAcceptor,['*.*']) kie.kstore(id:'kiestore') kie.environment(id: 'jbpmEnv'){ kie.'entity-manager-factory'(ref:'entityManagerFactory') kie.globals(ref:'jbpmGlobals') kie.'object-marshalling-strategies'(){ kie.'jpa-placeholder-resolver-strategy'() kie.'serializable-placeholder-resolver-strategy'('strategy-acceptor-ref':dacceptor) } } //Tried to wrap my JtaTransactionManager with KieSpringTransactionManager jbpmTransactionManager(KieSpringTransactionManager, ref('transactionManager')) the environment value for transactionManager cannot be set here, because the parser expects a JpaTransactionManager. I tried to add the transactionManager manually to the environment and found the KieSpringTransactionManager, which looked like it could help me somehow, but in the end, there is always the default implementation of the JtaTransactionManager used which can't find the transactionManager that I configured. Error: NamingException occurred when processing request: [GET] /bpm/test/testJbpm Cannot create resource instance. Stacktrace follows: javax.naming.NamingException: Cannot create resource instance at org.apache.naming.factory.TransactionFactory.getObjectInstance(TransactionFactory.java:116) at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:321) at org.apache.naming.NamingContext.lookup(NamingContext.java:843) at org.apache.naming.NamingContext.lookup(NamingContext.java:154) at
Re: [rules-users] Drools rules spring integration without using any persistence
Same here when deploying a war with spring configs for drools using 5.2.0.Final. Apart from the error in the logging, the application seems to run fine and firing rules just fine. Any ideas on how to get rid of this error message? -- View this message in context: http://drools.46999.n3.nabble.com/Drools-rules-spring-integration-without-using-any-persistence-tp3100014p3172008.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] Drools rules spring integration without using any persistence
Ok, found the culprit. Seems this comes from spring-support depending on drools-grid-impl. Why would you need a grid to execute rule locally? Any plans to remove this hard dependency in the future? -- View this message in context: http://drools.46999.n3.nabble.com/Drools-rules-spring-integration-without-using-any-persistence-tp3100014p3172268.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] Drools with Spring - Need Help
in the spring xml you can also declare globals and you should be able to access them in the drl via name http://docs.jboss.org/drools/release/5.2.0.Final/droolsjbpm-integration-docs/html_single/index.htm i think its the setGlobal Command -- View this message in context: http://drools.46999.n3.nabble.com/Drools-with-Spring-Need-Help-tp3115948p3137367.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] Drools with Spring - Need Help
Can you be bit elobrate? What version of drools you are using. -- View this message in context: http://drools.46999.n3.nabble.com/Drools-with-Spring-Need-Help-tp3115948p3129427.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] Drools with Spring - Need Help
can anybody guide me in this... -- View this message in context: http://drools.46999.n3.nabble.com/Drools-with-Spring-Need-Help-tp3115948p3120575.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] Drools with Spring - Need Help
my spring config file is: ?xml version=1.0 encoding=UTF-8? beans xmlns=http://www.springframework.org/schema/beans; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:context=http://www.springframework.org/schema/context; xmlns:util=http://www.springframework.org/schema/util; xmlns:drools=http://drools.org/schema/drools-spring; xsi:schemaLocation=http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd http://drools.org/schema/drools-spring http://drools.org/schema/drools-spring.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd; drools:kbase id=kBase drools:resources drools:resource type=DRL source=classpath:META-INF/rules/myproject-rules.drl / /drools:resources /drools:kbase drools:ksession id=kSession type=stateful kbase=kBase/drools:ksession /beans rule is: import. global EligibilityResult eligibilityResult; rule Customer State Check - ACTIVATED when SeHolder(seHolderState.state == ACT) then eligibilityResult = new EligibilityResult(); eligibilityResult.setEligible(true); insert(eligibilityResult); end java code @Resource StatefulKnowledgeSession kSession; @Override public SeHolder checkCustomerEligible(String seId) { EligibilityResult eligibilityResult = new EligibilityResult(); SeHolder seHolder = new SeHolder();//seHolderManagement.getSEHolder(seId); seHolder.setId(test0002); seHolder.setSeHolderState(SeHolderState.SUSPENDED); kSession.insert(seHolder); kSession.fireAllRules(); Object objs[]= kSession.getObjects().toArray(); for (int i = 0; i objs.length; i++) { eligibilityResult = (EligibilityResult) ((objs[i] instanceof EligibilityResult)?objs[i]:null); } System.out.println(- EligibilityResult - + eligibilityResult.isEligible()); kSession.dispose(); return seHolder; } NOW MY QUESTION IS THAT I AM GETTING THE EligibilityResult LIKE SHOWN IN ABOVE CODE.. CAN ANYBODY TELL ME IS THERE ANY OTHER SUFFICIENT WAY SO THAT I CAN GET IT BY NAME OR SOME OTHER WAY. -- View this message in context: http://drools.46999.n3.nabble.com/Drools-with-Spring-Need-Help-tp3115948p3115948.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] Drools rules spring integration without using any persistence
Newbie here. Appreciate your help. I am trying to integrate only drools expert (rules) with spring without any persistence. In spring beans config, i have specified like this. When i start my local server, I received the following error. [PersistenceUnitDeployment] Starting persistence unit persistence.unit:unitName=#org.drools.grid ERROR [AbstractKernelController] Error installing to Start: name=persistence.unit:unitName=#org.drools.grid state=Create Specification violation [EJB3 JPA 6.2.1.2] - You have not defined a jta-data-source for a JTA enabled persistence context named: org.drools.grid Spring beans config ?xml version=1.0 encoding=UTF-8? beans xmlns=http://www.springframework.org/schema/beans; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:drools=http://drools.org/schema/drools-spring; xsi:schemaLocation=http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://drools.org/schema/drools-spring http://drools.org/schema/drools-service-spring; drools:kbase id=kbase drools:resources drools:resource type=DRL source=classpath:testSpring.drl/drools:resource /drools:resources /drools:kbase drools:ksession id=statelessKSession type=stateless name=statelessKSession kbase=kbase/drools:ksession /beans -- View this message in context: http://drools.46999.n3.nabble.com/Drools-rules-spring-integration-without-using-any-persistence-tp3100014p3100014.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] Drools with Spring Batch
hi, have you figured out whats the problem.if u have then plz can u share it??? - Keep Working KiranP -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Drools-with-Spring-Batch-tp1488585p1634170.html Sent from the Drools - User 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] Drools with Spring Batch
Check the drools introduction at http://downloads.jboss.com/drools/docs/5.1.1.34858.FINAL/drools-introduction/html/ch02.html#d0e63 chapter 2.1.2.2. It has a nice configuration example. -Evert -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Drools-with-Spring-Batch-tp1488585p1516156.html Sent from the Drools - User 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] Drools with Spring Batch
I have some problems by configurating flow, here is my spring config: ?xml version=1.0 encoding=UTF-8? beans xmlns=http://www.springframework.org/schema/beans; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:drools=http://drools.org/schema/drools-spring; xmlns:camel=http://camel.apache.org/schema/spring; xsi:schemaLocation=http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://drools.org/schema/drools-spring http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-container/drools-spring/src/main/resources/org/drools/container/spring/drools-spring-1.0.0.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd; drools:resource id=r1 source=file:///process.rf type=DRF/ drools:resource id=r2 source=file:///rule1.rs type=DRL/ drools:resource id=r3 source=file:///rule2.rs type=DRL/ drools:resource-change-scanner id=scanner interval=10 / drools:ksession id=ksession type=stateful kbase=kbase/ drools:kagent id=agent kbase=kbase new-instance=true drools:resources drools:resource ref=r1/ drools:resource ref=r2/ drools:resource ref=r3/ /drools:resources /drools:kagent drools:kbase id=kbase drools:resources drools:resource ref=r1/ drools:resource ref=r2/ drools:resource ref=r3/ /drools:resources /drools:kbase /beans If i remove my flow from the kbase, i wount find it: ksession.startProcess(someId) - throws notFoundException if i remove my rules from the base, happens nothing when i call: ksession.fireAllRules() if i move away all resources from agent, nothing happens when i change my rule file. any help is appreciated. -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Drools-with-Spring-Batch-tp1488585p1517906.html Sent from the Drools - User 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] Drools with Spring Batch
Hi, I am trying to integrate Drools with Spring Batch. Is there some documentation that could throw some light on the configuration involved in the same. Regards, Manav ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Drools with spring
Hi thanks for reply Do I need drools server I am mainly using drools flow Regards Sonu Sent from my iPod On 23-Jul-2010, at 9:26 AM, Mark Proctor mproc...@codehaus.org wrote: On 23/07/2010 01:54, sonyt...@gmail.com wrote: Hi all I would like to integrate drools with spring If any body have example project share with me I will use spring 3 with drools 5.1 http://lucazamador.wordpress.com/2010/07/20/drools-server-configuration-updated/ http://blog.athico.com/2010/07/declarative-rest-services-for-drools.html Mark Thanks in advance Sonu Sent from my iPod ___ 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 ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Drools with spring
On 23/07/2010 02:50, sonyt...@gmail.com wrote: Hi thanks for reply Do I need drools server I am mainly using drools flow drools-server uses drools-spring and drools-camel. drools-spring can be used alone. Drools-server can just be used as an example project to get an idea of how it works, likewise look at the drools-spring unit tests to get more of an idea. Mark Regards Sonu Sent from my iPod On 23-Jul-2010, at 9:26 AM, Mark Proctormproc...@codehaus.org wrote: On 23/07/2010 01:54, sonyt...@gmail.com wrote: Hi all I would like to integrate drools with spring If any body have example project share with me I will use spring 3 with drools 5.1 http://lucazamador.wordpress.com/2010/07/20/drools-server-configuration-updated/ http://blog.athico.com/2010/07/declarative-rest-services-for-drools.html Mark Thanks in advance Sonu Sent from my iPod ___ 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 ___ 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] Drools Flow Spring Integration
really? nobody is using Drools Flow with Spring? Or nobody really knows the answer? -- View this message in context: http://n3.nabble.com/Drools-Flow-Spring-Integration-tp467383p594037.html Sent from the Drools - User 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] Drools Flow Spring Integration
Is there a working example on integrating Drools Flow with Spring? I can see an attempt in the trunk: http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-container/drools-spring/src/test/resources/org/drools/container/spring/beans/persistence/beans.xml but it is rather a sketch... I am looking to create a stateful JPA KnowledgeService, DB Logger and register Variable Persisters via Spring. Thank you, /Anatoly ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Drools With Spring
Hi All, I am starting to work with Drools 5.1 and Spring framework. Please can u help with giving some examples or configuration files. Regards, Ram -- View this message in context: http://n3.nabble.com/Drools-With-Spring-tp449155p449155.html Sent from the Drools - User 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] Drools and Spring Integration
I've had no feedback on the dev mailing list about this, so thought I'd mention it here. If you want strong spring/guice integration with Drools please do get involved in this project and if they mature well enough we'll include them as part of the standard distro. http://blog.athico.com/2008/01/drools-and-spring-integration.html Mark ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] DROOLS AND SPRING INTEGRATION
Hi, Could u please help me in drools and spring integration by giving some examples Thanks, suma -- View this message in context: http://www.nabble.com/DROOLS-AND-SPRING-INTEGRATION-tf3809566.html#a10782082 Sent from the drools - user 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] Drools With Spring Framework Problem
I have tried of using the sample coding given the link given by you: But i am getting the following error: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ruleBase' defined in ServletContext resource [/WEB-INF/insurance-servlet.xml]: Initialization of bean failed; nested exception is java.lang.RuntimeException: Operator '40' does not exist for StringEvaluator org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:403) org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:233) org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:145) org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:277) org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:313) org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:139) org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:306) org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:251) org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:220) org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:112) javax.servlet.GenericServlet.init(GenericServlet.java:211) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) java.lang.Thread.run(Thread.java:595) My insurance-servlet.xml: beans !-- default handlermapping -- bean id=beanNameUrlMapping class=org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping/ bean name=/home.htm class=com.sample.InsuranceController singleton=false property name=ruleBase ref bean=ruleBase/ /property property name=insurBean ref bean=insurance/ /property /bean !-- View Resolver -- bean id=viewResolver class=org.springframework.web.servlet.view.InternalResourceViewResolver property name=prefix value/WEB-INF/jsp//value /property property name=suffix value.jsp/value /property /bean !-- Bean -- bean id=insurance class=com.sample.InsuranceBean/ bean id=ruleBase class=com.sample.RuleBaseBeanFactory property name=drlResourceList list value type=org.springframework.core.io.Resourceclasspath:/com/sample/Approval.drl/value /list /property property name=packageBuilderConfiguration bean class=org.drools.compiler.PackageBuilderConfiguration property name=javaLanguageLevel value=1.5/ /bean /property /bean /beans On 2/19/07, Olenin, Vladimir (MOH) [EMAIL PROTECTED] wrote: Check out 'Spring Modules' subproject - it has a DROOLS integration module. Haven't used it myself yet, so not sure whether it's mature/compatible with most recent release. https://springmodules.dev.java.net/docs/reference/0.7/html/jsr94.html#d0e570 9 https://springmodules.dev.java.net/ Vlad -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Niyas Sent: 19 February 2007 09:49 To: rules-users@lists.jboss.org Subject: [rules-users] Drools With Spring Framework Problem Hi all, I am in need of integrating Drools JBoss Rule Engine with Spring Framework. I have tried sample rule engine examples in the Drools in the standalone with the help od drools IDE for eclipse 3.2. And I also tried some example in the Spring Framework,to know how it works. I have tried some examples in IOC, MVC and JDBC in the spring framework. Now, I want to use both Drools and Spring Framework
Re: [rules-users] Drools With Spring Framework Problem
Hi Niyas, This is something I faced yesterday but did not had the time to work on it yet. Basically, 2 problems: 1. Error message is crap... we need to improve that. 2. It should not be raising any error. The error means you have a String attribute you are trying to compare using operators like , , =, =. Example: Person( name 'Edson' ) And I think the above should work but is not working. I will open a JIRA for that. Meanwhile, if you need to have such constraint, a workaround is to use a predicate: Person( $n : name, ( $n.compareTo( 'Edson' ) 0 ) ) []s Edson Niyas wrote: I have tried of using the sample coding given the link given by you: But i am getting the following error: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ruleBase' defined in ServletContext resource [/WEB-INF/insurance-servlet.xml]: Initialization of bean failed; nested exception is java.lang.RuntimeException: Operator '40' does not exist for StringEvaluator org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:403) org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:233) org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:145) org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:277) org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:313) org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:139) org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:306) org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:251) org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:220) org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:112) javax.servlet.GenericServlet.init(GenericServlet.java:211) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) java.lang.Thread.run(Thread.java:595) My insurance-servlet.xml: beans !-- default handlermapping -- bean id=beanNameUrlMapping class=org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping/ bean name=/home.htm class=com.sample.InsuranceController singleton=false property name=ruleBase ref bean=ruleBase/ /property property name=insurBean ref bean=insurance/ /property /bean !-- View Resolver -- bean id=viewResolver class=org.springframework.web.servlet.view.InternalResourceViewResolver property name=prefix value/WEB-INF/jsp//value /property property name=suffix value.jsp/value /property /bean !-- Bean -- bean id=insurance class=com.sample.InsuranceBean/ bean id=ruleBase class=com.sample.RuleBaseBeanFactory property name=drlResourceList list value type=org.springframework.core.io.Resourceclasspath:/com/sample/Approval.drl/value /list /property property name=packageBuilderConfiguration bean class=org.drools.compiler.PackageBuilderConfiguration property name=javaLanguageLevel value=1.5/ /bean /property /bean /beans On 2/19/07, Olenin, Vladimir (MOH) [EMAIL PROTECTED] wrote: Check out 'Spring Modules' subproject - it has a DROOLS integration module. Haven't used it myself yet, so not sure whether it's mature/compatible with most recent release. https://springmodules.dev.java.net/docs/reference/0.7/html/jsr94.html#d0e570 9 https://springmodules.dev.java.net/ Vlad -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Niyas Sent: 19 February 2007 09:49 To: rules-users@lists.jboss.org Subject: [rules-users] Drools With Spring Framework Problem Hi all, I am in need of integrating Drools JBoss Rule Engine with Spring Framework. I have tried sample rule
Re: [rules-users] Drools With Spring Framework Problem
Resolver -- bean id=viewResolver class=org.springframework.web.servlet.view.InternalResourceViewResolver property name=prefix value/WEB-INF/jsp//value /property property name=suffix value.jsp/value /property /bean !-- Bean -- bean id=insurance class=com.sample.InsuranceBean/ bean id=ruleBase class=com.sample.RuleBaseBeanFactory property name=drlResourceList list value type=org.springframework.core.io.Resourceclasspath:/com/sample/Approval.drl/value /list /property property name=packageBuilderConfiguration bean class=org.drools.compiler.PackageBuilderConfiguration property name=javaLanguageLevel value=1.5/ /bean /property /bean /beans On 2/19/07, Olenin, Vladimir (MOH) [EMAIL PROTECTED] wrote: Check out 'Spring Modules' subproject - it has a DROOLS integration module. Haven't used it myself yet, so not sure whether it's mature/compatible with most recent release. https://springmodules.dev.java.net/docs/reference/0.7/html/jsr94.html#d0e570 9 https://springmodules.dev.java.net/ Vlad -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Niyas Sent: 19 February 2007 09:49 To: rules-users@lists.jboss.org Subject: [rules-users] Drools With Spring Framework Problem Hi all, I am in need of integrating Drools JBoss Rule Engine with Spring Framework. I have tried sample rule engine examples in the Drools in the standalone with the help od drools IDE for eclipse 3.2. And I also tried some example in the Spring Framework,to know how it works. I have tried some examples in IOC, MVC and JDBC in the spring framework. Now, I want to use both Drools and Spring Framework in such a way that Spring will have the MVC application and it should validate the rules, which written in the drools (.drl) I don't know how to begin with/what are he configuration files needed to setup. PLease if anyone have the sample coding on Drools with Spring or any other links willl be very useful. And also, guide me what are the things need to be know for Spring with Drools. While I have searched in google, lots of things came up like: Use JSR94... (which is mentioning to configure RuleServiceProvider, RuleRuntime, RuleSet..and others..which seeme to be confusing and not clear) Whether there are any API for drools with spring that DROOLS is supporting..like org.drools.spring.metadata.ArgumentMetadataSource. I don't find these Drools API section http://labs.jboss.com/file-access/default/members/jbossrules/freezone/docs/3 .0.5/apidocs/index.html ___ 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 ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- Edson Tirelli Software Engineer - JBoss Rules Core Developer Office: +55 11 3124-6000 Mobile: +55 11 9218-4151 JBoss, a division of Red Hat @ www.jboss.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] Drools With Spring Framework Problem
=com.sample.InsuranceController singleton=false property name=ruleBase ref bean=ruleBase/ /property property name=insurBean ref bean=insurance/ /property /bean !-- View Resolver -- bean id=viewResolver class=org.springframework.web.servlet.view.InternalResourceViewResolver property name=prefix value/WEB-INF/jsp//value /property property name=suffix value.jsp/value /property /bean !-- Bean -- bean id=insurance class=com.sample.InsuranceBean/ bean id=ruleBase class=com.sample.RuleBaseBeanFactory property name=drlResourceList list value type=org.springframework.core.io.Resourceclasspath:/com/sample/Approval.drl/value /list /property property name=packageBuilderConfiguration bean class=org.drools.compiler.PackageBuilderConfiguration property name=javaLanguageLevel value=1.5/ /bean /property /bean /beans On 2/19/07, Olenin, Vladimir (MOH) [EMAIL PROTECTED] wrote: Check out 'Spring Modules' subproject - it has a DROOLS integration module. Haven't used it myself yet, so not sure whether it's mature/compatible with most recent release. https://springmodules.dev.java.net/docs/reference/0.7/html/jsr94.html#d0e570 9 https://springmodules.dev.java.net/ Vlad -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Niyas Sent: 19 February 2007 09:49 To: rules-users@lists.jboss.org Subject: [rules-users] Drools With Spring Framework Problem Hi all, I am in need of integrating Drools JBoss Rule Engine with Spring Framework. I have tried sample rule engine examples in the Drools in the standalone with the help od drools IDE for eclipse 3.2. And I also tried some example in the Spring Framework,to know how it works. I have tried some examples in IOC, MVC and JDBC in the spring framework. Now, I want to use both Drools and Spring Framework in such a way that Spring will have the MVC application and it should validate the rules, which written in the drools (.drl) I don't know how to begin with/what are he configuration files needed to setup. PLease if anyone have the sample coding on Drools with Spring or any other links willl be very useful. And also, guide me what are the things need to be know for Spring with Drools. While I have searched in google, lots of things came up like: Use JSR94... (which is mentioning to configure RuleServiceProvider, RuleRuntime, RuleSet..and others..which seeme to be confusing and not clear) Whether there are any API for drools with spring that DROOLS is supporting..like org.drools.spring.metadata.ArgumentMetadataSource. I don't find these Drools API section http://labs.jboss.com/file-access/default/members/jbossrules/freezone/docs/3 .0.5/apidocs/index.html ___ 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 ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- Edson Tirelli Software Engineer - JBoss Rules Core Developer Office: +55 11 3124-6000 Mobile: +55 11 9218-4151 JBoss, a division of Red Hat @ www.jboss.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 -- Edson Tirelli Software Engineer - JBoss Rules Core Developer Office: +55 11 3124-6000 Mobile: +55 11 9218-4151 JBoss, a division of Red Hat @ www.jboss.com ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users