Package org.kie.api.runtime.rule
Interface StatefulRuleSession
- All Known Subinterfaces:
KieSession
public interface StatefulRuleSession
This interface adds methods available to the
KieSession beyond what the WorkingMemory provides.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionintFire all Matches on the Agenda.intfireAllRules(int max) Fire Matches on the Agenda up to the given maximum number of Matches, before returning the control to the application.intfireAllRules(AgendaFilter agendaFilter) Fire all Matches on the AgendaintfireAllRules(AgendaFilter agendaFilter, int max) Fire all Matches on the AgendavoidKeeps firing Matches until a halt is called.voidfireUntilHalt(AgendaFilter agendaFilter) Keeps firing Matches until a halt is called.
-
Method Details
-
fireAllRules
int fireAllRules()Fire all Matches on the Agenda.- Returns:
- returns the number of rules fired
-
fireAllRules
int fireAllRules(int max) Fire Matches on the Agenda up to the given maximum number of Matches, before returning the control to the application. In case the application wants to continue firing the rules later, from the point where it stopped, it just needs to callfireAllRules()again.- Parameters:
max- the maximum number of rules that should be fired- Returns:
- returns the number of rules fired
-
fireAllRules
Fire all Matches on the Agenda- Parameters:
agendaFilter- filters the Matches that may fire- Returns:
- returns the number of rules fired
-
fireAllRules
Fire all Matches on the Agenda- Parameters:
agendaFilter- filters the Matches that may firemax- the maximum number of rules that should be fired- Returns:
- returns the number of rules fired
-
fireUntilHalt
void fireUntilHalt()Keeps firing Matches until a halt is called. If in a given moment, there is no Match to fire, it will wait for an Match to be added to an active agenda group or rule flow group. This blocks the thread until halt is called.- Throws:
IllegalStateException- if this method is called when running in sequential mode
-
fireUntilHalt
Keeps firing Matches until a halt is called. If in a given moment, there is no Match to fire, it will wait for an Match to be added to an active agenda group or rule flow group. This blocks the thread until halt is called.- Parameters:
agendaFilter- filters the Matches that may fire- Throws:
IllegalStateException- if this method is called when running in sequential mode
-