Reputation: 588
I read the rule file and add them into my knowledgeBase then I want to fire a particular rule in that knowledgeBase. Is this task possible in current drools version?
Upvotes: 0
Views: 1520
Reputation: 31300
If you have a rule base where rules should be made active dynamically according to some criterion you have several choices.
kieSession.getAgenda().getAgendaGroup( "group_3" ).setFocus();
rule rule_3 when Select( rule == "rule_3" ) Person( ... ) then ... end
The Select fact can be inserted along with the data fact but must be retracted after firing the rule.
Upvotes: 1