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,
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Esteban Aliverti
- Developer @
http://www.plugtree.com
- Blog @
http://ilesteban.wordpress.com
On Wed, Nov 16, 2011 at 3:43 PM, sgo <simon.goumaz(a)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-fr...
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users