Interface RuleAbortionService

All Known Implementing Classes:
JiraRuleAbortionService

public interface RuleAbortionService
Service that handles logic of marking a rule as throttled and potentially stopping rule execution.
  • Method Details

    • abortRuleExecutions

      void abortRuleExecutions(TenantContext context, com.codebarrel.automation.api.config.RuleConfigBean rule, MessageComponentChange message)
      This can be called when editing a rule. It will stop all ongoing rule executions for this rule and mark them as 'ABORTED'.
      Parameters:
      context - The tenant context
      rule - the rule to abort
      message - Message to put into the audit log.
    • throttleAndStopRuleExecution

      void throttleAndStopRuleExecution(TenantExecution execution, com.codebarrel.automation.api.config.RuleConfigBean rule, MessageComponentChange message)
      This is a 'hard' throttle that will abort the rule execution if possible.
      Parameters:
      execution - The rule execution to abort.
      message - Message to put into the audit log.
    • markRuleExecutionAsLimited

      void markRuleExecutionAsLimited(TenantExecution execution, String componentId, MessageComponentChange message)
      This is a 'soft' throttle. This may happen when the JQL search a scheduled trigger runs is limited for example. In that case we allow the rule to run, but add a throttled message to the audit log to indicate this execution was throttled.
      Parameters:
      execution - The rule execution to throttle.
      componentId - the component that was limited
      message - Message to put in the audit log.