public class DefaultCommerceRuleEngineService extends Object implements RuleEngineService
| Constructor and Description |
|---|
DefaultCommerceRuleEngineService() |
public RuleEngineActionResult initialize(AbstractRulesModuleModel abstractModule, boolean propagateToOtherNodes)
RuleEngineServicepropagateToOtherNodes is set to true propagates a
RuleEngineInitializedEvent to other nodes).initialize in interface RuleEngineServiceabstractModule - the module to be initializedpropagateToOtherNodes - if true propagates a RuleEngineInitializedEvent to other nodes.RuleEngineActionResult.isActionFailed() to check if the
action succeeded)public RuleEngineActionResult initialize(AbstractRulesModuleModel abstractModule)
RuleEngineServiceRuleEngineInitializedEvent to other nodes.initialize in interface RuleEngineServiceabstractModule - the module to be initializedRuleEngineActionResult.isActionFailed() to check if the
action succeeded)protected MessageLevel convertLevel(Level level)
Level code to a MessageLevelpublic RuleEvaluationResult evaluate(RuleEvaluationContext context)
RuleEngineServiceevaluate in interface RuleEngineServicecontext - the rule engine context containing data about rule engine executionprotected RuleEngineResultRAO addRuleEngineResultRAO(RuleEvaluationContext context)
context - the rule engine contextprotected Collection<Object> addRuleGroupExecutionFacts(Collection<DroolsRuleModel> rules)
evaluate(RuleEvaluationContext) method) using the configured getRuleGroupExecutionProvider().rules - the rules for which to add the rule group execution factsprotected Collection<Object> addRuleConfigurationFacts(Collection<DroolsRuleModel> rules)
evaluate(RuleEvaluationContext)
method) by using the configured getRuleConfigurationProvider().rules - the rules for which to add the configuration factsprotected Set<Object> provideRAOs(FactContext factContext)
protected Map<String,Object> getGlobals(Collection<DroolsRuleModel> rules)
rules.rules - the ruleskey global name and value spring bean to be set as the globalpublic List<RuleEngineActionResult> initializeAllRulesModules()
RuleEngineServiceAbstractRulesModuleModels that are marked as active (in case of cluster mode - on all the
nodes).initializeAllRulesModules in interface RuleEngineServiceRuleEngineActionResult.isActionFailed() to check if the
action succeeded)public List<RuleEngineActionResult> initializeAllRulesModules(boolean propagateToOtherNodes)
RuleEngineServiceAbstractRulesModuleModels that are marked as active.initializeAllRulesModules in interface RuleEngineServicepropagateToOtherNodes - if true on all the nodes of clusterpublic RuleEngineActionResult updateEngineRule(AbstractRuleEngineRuleModel ruleEngineRule)
RuleEngineServiceupdateEngineRule in interface RuleEngineServiceruleEngineRule - Rule to be updatedRuleEngineActionResult.isActionFailed() to check if the
action succeeded)public RuleEngineActionResult updateEngineRule(AbstractRuleEngineRuleModel ruleEngineRule, AbstractRulesModuleModel rulesModule)
RuleEngineServiceupdateEngineRule in interface RuleEngineServiceruleEngineRule - Rule to be updatedrulesModule - AbstractRulesModuleModel where the Rule be updatedRuleEngineActionResult.isActionFailed() to check if the
action succeeded)public RuleEngineActionResult archiveRule(AbstractRuleEngineRuleModel ruleEngineRule)
RuleEngineServicearchiveRule in interface RuleEngineServiceruleEngineRule - Rule to be archivedRuleEngineActionResult.isActionFailed() to check if the
action succeeded)public RuleEngineActionResult archiveRule(AbstractRuleEngineRuleModel ruleEngineRule, AbstractRulesModuleModel rulesModule)
RuleEngineServicearchiveRule in interface RuleEngineServiceruleEngineRule - Rule to be archivedrulesModule - AbstractRulesModuleModel where the Rule is archivedRuleEngineActionResult.isActionFailed() to check if the
action succeeded)public AbstractRuleEngineRuleModel getRuleForCode(String code)
RuleEngineServicegetRuleForCode in interface RuleEngineServicecode - the rule codepublic AbstractRuleEngineRuleModel getRuleForUuid(String uuid)
RuleEngineServicegetRuleForUuid in interface RuleEngineServiceuuid - the rule uuidpublic AbstractRulesModuleModel getRuleModuleForRule(AbstractRuleEngineRuleModel rule)
RuleEngineServicegetRuleModuleForRule in interface RuleEngineServicerule - the AbstractRuleEngineRuleModelprotected AgendaFilterFactory getAgendaFilterFactory()
public void setAgendaFilterFactory(AgendaFilterFactory agendaFilterFactory)
protected AgendaEventListenerFactory getAgendaEventListenerFactory()
public void setAgendaEventListenerFactory(AgendaEventListenerFactory agendaEventListenerFactory)
protected ProcessEventListenerFactory getProcessEventListenerFactory()
public void setProcessEventListenerFactory(ProcessEventListenerFactory processEventListenerFactory)
protected RuleRuntimeEventListenerFactory getRuleRuntimeEventListenerFactory()
public void setRuleRuntimeEventListenerFactory(RuleRuntimeEventListenerFactory ruleRuntimeEventListenerFactory)
protected RAOProvider getRuleConfigurationProvider()
public void setRuleConfigurationProvider(RAOProvider ruleConfigurationProvider)
protected RAOProvider getRuleGroupExecutionProvider()
public void setRuleGroupExecutionProvider(RAOProvider ruleGroupExecutionProvider)
protected RuleEngineService getPlatformRuleEngineService()
protected EngineRuleDao getEngineRuleDao()
public void setEngineRuleDao(EngineRuleDao engineRuleDao)
public void setPlatformRuleEngineService(RuleEngineService ruleEngineService)
protected ConfigurationService getConfigurationService()
public void setConfigurationService(ConfigurationService configurationService)
protected FactContextFactory getFactContextFactory()
public void setFactContextFactory(FactContextFactory factContextFactory)
Copyright © 2000-2016 SAP SE. All Rights Reserved.