Hi Edson,
Thanks for your suggestions. The facts are produced as the rules are executed. Once the "interesting" fact has been produced which
involves a rule to be executed, I am done but this does not mean the production of facts is done. So, I used clearAgenda(). Also, I use a new
workingmemory for every new thread (multi-threaded environment). So, if I use halt() is this equivalent to clearAgenda() ?.
From my understanding, the execution starts again only if you use the same working memory ?.
Thanks,
Krishnan.
Krishnan
clearAgenda() was not a safe method of doing that. The safe way to stop the rules firing for the engine is calling the halt() method:
drools.halt();
Although, it is important to note that halt() will only stop the rules firing but will NOT clear the agenda. i.e., if you call fireAllRules() again, the engine will continue executing from the point it stopped when halt() was called.
If you think you know what your are doing and really wants to clear the agenda, you can still do:
drools.getWorkingMemory().clearAgenda();
But again, this is not something that should be used inside rules.
[]s
Edson2007/8/22, Krishnan < krishiyer@gmail.com>:_______________________________________________
Hi all,
Is there a migration guide from 4.0 MR2 to 4.0 GA ?. I had got the code working in 4.0 MR2 and thought it would be
as easy as just changing the jars. But it is not. Many things have changed.
(a) I modified the assert() into insert()
Is there anything else I should know about ?
One of my failure is for the method clearAgenda() is undefined for the type KnowledgeHelper.
Previously, in the rules file (.drl), once a rule has executed and I know I am done, I would call drools.clearAgenda() to
expedite the processing, this does not work anymore. Has the functionality changed ?
Any help will be appreciated ?.
thanks,
Krishnan.
--
Sivaramakrishna Iyer Krishnan (Anand)
Never assume the obvious is true.
- William Safire
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 3529-6000
Mobile: +55 11 9287-5646
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