Class SingleRuleExecutorServiceImpl
java.lang.Object
com.codebarrel.automation.api.service.SingleRuleExecutorServiceImpl
- All Implemented Interfaces:
SingleRuleExecutorService
@Component
public class SingleRuleExecutorServiceImpl
extends Object
implements SingleRuleExecutorService
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSingleRuleExecutorServiceImpl(RuleStatisticsService ruleStatisticsService, RuleComponentProvider componentProvider, ComponentInputsFactory componentInputsFactory, TenantService tenantService, AutomationLicenseService licenseService, AutomationQueue automationQueue, AuditService auditService, AutomationNotificationService notificationService, HourlyTenantExecutionCountLimit hourlyTenantExecutionCountLimit, HourlyRuleExecutionDurationLimit hourlyRuleExecutionDurationLimit, DailyRuleExecutionDurationLimit dailyRuleExecutionDurationLimit, ServiceLimitBreachedRuleTriggerService serviceLimitBreachedRuleTriggerService, QueuedItemServiceLimitCheck queuedItemServiceLimitCheck, TotalQueuedItemServiceLimitCheck totalQueuedItemServiceLimitCheck, BranchSubmissionService branchSubmissionService, AuditEventService auditEventService, RuleScopeService ruleScopeService, RuleAbortionService ruleAbortionService, ExecutionFinishSynchronizer executionSynchronizer, ApplicationRoleService applicationRoleService, FeatureManager featureManager, FeatureFlagCache featureFlagCache, I18nFactory i18nFactory, UserService userService, RuleComponentsValidator ruleComponentsValidator, LicenceCheckerService licenceCheckerService, AutomationErrorNotificationService errorNotificationService) -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute(TenantContext context, AutomationEvent event, com.codebarrel.automation.api.config.RuleConfigBean rule, String executionUuid) Performs the rule execution.booleanvalidateExecution(TenantContext context, AutomationEvent event, com.codebarrel.automation.api.config.RuleConfigBean rule, String executionUuid) Performs all the necessary validations before executing a rule.
-
Field Details
-
GLOBALERROR_PREFIX
- See Also:
-
-
Constructor Details
-
SingleRuleExecutorServiceImpl
@Inject public SingleRuleExecutorServiceImpl(RuleStatisticsService ruleStatisticsService, RuleComponentProvider componentProvider, ComponentInputsFactory componentInputsFactory, TenantService tenantService, AutomationLicenseService licenseService, AutomationQueue automationQueue, AuditService auditService, AutomationNotificationService notificationService, HourlyTenantExecutionCountLimit hourlyTenantExecutionCountLimit, HourlyRuleExecutionDurationLimit hourlyRuleExecutionDurationLimit, DailyRuleExecutionDurationLimit dailyRuleExecutionDurationLimit, ServiceLimitBreachedRuleTriggerService serviceLimitBreachedRuleTriggerService, QueuedItemServiceLimitCheck queuedItemServiceLimitCheck, TotalQueuedItemServiceLimitCheck totalQueuedItemServiceLimitCheck, BranchSubmissionService branchSubmissionService, AuditEventService auditEventService, RuleScopeService ruleScopeService, RuleAbortionService ruleAbortionService, ExecutionFinishSynchronizer executionSynchronizer, ApplicationRoleService applicationRoleService, FeatureManager featureManager, FeatureFlagCache featureFlagCache, I18nFactory i18nFactory, UserService userService, RuleComponentsValidator ruleComponentsValidator, LicenceCheckerService licenceCheckerService, AutomationErrorNotificationService errorNotificationService)
-
-
Method Details
-
validateExecution
public boolean validateExecution(TenantContext context, AutomationEvent event, com.codebarrel.automation.api.config.RuleConfigBean rule, String executionUuid) Description copied from interface:SingleRuleExecutorServicePerforms all the necessary validations before executing a rule. This includes things like loop checks, license checks, and if the trigger can handle the provided event.- Specified by:
validateExecutionin interfaceSingleRuleExecutorService- Parameters:
context- The tenant context under which this rule is executingevent- The event to executerule- The rule to handle the eventexecutionUuid- The execution id to identify this unique rule execution- Returns:
- true if this is a valid execution and callers can call
SingleRuleExecutorService.execute(TenantContext, AutomationEvent, RuleConfigBean, String)
-
execute
public void execute(TenantContext context, AutomationEvent event, com.codebarrel.automation.api.config.RuleConfigBean rule, String executionUuid) Description copied from interface:SingleRuleExecutorServicePerforms the rule execution.- Specified by:
executein interfaceSingleRuleExecutorService- Parameters:
context- The tenant context under which this rule is executingevent- The event to executerule- The rule to handle the eventexecutionUuid- The execution id to identify this unique rule execution
-