Thanks for your responses. Works for me now, with below modifications.
I was expecting the agent to pick up the latest drl file using path in
changeset.
*Before - Didn't work*
...(initialized kagent using changeset...no timer rules)
kbase = kagent.getKnowledgeBase();
ksession = kbase.newStatefulKnowledgeSession();
ksession.fireAllRules();
...(Add new timer rule in changeset directory)
ksession.fireAllRules();
*After - Works*
...(initialized kagent using changeset...no timer rules)
kbase = kagent.getKnowledgeBase();
...(Add new timer rule in changeset directory)
ksession = kbase.newStatefulKnowledgeSession();
ksession.fireAllRules();
My expectation was the session to pick the new rule based on
"drools.resource.scanner.interval", which I now believe is wrong. Only the
knowledgebase i.e. in the above example kbase.newStatefulKnowledgeSession()
will have the new rule and not the earlier(before adding new rule) sessions.
--
View this message in context:
http://drools.46999.n3.nabble.com/Cron-Rule-doesn-t-work-tp4024399p402444...
Sent from the Drools: User forum mailing list archive at
Nabble.com.