当 .drl 文件中的规则被分组到“规则流组”中时,需要在外部激活它以触发这些规则。但是如何在知识会话中激活它呢?
我尝试使用以下内容:
ksession.getAgenda().getAgendaGroup("ruleflow-group name").setFocus();
// start the process - ruleflow is .rf file
ksession.startProcess("com.sample.ruleflow");
运行此代码时,使用第一行没有任何影响。我可以知道我需要在哪里更改代码吗?