1

When the rules in the .drl file is grouped into "ruleflow-group", it needs to be activated externally to fire those rules. But how to activate it in knowledge session?

I tried using the following:

ksession.getAgenda().getAgendaGroup("ruleflow-group name").setFocus();

// start the process - ruleflow is .rf file              
ksession.startProcess("com.sample.ruleflow");

On running this code, there is no effect in using the first line. May I know where I need to change the code?

  • The line you are referring to is something I'd expect in Java code, executed before or between calls to fireAllRules, and it should work. a) What do you mean by "activate in knowledge session"? b) How do you determine that there is "no effect"? You should provide some sample code, Java and DRL. – laune Jul 16 '15 at 13:09
  • Thankyou laune. I got the output. I added fireAllRules after startProcess(" "). It worked. – Divya Ratna Jul 17 '15 at 06:33

0 Answers0