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:
    `KieSession`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `fireAllRules()` Fire all Matches on the Agenda.
    `int` | `fireAllRules(AgendaFilter agendaFilter)` Fire all Matches on the Agenda
    `int` | `fireAllRules(AgendaFilter agendaFilter, int max)` 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.
    `void` | `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 call `fireAllRules()` 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 fire
        `max` - 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

          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:
        `IllegalStateException` - if this method is called when running in sequential mode

Copyright © 2001–2019 JBoss by Red Hat. All rights reserved.