Help required for upgrading drools in our project from 4.0.7 to 7.5

51 views
Skip to first unread message

Lakshmi Ramya

unread,
Jun 3, 2021, 5:53:03 AM6/3/21
to Drools Setup
I am new to drools and please bear with me , may be this is the simplest Question.
We are upgrading our project to SpringBoot and also upgrading the drools from 4.0.7 to 7.5.0 .
My requirement is the Rules should get autoupdated without restart of the application.
We were doing this with RuleAgent which polls for the drool file for specified time duration with older version.
To achieve this with newer version, I have found in different forums to deploy kieContainer with new ReleaseId and this to be done with kieScanner and kieContainer.updateTorevision(ReleaseId).

I am not able to accomplish this. So my ask is -
Can someone help me with a sample project which does this?

Regards
Ramya




Toshiya Kobayashi

unread,
Jul 28, 2021, 11:09:15 PM7/28/21
to Drools Setup
Hi,

In this repo,


I have 2 simple example projects for KieScanner. (not spring boot)

- Ex-basic-kjar-7.57

  -> kjar project

- Ex-basic-kjar-test-scanner-7.57

  -> execute kjar with KieScanner (10 sec interval scan)

1. Build Ex-basic-kjar-7.57
2. Run DroolsTest in Ex-basic-kjar-test-scanner-7.57
   You will see output "Version 1.0.3 Hello, john" in a loop (keep it running)
3. Increment version in Ex-basic-kjar-7.57's pom.xml (e.g. 1.0.4)
4. Modify the rule System.out.println message (e.g. "Version 1.0.4 Hello,") in Ex-basic-kjar-7.57's Sample.drl
5. Build Ex-basic-kjar-7.57 again
6. KieScanner will detect the change and the output becomes "Version 1.0.4 Hello, john"

I hope it helps
Toshiya


2021年6月3日木曜日 18:53:03 UTC+9 lakshmi...@gmail.com:
Reply all
Reply to author
Forward
0 new messages