Hi,
My rules are on hdfs I did write a program to load rules files (drl files) from hdfs and create kieSession. Now I want a mechanism to dynamically reload the rules when updated.
As I read through documents, "KnowledgeAgent" is replaced by "KieScanner".
My questions are as follows
1. KieScanner works only with kjars. Does this mean I will have to package my rules in a jar?
2. When a rule is changed the jar needs to be re-built with new version? I can't have this jar in local/maven repository so I should have it in classpath?
3. If I use kjar can I still grammatically load rules? I didn't find any example doing so.
4. Is there any other way to scan for changes? Provided your rules could be hosted on some server so you use URL or they are on HDFS?
--
-Priyanka
You received this message because you are subscribed to the Google Groups "Drools Usage" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-usage+unsubscribe@googlegroups.com.
To post to this group, send email to drools...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-usage/e7d96908-10eb-4375-b618-7ec3c7275da1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Abhijit Humbe
On Tue, Apr 11, 2017 at 2:51 PM, Priyanka <priyank...@gmail.com> wrote:Hi,
My rules are on hdfs I did write a program to load rules files (drl files) from hdfs and create kieSession. Now I want a mechanism to dynamically reload the rules when updated.
As I read through documents, "KnowledgeAgent" is replaced by "KieScanner".
My questions are as follows
1. KieScanner works only with kjars. Does this mean I will have to package my rules in a jar?>> Yes, for rules you have to create kjar if you want to use kieScanner API's. KieScanner is maven based so we have to use kjar.2. When a rule is changed the jar needs to be re-built with new version? I can't have this jar in local/maven repository so I should have it in classpath?>>Its not necessary to build kjar with new version, you can keep the version same then you have to use LATEST keyword in kieScanner API. To use kieScanner API's kjar should be available in local/remote maven repository,3. If I use kjar can I still grammatically load rules? I didn't find any example doing so.>> Even if you use kjar you can load it from classpath, add kjar in project classpath and use below code:
KieServices kieService = KieServices.Factory.get();
KieContainer kieContainer = kieService.getKieClasspathContainer();
KieSession ksession= kieContainer.newKieSession("statefulSession");
4. Is there any other way to scan for changes? Provided your rules could be hosted on some server so you use URL or they are on HDFS?Without kjar ? I guess its not possible. If kjar is available in maven repository then we can give its direct URL to get latest version.
-Priyanka
--
You received this message because you are subscribed to the Google Groups "Drools Usage" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-usage...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-usage+unsubscribe@googlegroups.com.
To post to this group, send email to drools...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-usage/13a61faf-d234-4d1b-8b73-f123cd8e6c8f%40googlegroups.com.