Interface RuleMaintenanceService

  • All Known Implementing Classes:
    DefaultRuleMaintenanceService

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

      • compileAndPublishRules

        <T extends SourceRuleModelRuleCompilerPublisherResult compileAndPublishRules​(java.util.List<T> rules,
                                                                                       java.lang.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​(java.lang.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 SourceRuleModelRuleCompilerPublisherResult compileAndPublishRulesWithBlocking​(java.util.List<T> rules,
                                                                                                   java.lang.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 SourceRuleModelRuleCompilerPublisherResult compileAndPublishRulesWithBlocking​(java.util.List<T> rules,
                                                                                                   java.lang.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> java.util.Optional<RuleCompilerPublisherResult> undeployRules​(java.util.List<T> rules,
                                                                                                  java.lang.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

        java.util.Optional<RuleCompilerPublisherResult> synchronizeModules​(java.lang.String sourceModuleName,
                                                                           java.lang.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