Interface SingleRuleExecutorService

All Known Implementing Classes:
SingleRuleExecutorServiceImpl

public interface SingleRuleExecutorService
Component responsible for executing a single rule
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    execute(TenantContext context, AutomationEvent event, com.codebarrel.automation.api.config.RuleConfigBean rule, String executionUuid)
    Performs the rule execution.
    boolean
    validateExecution(TenantContext context, AutomationEvent event, com.codebarrel.automation.api.config.RuleConfigBean rule, String executionUuid)
    Performs all the necessary validations before executing a rule.
  • Method Details

    • validateExecution

      boolean validateExecution(TenantContext context, AutomationEvent event, com.codebarrel.automation.api.config.RuleConfigBean rule, String executionUuid)
      Performs 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.
      Parameters:
      context - The tenant context under which this rule is executing
      event - The event to execute
      rule - The rule to handle the event
      executionUuid - The execution id to identify this unique rule execution
      Returns:
      true if this is a valid execution and callers can call execute(TenantContext, AutomationEvent, RuleConfigBean, String)
    • execute

      void execute(TenantContext context, AutomationEvent event, com.codebarrel.automation.api.config.RuleConfigBean rule, String executionUuid)
      Performs the rule execution.
      Parameters:
      context - The tenant context under which this rule is executing
      event - The event to execute
      rule - The rule to handle the event
      executionUuid - The execution id to identify this unique rule execution