public interface RuleEngineService
| Modifier and Type | Method and Description |
|---|---|
RuleEngineActionResult |
archiveRule(AbstractRuleEngineRuleModel ruleEngineRule)
Deprecated.
since 1811
|
RuleEngineActionResult |
archiveRule(AbstractRuleEngineRuleModel ruleEngineRule,
AbstractRulesModuleModel rulesModule)
Deprecated.
since 1811
|
<T extends DroolsRuleModel> |
archiveRules(java.util.Collection<T> engineRules)
Archive a collection of rules
|
<T extends AbstractRuleEngineRuleModel> |
deactivateRulesModuleEngineRules(java.lang.String moduleName,
java.util.Collection<T> engineRules)
make the specified collection of engine rules belonging to a specified module inactive, so that the engine wouln't take them
in consideration during init
|
RuleEvaluationResult |
evaluate(RuleEvaluationContext context)
Since 6.0
Executes rule evaluation for given RuleEvaluationContext.
|
AbstractRuleEngineRuleModel |
getRuleForCodeAndModule(java.lang.String code,
java.lang.String moduleName)
Finds AbstractRuleEngineRuleModel for given code and module.
|
AbstractRuleEngineRuleModel |
getRuleForUuid(java.lang.String uuid)
Finds AbstractRuleEngineRuleModel for given uuid.
|
void |
initialize(AbstractRulesModuleModel module,
java.lang.String deployedMvnVersion,
boolean propagateToOtherNodes,
boolean enableIncrementalUpdate,
RuleEngineActionResult result)
Since 6.4
Initializes the given rules module (and if
propagateToOtherNodes is set to true propagates a
RuleEngineInitializedEvent to other nodes). |
void |
initialize(AbstractRulesModuleModel module,
java.lang.String deployedMvnVersion,
boolean propagateToOtherNodes,
boolean enableIncrementalUpdate,
RuleEngineActionResult result,
ExecutionContext executionContext)
Since 18.08
Initializes the given rules module (and if
propagateToOtherNodes is set to true propagates a
RuleEngineInitializedEvent to other nodes). |
InitializationFuture |
initialize(java.util.List<AbstractRulesModuleModel> modules,
boolean propagateToOtherNodes,
boolean enableIncrementalUpdate)
Since 6.4
Initializes the given rules module in blocking/async mode (depending on blocking param) (and if
propagateToOtherNodes is set to true propagates a
RuleEngineInitializedEvent to other nodes). |
InitializationFuture |
initialize(java.util.List<AbstractRulesModuleModel> modules,
boolean propagateToOtherNodes,
boolean enableIncrementalUpdate,
ExecutionContext executionContext)
Since 6.7
Initializes the given rules module in blocking/async mode (depending on blocking param) (and if
propagateToOtherNodes is set to true propagates a
RuleEngineInitializedEvent to other nodes). |
java.util.List<RuleEngineActionResult> |
initializeAllRulesModules()
Initializes all
AbstractRulesModuleModels that are marked as active (in case of cluster mode - on all the
nodes). |
java.util.List<RuleEngineActionResult> |
initializeAllRulesModules(boolean propagateToOtherNodes)
Initializes all
AbstractRulesModuleModels that are marked as active. |
<M extends AbstractRulesModuleModel> |
initializeNonBlocking(M module,
java.lang.String deployedMvnVersion,
boolean propagateToOtherNodes,
boolean enableIncrementalUpdate,
RuleEngineActionResult result)
Since 6.4
Asynchronously initializes the given rules module (and if
propagateToOtherNodes is set to true propagates a
RuleEngineInitializedEvent to other nodes). |
RuleEngineActionResult |
updateEngineRule(AbstractRuleEngineRuleModel ruleEngineRule,
AbstractRulesModuleModel rulesModule)
Updates the given rule if it already exists.
|
RuleEvaluationResult evaluate(RuleEvaluationContext context)
context - the rule engine context containing data about rule engine execution<M extends AbstractRulesModuleModel> void initializeNonBlocking(M module, java.lang.String deployedMvnVersion, boolean propagateToOtherNodes, boolean enableIncrementalUpdate, RuleEngineActionResult result)
propagateToOtherNodes is set to true propagates a
RuleEngineInitializedEvent to other nodes).module - the module to be initializeddeployedMvnVersion - currently deployed version of the Kie ModulepropagateToOtherNodes - if true propagates a RuleEngineInitializedEvent to other nodes.enableIncrementalUpdate - flag, if true, enables for incremental updates of the rule engine kie moduleresult - the instance of RuleEngineActionResult accumulating the results of initializationInitializationFuture initialize(java.util.List<AbstractRulesModuleModel> modules, boolean propagateToOtherNodes, boolean enableIncrementalUpdate)
propagateToOtherNodes is set to true propagates a
RuleEngineInitializedEvent to other nodes).modules - the modules to be initializedpropagateToOtherNodes - if true propagates a RuleEngineInitializedEvent to other nodes.enableIncrementalUpdate - flag, if true, enables for incremental updates of the rule engine kie moduleInitializationFuture to be used for eventual blocking on multiple parallel swappingInitializationFuture initialize(java.util.List<AbstractRulesModuleModel> modules, boolean propagateToOtherNodes, boolean enableIncrementalUpdate, ExecutionContext executionContext)
propagateToOtherNodes is set to true propagates a
RuleEngineInitializedEvent to other nodes).modules - the modules to be initializedpropagateToOtherNodes - if true propagates a RuleEngineInitializedEvent to other nodes.enableIncrementalUpdate - flag, if true, enables for incremental updates of the rule engine kie moduleexecutionContext - instance of ExecutionContext that serves as a storage for initialization related dataInitializationFuture to be used for eventual blocking on multiple parallel swappingvoid initialize(AbstractRulesModuleModel module, java.lang.String deployedMvnVersion, boolean propagateToOtherNodes, boolean enableIncrementalUpdate, RuleEngineActionResult result)
propagateToOtherNodes is set to true propagates a
RuleEngineInitializedEvent to other nodes).module - the module to be initializeddeployedMvnVersion - currently deployed mvn version of the rule engine modulepropagateToOtherNodes - if true propagates a RuleEngineInitializedEvent to other nodes.enableIncrementalUpdate - flag, if true, enables for incremental updates of the rule engine kie moduleresult - the instance of RuleEngineActionResult accumulating the results of initializationvoid initialize(AbstractRulesModuleModel module, java.lang.String deployedMvnVersion, boolean propagateToOtherNodes, boolean enableIncrementalUpdate, RuleEngineActionResult result, ExecutionContext executionContext)
propagateToOtherNodes is set to true propagates a
RuleEngineInitializedEvent to other nodes).module - the module to be initializeddeployedMvnVersion - currently deployed mvn version of the rule engine modulepropagateToOtherNodes - if true propagates a RuleEngineInitializedEvent to other nodes.enableIncrementalUpdate - flag, if true, enables for incremental updates of the rule engine kie moduleresult - the instance of RuleEngineActionResult accumulating the results of initializationexecutionContext - the instance of ExecutionContext to be set as executionContext of RuleEngineActionResult if not nulljava.util.List<RuleEngineActionResult> initializeAllRulesModules()
AbstractRulesModuleModels that are marked as active (in case of cluster mode - on all the
nodes).RuleEngineActionResult.isActionFailed() to check if the
action succeeded)java.util.List<RuleEngineActionResult> initializeAllRulesModules(boolean propagateToOtherNodes)
AbstractRulesModuleModels that are marked as active.propagateToOtherNodes - if true on all the nodes of clusterRuleEngineActionResult updateEngineRule(AbstractRuleEngineRuleModel ruleEngineRule, AbstractRulesModuleModel rulesModule)
ruleEngineRule - Rule to be updatedrulesModule - AbstractRulesModuleModel where the Rule be updatedRuleEngineActionResult.isActionFailed() to check if the
action succeeded)@Deprecated RuleEngineActionResult archiveRule(AbstractRuleEngineRuleModel ruleEngineRule)
ruleEngineRule - Rule to be archivedRuleEngineActionResult.isActionFailed() to check if the
action succeeded)@Deprecated RuleEngineActionResult archiveRule(AbstractRuleEngineRuleModel ruleEngineRule, AbstractRulesModuleModel rulesModule)
ruleEngineRule - Rule to be archivedrulesModule - AbstractRulesModuleModel where the Rule is archivedRuleEngineActionResult.isActionFailed() to check if the
action succeeded)<T extends DroolsRuleModel> java.util.Optional<InitializationFuture> archiveRules(java.util.Collection<T> engineRules)
T - subtype of DroolsRuleModelengineRules - collection of DroolsRuleModel instancesInitializationFuture keeping the status of initializationAbstractRuleEngineRuleModel getRuleForCodeAndModule(java.lang.String code, java.lang.String moduleName)
code - the rule codemoduleName - the rules module nameAbstractRuleEngineRuleModel getRuleForUuid(java.lang.String uuid)
uuid - the rule uuid<T extends AbstractRuleEngineRuleModel> void deactivateRulesModuleEngineRules(java.lang.String moduleName, java.util.Collection<T> engineRules)
T - a type of engine rulesmoduleName - Name of the module the rules should refer to when applying changesengineRules - A collection of AbstractRuleEngineRuleModel to be deactivatedCopyright © 2018 SAP SE. All Rights Reserved.