Interface RuleMaintenanceService
- All Known Implementing Classes:
DefaultRuleMaintenanceService
public interface RuleMaintenanceService
The interface provides with method that allows archiving of rules.
-
Method Summary
Modifier and TypeMethodDescription<T extends SourceRuleModel>
RuleCompilerPublisherResultcompileAndPublishRules(List<T> rules, String moduleName, boolean enableIncrementalUpdate) Compiles and publishes rules<T extends SourceRuleModel>
RuleCompilerPublisherResultcompileAndPublishRulesWithBlocking(List<T> rules, String moduleName, boolean enableIncrementalUpdate) Compiles and publishes rules with blocking on initialization<T extends SourceRuleModel>
RuleCompilerPublisherResultcompileAndPublishRulesWithBlocking(List<T> rules, String moduleName, boolean enableIncrementalUpdate, CronJobProgressTracker cronJobProgressTracker) Compiles and publishes rules with blocking on initializationinitializeAllModules(boolean enableIncrementalUpdate) Publish/re-publish drools rules for a all available modulesinitializeModule(String moduleName, boolean enableIncrementalUpdate) Publish/re-publish drools rules for a specific modulesynchronizeModules(String sourceModuleName, String targetModuleName) Synchronize the deployed rules between two modules.<T extends SourceRuleModel>
Optional<RuleCompilerPublisherResult>undeployRules(List<T> rules, String moduleName) "Undeploy" (deactivate) the rules in the rule engine
-
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 publishmoduleName- Rules module nameenableIncrementalUpdate- flag, if true, enables for incremental updates of the rule engine kie module- Returns:
- instance of
RuleCompilerPublisherResultcontaining the status of rules compilation and publication
-
initializeModule
Publish/re-publish drools rules for a specific module- Parameters:
moduleName- Rules module name to publish the rules forenableIncrementalUpdate- flag, if true, enables for incremental updates of the rule engine kie module- Returns:
- instance of
RuleCompilerPublisherResultcontaining the status of rules compilation and publication
-
initializeAllModules
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
RuleCompilerPublisherResultcontaining 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 publishmoduleName- Rules module nameenableIncrementalUpdate- flag, if true, enables for incremental updates of the rule engine kie module- Returns:
- instance of
RuleCompilerPublisherResultcontaining 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 publishmoduleName- Rules module nameenableIncrementalUpdate- flag, if true, enables for incremental updates of the rule engine kie modulecronJobProgressTracker- instance ofCronJobProgressTrackerused by cron job framework to track the job execution- Returns:
- instance of
RuleCompilerPublisherResultcontaining 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 theSourceRuleModel- Parameters:
rules- instances ofSourceRuleModelto undeploy from module if they were deployedmoduleName- the name of the rules module to undeploy the rules from- Returns:
- Optional of
RuleCompilerPublisherResultcontaining 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 synchronisationtargetModuleName- The name of the module to be used as a target for synchronisation- Returns:
- Optional of
RuleCompilerPublisherResultcontaining the status of rules compilation and publication for target module
-