Interface RuleMaintenanceService

All Known Implementing Classes:
DefaultRuleMaintenanceService

public interface RuleMaintenanceService
The interface provides with method that allows archiving of rules.
  • Method Details

    • compileAndPublishRules

      <T extends SourceRuleModel> RuleCompilerPublisherResult compileAndPublishRules(List<T> rules, String moduleName, boolean enableIncrementalUpdate)
      Compiles and publishes rules
      Parameters:
      rules - - list of rules to compile and publish
      moduleName - Rules module name
      enableIncrementalUpdate - flag, if true, enables for incremental updates of the rule engine kie module
      Returns:
      instance of RuleCompilerPublisherResult containing the status of rules compilation and publication
    • initializeModule

      RuleCompilerPublisherResult initializeModule(String moduleName, boolean enableIncrementalUpdate)
      Publish/re-publish drools rules for a specific module
      Parameters:
      moduleName - Rules module name to publish the rules for
      enableIncrementalUpdate - flag, if true, enables for incremental updates of the rule engine kie module
      Returns:
      instance of RuleCompilerPublisherResult containing the status of rules compilation and publication
    • initializeAllModules

      RuleCompilerPublisherResult initializeAllModules(boolean enableIncrementalUpdate)
      Publish/re-publish drools rules for a all available modules
      Parameters:
      enableIncrementalUpdate - flag, if true, enables for incremental updates of the rule engine kie module
      Returns:
      instance of RuleCompilerPublisherResult containing the status of rules compilation and publication
    • compileAndPublishRulesWithBlocking

      <T extends SourceRuleModel> RuleCompilerPublisherResult compileAndPublishRulesWithBlocking(List<T> rules, String moduleName, boolean enableIncrementalUpdate)
      Compiles and publishes rules with blocking on initialization
      Parameters:
      rules - - list of rules to compile and publish
      moduleName - Rules module name
      enableIncrementalUpdate - flag, if true, enables for incremental updates of the rule engine kie module
      Returns:
      instance of RuleCompilerPublisherResult containing the status of rules compilation and publication
    • compileAndPublishRulesWithBlocking

      <T extends SourceRuleModel> RuleCompilerPublisherResult compileAndPublishRulesWithBlocking(List<T> rules, String moduleName, boolean enableIncrementalUpdate, CronJobProgressTracker cronJobProgressTracker)
      Compiles and publishes rules with blocking on initialization
      Parameters:
      rules - - list of rules to compile and publish
      moduleName - Rules module name
      enableIncrementalUpdate - flag, if true, enables for incremental updates of the rule engine kie module
      cronJobProgressTracker - instance of CronJobProgressTracker used by cron job framework to track the job execution
      Returns:
      instance of RuleCompilerPublisherResult containing the status of rules compilation and publication
    • undeployRules

      <T extends SourceRuleModel> Optional<RuleCompilerPublisherResult> undeployRules(List<T> rules, String moduleName)
      "Undeploy" (deactivate) the rules in the rule engine
      Type Parameters:
      T - type of the SourceRuleModel
      Parameters:
      rules - instances of SourceRuleModel to undeploy from module if they were deployed
      moduleName - the name of the rules module to undeploy the rules from
      Returns:
      Optional of RuleCompilerPublisherResult containing the status of rules compilation and publication
    • synchronizeModules

      Optional<RuleCompilerPublisherResult> synchronizeModules(String sourceModuleName, String targetModuleName)
      Synchronize the deployed rules between two modules. The result after synchronisation should be a complete alignment of source rules (including their versions) deployed for target module with those deployed for source module
      Parameters:
      sourceModuleName - The name of the module to be used as a source for synchronisation
      targetModuleName - The name of the module to be used as a target for synchronisation
      Returns:
      Optional of RuleCompilerPublisherResult containing the status of rules compilation and publication for target module