Interface RuleMaintenanceService
-
- All Known Implementing Classes:
DefaultRuleMaintenanceService
public interface RuleMaintenanceServiceThe interface provides with method that allows archiving of rules.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T extends SourceRuleModel>
RuleCompilerPublisherResultcompileAndPublishRules(java.util.List<T> rules, java.lang.String moduleName, boolean enableIncrementalUpdate)Compiles and publishes rules<T extends SourceRuleModel>
RuleCompilerPublisherResultcompileAndPublishRulesWithBlocking(java.util.List<T> rules, java.lang.String moduleName, boolean enableIncrementalUpdate)Compiles and publishes rules with blocking on initialization<T extends SourceRuleModel>
RuleCompilerPublisherResultcompileAndPublishRulesWithBlocking(java.util.List<T> rules, java.lang.String moduleName, boolean enableIncrementalUpdate, CronJobProgressTracker cronJobProgressTracker)Compiles and publishes rules with blocking on initializationRuleCompilerPublisherResultinitializeAllModules(boolean enableIncrementalUpdate)Publish/re-publish drools rules for a all available modulesRuleCompilerPublisherResultinitializeModule(java.lang.String moduleName, boolean enableIncrementalUpdate)Publish/re-publish drools rules for a specific modulejava.util.Optional<RuleCompilerPublisherResult>synchronizeModules(java.lang.String sourceModuleName, java.lang.String targetModuleName)Synchronize the deployed rules between two modules.<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
-
-
-
Method Detail
-
compileAndPublishRules
<T extends SourceRuleModel> RuleCompilerPublisherResult compileAndPublishRules(java.util.List<T> rules, java.lang.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
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 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
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
RuleCompilerPublisherResultcontaining the status of rules compilation and publication
-
compileAndPublishRulesWithBlocking
<T extends SourceRuleModel> RuleCompilerPublisherResult 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 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(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 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> 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 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
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 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
-
-