Sorry, I'm using Drools 5.0.1
Cheers,
Stephen
Quoting Esteban Aliverti <esteban.aliverti(a)gmail.com>:
Which version of drools are you using?
On Thu, Jun 24, 2010 at 5:33 AM, Stephen Mcgruer
<s0840449(a)sms.ed.ac.uk>wrote:
> Hi there. I'm trying to get automatic update of rules working in my
> project, and seem to
> have run into a problem. As far as I can tell, automatic polling and
> updating is turned
> on, and claims to update the knowledgebase, but changes to the rules
> don't seem to have
> any effect. A simple example - if I add the rule:
>
> rule "TestRule"
> dialect "mvel"
> when
> then
> System.out.println("Hello, world!");
> end
>
> And start my application, I get:
>
> Firing all rules...
> Hello, world!
> All rules fired.
>
> As expected. If I then change the rule as follows:
>
> rule "TestRule"
> dialect "mvel"
> when
> then
> System.out.println("I have changed!");
> end
>
> I get this output (timestamps trimmed for readability):
>
> ResourceChangeScanner attempt to scan 1 resources
> ResourceChangeScanner modified resource=[UrlResource
> path='
>
http://localhost:1337/drools-guvnor/org.drools.guvnor.Guvnor/package/ERMI...
> ']
> :
> 1277371031000 : 1277371254000
> ResourceChangeNotification received ChangeSet notification
> ResourceChangeScanner thread is waiting for 60
> ResourceChangeNotification processing ChangeSet
> ResourceChangeNotification ChangeSet modified resource=[UrlResource
> path='
>
http://localhost:1337/drools-guvnor/org.drools.guvnor.Guvnor/package/ERMI...
> ']
> for listener=org.drools.agent.impl.KnowledgeAgentImpl@e2d0b2
> KnowledgeAgent received ChangeSet changed notification
> ResourceChangeNotification thread is waiting for queue update
> KnowledgAgent applying ChangeSet
> KnowledgeAgent ChangeSet requires KnowledgeBuilderKnowledgeAgent
> rebuilding KnowledgeBase
> using ChangeSet
> KnowledgeAgent building resource=[UrlResource
> path='
>
http://localhost:1337/drools-guvnor/org.drools.guvnor.Guvnor/package/ERMI...
> ']
> KnowledgeAgent adding KnowledgeDefinitionsPackage ERMIE
> KnowledgeAgent new KnowledgeBase now built and in use
>
> So, this makes it seem like everything has worked. However, if I
> insert a new fact and
> fire all rules...
>
> Inserting new fact...
> Hello, World!
>
> So, it hasn't worked. What might I have done wrong?
>
>
> -Stephen
>
> --
> The University of Edinburgh is a charitable body, registered in
> Scotland, with registration number SC005336.
>
>
>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/rules-users
>
--
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Esteban Aliverti
--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.