Class JiraRuleAbortionService

java.lang.Object
com.codebarrel.jira.plugin.automation.service.JiraRuleAbortionService
All Implemented Interfaces:
RuleAbortionService

@Named public class JiraRuleAbortionService extends Object implements RuleAbortionService
  • Constructor Details

    • JiraRuleAbortionService

      @Inject public JiraRuleAbortionService(AutomationQueueStore automationQueueStore)
  • Method Details

    • abortRuleExecutions

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

      public void throttleAndStopRuleExecution(TenantExecution tenantExecution, com.codebarrel.automation.api.config.RuleConfigBean ruleConfigBean, MessageComponentChange messageComponentChange)
      Description copied from interface: RuleAbortionService
      This is a 'hard' throttle that will abort the rule execution if possible.
      Specified by:
      throttleAndStopRuleExecution in interface RuleAbortionService
      Parameters:
      tenantExecution - The rule execution to abort.
      messageComponentChange - Message to put into the audit log.
    • markRuleExecutionAsLimited

      public void markRuleExecutionAsLimited(TenantExecution tenantExecution, String s, MessageComponentChange messageComponentChange)
      Description copied from interface: RuleAbortionService
      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.
      Specified by:
      markRuleExecutionAsLimited in interface RuleAbortionService
      Parameters:
      tenantExecution - The rule execution to throttle.
      s - the component that was limited
      messageComponentChange - Message to put in the audit log.