Drools-使用RuleNameEndsWithAgendaFilter时的ClassCastException
下面是我正在使用的代码片段:Drools-使用RuleNameEndsWithAgendaFilter时的ClassCastException,drools,Drools,下面是我正在使用的代码片段: AgendaFilter filter = (AgendaFilter) new RuleNameEndsWithAgendaFilter("Test"); // Gives a compile time error if I don't cast it. // Run the rules int numOfRulesFired = stateFulKnowledgeSession.fireAllRules(filter); 这会引发运行时异常: java.lan
AgendaFilter filter = (AgendaFilter) new RuleNameEndsWithAgendaFilter("Test");
// Gives a compile time error if I don't cast it.
// Run the rules
int numOfRulesFired = stateFulKnowledgeSession.fireAllRules(filter);
这会引发运行时异常:
java.lang.ClassCastException: org.drools.base.RuleNameEndsWithAgendaFilter cannot be cast to org.drools.runtime.rule.AgendaFilter
如果我遗漏了什么,请告诉我
谢谢,
Ashwin看起来您的
AgendaFilter
错误。我检查了最新的Drools代码,并且org.Drools.runtime.rule.AgendaFilter
不再存在,或者被重命名为更好的名称
使用org.drools.spi.AgendaFilter