public class DefaultCommerceRuleEngineService extends Object implements RuleEngineService
| Constructor and Description |
|---|
DefaultCommerceRuleEngineService() |
@Deprecated public RuleEngineActionResult initialize(AbstractRulesModuleModel abstractModule, boolean propagateToOtherNodes)
initialize method insteadRuleEngineServicepropagateToOtherNodes 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, String deployedReleaseIdVersion, boolean propagateToOtherNodes)
RuleEngineServicepropagateToOtherNodes is set to true propagates a
RuleEngineInitializedEvent to other nodes).initialize in interface RuleEngineServiceabstractModule - the module to be initializeddeployedReleaseIdVersion - currently deployed mvn version of the rule engine modulepropagateToOtherNodes - 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)public RuleEvaluationResult evaluate(RuleEvaluationContext context)
RuleEngineServiceevaluate in interface RuleEngineServicecontext - the rule engine context containing data about rule engine executionprotected void logContextFacts(RuleEvaluationContext context)
@Deprecated protected Collection<DroolsRuleModel> getDroolsRulesForContext(DroolsRuleEngineContextModel ruleEngineContext, List<AbstractRuleEngineRuleModel> activeRulesForModule)
RuleEngineCacheService is used.protected Set<Object> getEventListners(DroolsRuleEngineContextModel ruleEngineContext)
protected RuleEngineResultRAO addRuleEngineResultRAO(RuleEvaluationContext context)
context - the rule engine context@Deprecated protected Collection<Object> addRuleGroupExecutionFacts(Collection<DroolsRuleModel> rules)
evaluate(RuleEvaluationContext). Instead
RuleGroupExecutionRRDs are created using the DefaultCommerceRuleEngineCacheService.rules - the rules for which to add the rule group execution facts@Deprecated protected Collection<Object> addRuleConfigurationFacts(Collection<DroolsRuleModel> rules)
evaluate(RuleEvaluationContext). Instead
RuleConfigurationRRDs are created using the DefaultCommerceRuleEngineCacheService.rules - the rules for which to add the configuration factsprotected Set<Object> provideRAOs(FactContext factContext)
@Deprecated protected Map<String,Object> getGlobals(Collection<DroolsRuleModel> rules)
evaluate(RuleEvaluationContext). Instead
the globals are cached in DefaultPlatformRuleEngineService during
DefaultPlatformRuleEngineService.initialize(AbstractRulesModuleModel, String, boolean) and injected in
the DefaultPlatformRuleEngineService.evaluate(RuleEvaluationContext) call.rules - the ruleskey global name and value spring bean to be set as the global@Deprecated protected void checkIfBeanDefinedPreviously(Map<Object,DroolsRuleModel> duplicateGlobalsCheckMap, DroolsRuleModel rule, Map.Entry<String,String> entry, Object bean, Object oldBean)
getGlobals(Collection), this method is no longer invoked.public 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 © 2017 SAP SE. All Rights Reserved.