Re: [rules-users] No rules loaded when reading package from Guvnor
@Michael, yes, Geoffrey merged it. I couldn't finish the test I was preparing because I need to finish some stuff first :(. The fact that mvn test -Dtest=Whatever is not working is also making my life miserable :) Best Regards, Esteban Aliverti - Developer @ http://www.plugtree.com - Blog @ http://ilesteban.wordpress.com On Thu, Nov 17, 2011 at 2:43 PM, sgo simon.gou...@elca.ch wrote: Confirmed. There is no issue loading the package from the filesystem. We do need to keep the kbase in sync without restarting our app, so for now we'll just avoid loading directly from Guvnor. Thanks a lot both for your help. Esteban wrote: I think you are fighting with this known bug: https://issues.jboss.org/browse/GUVNOR-1699 ResourceChangeScanner is marking guvnor's resources as removed. I committed a patch some days ago. If you are not interested in keep the kbase in sync with the changes made in Guvnor, a valid workaround could be not to use the kagent and get the pkg directly from Guvnor's URL Best Regards, Esteban Aliverti - Developer @ http://www.plugtree.com - Blog @ http://ilesteban.wordpress.com On Wed, Nov 16, 2011 at 3:43 PM, sgo lt;simon.goumaz@gt; wrote: Update: if I don't start the resource change scanner, the session created with Spring is fine too. So, when starting the scanner, the difference between the Spring case (package loaded but no rules) and the Java code case (no package at all) may be due to code sequence, as in the code I'm using the scanner is started in my service class constructor, after creating the session in Java code but before Spring beans are injected. Depending on your replies I may then try testing with different sequences. sgo wrote: @Michael: Yes this is the right track... I created an alternate session without Spring by simply loading the package from the URL with a KnowledgeBuilder, it worked (the rules were there). Then I went on and created another session with a KnowledgeAgent loading my XML ChangeSet (still without Spring), and I observed the following: 1. When the session is created, all is fine (package and rules loaded properly in session) 2. When I start the ResourceChangeScanner (ResourceFactory.getResourceChangeScannerService().start()), however, the loaded package disappears from the session. So there are now two things I need to understand: 1. Why does starting the scanner clear the packages loaded in the session? 1. What is the issue when using Spring, as with Spring I still have my package loaded in the session but no rules? -- View this message in context: http://drools.46999.n3.nabble.com/No-rules-loaded-when-reading-package-from-Guvnor-tp3510245p3512855.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@.jboss https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@.jboss https://lists.jboss.org/mailman/listinfo/rules-users -- View this message in context: http://drools.46999.n3.nabble.com/No-rules-loaded-when-reading-package-from-Guvnor-tp3510245p3515794.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] No rules loaded when reading package from Guvnor
Thanks for the quick replies. @Esteban: - Yes the rules do appear when accessing the package source published by Guvnor - Yes the package is built; for my understanding wouldn't trying to load an unbuilt package from its URL generate an error? @Michael: Yes this is the right track... I created an alternate session without Spring by simply loading the package from the URL with a KnowledgeBuilder, it worked (the rules were there). Then I went on and created another session with a KnowledgeAgent loading my XML ChangeSet (still without Spring), and I observed the following: 1. When the session is created, all is fine (package and rules loaded properly in session) 2. When I start the ResourceChangeScanner (ResourceFactory.getResourceChangeScannerService().start()), however, the loaded package disappears from the session. So there are now two things I need to understand: 1. Why does starting the scanner clear the packages loaded in the session? 1. What is the issue when using Spring, as with Spring I still have my package loaded in the session but no rules? Thanks again. Simon -- View this message in context: http://drools.46999.n3.nabble.com/No-rules-loaded-when-reading-package-from-Guvnor-tp3510245p3512702.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] No rules loaded when reading package from Guvnor
Update: if I don't start the resource change scanner, the session created with Spring is fine too. So, when starting the scanner, the difference between the Spring case (package loaded but no rules) and the Java code case (no package at all) may be due to code sequence, as in the code I'm using the scanner is started in my service class constructor, after creating the session in Java code but before Spring beans are injected. Depending on your replies I may then try testing with different sequences. sgo wrote: @Michael: Yes this is the right track... I created an alternate session without Spring by simply loading the package from the URL with a KnowledgeBuilder, it worked (the rules were there). Then I went on and created another session with a KnowledgeAgent loading my XML ChangeSet (still without Spring), and I observed the following: 1. When the session is created, all is fine (package and rules loaded properly in session) 2. When I start the ResourceChangeScanner (ResourceFactory.getResourceChangeScannerService().start()), however, the loaded package disappears from the session. So there are now two things I need to understand: 1. Why does starting the scanner clear the packages loaded in the session? 1. What is the issue when using Spring, as with Spring I still have my package loaded in the session but no rules? -- View this message in context: http://drools.46999.n3.nabble.com/No-rules-loaded-when-reading-package-from-Guvnor-tp3510245p3512855.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] No rules loaded when reading package from Guvnor
I think you are fighting with this known bug: https://issues.jboss.org/browse/GUVNOR-1699 ResourceChangeScanner is marking guvnor's resources as removed. I committed a patch some days ago. If you are not interested in keep the kbase in sync with the changes made in Guvnor, a valid workaround could be not to use the kagent and get the pkg directly from Guvnor's URL Best Regards, Esteban Aliverti - Developer @ http://www.plugtree.com - Blog @ http://ilesteban.wordpress.com On Wed, Nov 16, 2011 at 3:43 PM, sgo simon.gou...@elca.ch wrote: Update: if I don't start the resource change scanner, the session created with Spring is fine too. So, when starting the scanner, the difference between the Spring case (package loaded but no rules) and the Java code case (no package at all) may be due to code sequence, as in the code I'm using the scanner is started in my service class constructor, after creating the session in Java code but before Spring beans are injected. Depending on your replies I may then try testing with different sequences. sgo wrote: @Michael: Yes this is the right track... I created an alternate session without Spring by simply loading the package from the URL with a KnowledgeBuilder, it worked (the rules were there). Then I went on and created another session with a KnowledgeAgent loading my XML ChangeSet (still without Spring), and I observed the following: 1. When the session is created, all is fine (package and rules loaded properly in session) 2. When I start the ResourceChangeScanner (ResourceFactory.getResourceChangeScannerService().start()), however, the loaded package disappears from the session. So there are now two things I need to understand: 1. Why does starting the scanner clear the packages loaded in the session? 1. What is the issue when using Spring, as with Spring I still have my package loaded in the session but no rules? -- View this message in context: http://drools.46999.n3.nabble.com/No-rules-loaded-when-reading-package-from-Guvnor-tp3510245p3512855.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] No rules loaded when reading package from Guvnor
The patch has not been applied yet. @esteban, did you modify to (a) include the other two changes, (b) a test-case? Cheers, Mike 2011/11/16 Esteban Aliverti esteban.alive...@gmail.com I think you are fighting with this known bug: https://issues.jboss.org/browse/GUVNOR-1699 ResourceChangeScanner is marking guvnor's resources as removed. I committed a patch some days ago. If you are not interested in keep the kbase in sync with the changes made in Guvnor, a valid workaround could be not to use the kagent and get the pkg directly from Guvnor's URL Best Regards, Esteban Aliverti - Developer @ http://www.plugtree.com - Blog @ http://ilesteban.wordpress.com On Wed, Nov 16, 2011 at 3:43 PM, sgo simon.gou...@elca.ch wrote: Update: if I don't start the resource change scanner, the session created with Spring is fine too. So, when starting the scanner, the difference between the Spring case (package loaded but no rules) and the Java code case (no package at all) may be due to code sequence, as in the code I'm using the scanner is started in my service class constructor, after creating the session in Java code but before Spring beans are injected. Depending on your replies I may then try testing with different sequences. sgo wrote: @Michael: Yes this is the right track... I created an alternate session without Spring by simply loading the package from the URL with a KnowledgeBuilder, it worked (the rules were there). Then I went on and created another session with a KnowledgeAgent loading my XML ChangeSet (still without Spring), and I observed the following: 1. When the session is created, all is fine (package and rules loaded properly in session) 2. When I start the ResourceChangeScanner (ResourceFactory.getResourceChangeScannerService().start()), however, the loaded package disappears from the session. So there are now two things I need to understand: 1. Why does starting the scanner clear the packages loaded in the session? 1. What is the issue when using Spring, as with Spring I still have my package loaded in the session but no rules? -- View this message in context: http://drools.46999.n3.nabble.com/No-rules-loaded-when-reading-package-from-Guvnor-tp3510245p3512855.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 ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] No rules loaded when reading package from Guvnor
Take that back. I see ge0ffrey merged On 16 November 2011 17:51, Michael Anstis michael.ans...@gmail.com wrote: The patch has not been applied yet. @esteban, did you modify to (a) include the other two changes, (b) a test-case? Cheers, Mike 2011/11/16 Esteban Aliverti esteban.alive...@gmail.com I think you are fighting with this known bug: https://issues.jboss.org/browse/GUVNOR-1699 ResourceChangeScanner is marking guvnor's resources as removed. I committed a patch some days ago. If you are not interested in keep the kbase in sync with the changes made in Guvnor, a valid workaround could be not to use the kagent and get the pkg directly from Guvnor's URL Best Regards, Esteban Aliverti - Developer @ http://www.plugtree.com - Blog @ http://ilesteban.wordpress.com On Wed, Nov 16, 2011 at 3:43 PM, sgo simon.gou...@elca.ch wrote: Update: if I don't start the resource change scanner, the session created with Spring is fine too. So, when starting the scanner, the difference between the Spring case (package loaded but no rules) and the Java code case (no package at all) may be due to code sequence, as in the code I'm using the scanner is started in my service class constructor, after creating the session in Java code but before Spring beans are injected. Depending on your replies I may then try testing with different sequences. sgo wrote: @Michael: Yes this is the right track... I created an alternate session without Spring by simply loading the package from the URL with a KnowledgeBuilder, it worked (the rules were there). Then I went on and created another session with a KnowledgeAgent loading my XML ChangeSet (still without Spring), and I observed the following: 1. When the session is created, all is fine (package and rules loaded properly in session) 2. When I start the ResourceChangeScanner (ResourceFactory.getResourceChangeScannerService().start()), however, the loaded package disappears from the session. So there are now two things I need to understand: 1. Why does starting the scanner clear the packages loaded in the session? 1. What is the issue when using Spring, as with Spring I still have my package loaded in the session but no rules? -- View this message in context: http://drools.46999.n3.nabble.com/No-rules-loaded-when-reading-package-from-Guvnor-tp3510245p3512855.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 ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] No rules loaded when reading package from Guvnor
@esteban But the other two Response.ok(...).header(...) should be fixed and submitted as another pull request, please :) And the test - if you have one. :) On 16 November 2011 17:54, Michael Anstis michael.ans...@gmail.com wrote: Take that back. I see ge0ffrey merged On 16 November 2011 17:51, Michael Anstis michael.ans...@gmail.comwrote: The patch has not been applied yet. @esteban, did you modify to (a) include the other two changes, (b) a test-case? Cheers, Mike 2011/11/16 Esteban Aliverti esteban.alive...@gmail.com I think you are fighting with this known bug: https://issues.jboss.org/browse/GUVNOR-1699 ResourceChangeScanner is marking guvnor's resources as removed. I committed a patch some days ago. If you are not interested in keep the kbase in sync with the changes made in Guvnor, a valid workaround could be not to use the kagent and get the pkg directly from Guvnor's URL Best Regards, Esteban Aliverti - Developer @ http://www.plugtree.com - Blog @ http://ilesteban.wordpress.com On Wed, Nov 16, 2011 at 3:43 PM, sgo simon.gou...@elca.ch wrote: Update: if I don't start the resource change scanner, the session created with Spring is fine too. So, when starting the scanner, the difference between the Spring case (package loaded but no rules) and the Java code case (no package at all) may be due to code sequence, as in the code I'm using the scanner is started in my service class constructor, after creating the session in Java code but before Spring beans are injected. Depending on your replies I may then try testing with different sequences. sgo wrote: @Michael: Yes this is the right track... I created an alternate session without Spring by simply loading the package from the URL with a KnowledgeBuilder, it worked (the rules were there). Then I went on and created another session with a KnowledgeAgent loading my XML ChangeSet (still without Spring), and I observed the following: 1. When the session is created, all is fine (package and rules loaded properly in session) 2. When I start the ResourceChangeScanner (ResourceFactory.getResourceChangeScannerService().start()), however, the loaded package disappears from the session. So there are now two things I need to understand: 1. Why does starting the scanner clear the packages loaded in the session? 1. What is the issue when using Spring, as with Spring I still have my package loaded in the session but no rules? -- View this message in context: http://drools.46999.n3.nabble.com/No-rules-loaded-when-reading-package-from-Guvnor-tp3510245p3512855.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 ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] No rules loaded when reading package from Guvnor
Hello all, I'm a semi-beginner with Drools and am having an issue I haven't found reported elsewhere. I have a package defined in Guvnor, with model imported from JAR, one global, a dozen rules and a couple of test scenarios. The package is loaded from the binary published by Guvnor via a knowledge agent into my stateless session (defined in Spring beans), but no rules ever fire. (Note that rules do fire as expected in my Guvnor test scenarios.) When investigating in debug mode, I see the package is properly loaded, with imported type definitions and global, but no rule is in there! The package's rules table is empty and I really have no clue why (I initially thought my rule definitions could be the cause and created a minimal test package with just one simple rule but with no success.) Could anyone point to possible causes for this? Many thanks in advance. Simon -- View this message in context: http://drools.46999.n3.nabble.com/No-rules-loaded-when-reading-package-from-Guvnor-tp3510245p3510245.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] No rules loaded when reading package from Guvnor
To help isolate the problem, what happens if you try the same but without Spring? i.e. You use the KnowledgeAgent to retrieve the package from Guvnor, create a session, insert facts, fireAllRules etc? On 15 November 2011 16:41, sgo simon.gou...@elca.ch wrote: Hello all, I'm a semi-beginner with Drools and am having an issue I haven't found reported elsewhere. I have a package defined in Guvnor, with model imported from JAR, one global, a dozen rules and a couple of test scenarios. The package is loaded from the binary published by Guvnor via a knowledge agent into my stateless session (defined in Spring beans), but no rules ever fire. (Note that rules do fire as expected in my Guvnor test scenarios.) When investigating in debug mode, I see the package is properly loaded, with imported type definitions and global, but no rule is in there! The package's rules table is empty and I really have no clue why (I initially thought my rule definitions could be the cause and created a minimal test package with just one simple rule but with no success.) Could anyone point to possible causes for this? Many thanks in advance. Simon -- View this message in context: http://drools.46999.n3.nabble.com/No-rules-loaded-when-reading-package-from-Guvnor-tp3510245p3510245.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] No rules loaded when reading package from Guvnor
.- What happens if you access the package's source URL using your browser? Do you see all your rules there? .- Did you actually build your package in Guvnor? Best Regards, Esteban Aliverti - Developer @ http://www.plugtree.com - Blog @ http://ilesteban.wordpress.com 2011/11/15 Michael Anstis michael.ans...@gmail.com To help isolate the problem, what happens if you try the same but without Spring? i.e. You use the KnowledgeAgent to retrieve the package from Guvnor, create a session, insert facts, fireAllRules etc? On 15 November 2011 16:41, sgo simon.gou...@elca.ch wrote: Hello all, I'm a semi-beginner with Drools and am having an issue I haven't found reported elsewhere. I have a package defined in Guvnor, with model imported from JAR, one global, a dozen rules and a couple of test scenarios. The package is loaded from the binary published by Guvnor via a knowledge agent into my stateless session (defined in Spring beans), but no rules ever fire. (Note that rules do fire as expected in my Guvnor test scenarios.) When investigating in debug mode, I see the package is properly loaded, with imported type definitions and global, but no rule is in there! The package's rules table is empty and I really have no clue why (I initially thought my rule definitions could be the cause and created a minimal test package with just one simple rule but with no success.) Could anyone point to possible causes for this? Many thanks in advance. Simon -- View this message in context: http://drools.46999.n3.nabble.com/No-rules-loaded-when-reading-package-from-Guvnor-tp3510245p3510245.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 ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users