I'm using Drools 7 + Sprint boot + Hibernate JPA. I didn't use the drl file-system for my project. I generate the drool file at runtime using the java program and save it to my db. There after i will load into my drools as follow. Everything working fine for me. Only thing when i used the cron expression is not updated in my drools session. Let's say initially in my db have one rule with timer cron-expression to trigger every 2 mins. When load the rules from db in the first time, rules are load in drools session and Cron trigger every 2 mins. Thereafter i have updated cron-expression to trigger every 5 mins in my database and reload it without stop my application, and rules are loaded. But now trigger was executed every 2 mins and every 5 mins. The previous cron still running.
So i want to remove all active drools stuff like scheduled cron rules before reload. And also how to stop scheduled cron in drools. Did i miss anything in my drools configuration.
Thanks in advance.
Asked
Active
Viewed 192 times
0

Thilakar Raj
- 37
- 13
-
You really need to put your code into your question, not link to it in half a dozen other locations. – Roddy of the Frozen Peas Jul 24 '20 at 14:39
-
Also you need to delete the old cron trigger. You don't 'update' triggers, you add new ones and delete the existing one. You just omitted the 'delete'. – Roddy of the Frozen Peas Jul 24 '20 at 14:40