Package org.kie.api.runtime.rule
Interface StatefulRuleSession
-
- All Known Subinterfaces:
KieSession
public interface StatefulRuleSession
This interface adds methods available to theKieSession
beyond what the WorkingMemory provides.- See Also:
KieSession
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
fireAllRules()
Fire all Matches on the Agenda.int
fireAllRules(int max)
Fire Matches on the Agenda up to the given maximum number of Matches, before returning the control to the application.int
fireAllRules(AgendaFilter agendaFilter)
Fire all Matches on the Agendaint
fireAllRules(AgendaFilter agendaFilter, int max)
Fire all Matches on the Agendavoid
fireUntilHalt()
Keeps firing Matches until a halt is called.void
fireUntilHalt(AgendaFilter agendaFilter)
Keeps firing Matches until a halt is called.
-
-
-
Method Detail
-
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
int fireAllRules(AgendaFilter agendaFilter)
Fire all Matches on the Agenda- Parameters:
agendaFilter
- filters the Matches that may fire- Returns:
- returns the number of rules fired
-
fireAllRules
int fireAllRules(AgendaFilter agendaFilter, int max)
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:
java.lang.IllegalStateException
- if this method is called when running in sequential mode
-
fireUntilHalt
void fireUntilHalt(AgendaFilter agendaFilter)
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:
java.lang.IllegalStateException
- if this method is called when running in sequential mode
-
-