Class JiraRuleAbortionService
java.lang.Object
com.codebarrel.jira.plugin.automation.service.JiraRuleAbortionService
- All Implemented Interfaces:
RuleAbortionService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidabortRuleExecutions(TenantContext tenantContext, com.codebarrel.automation.api.config.RuleConfigBean ruleConfigBean, MessageComponentChange messageComponentChange) This can be called when editing a rule.voidmarkRuleExecutionAsLimited(TenantExecution tenantExecution, String s, MessageComponentChange messageComponentChange) This is a 'soft' throttle.voidthrottleAndStopRuleExecution(TenantExecution tenantExecution, com.codebarrel.automation.api.config.RuleConfigBean ruleConfigBean, MessageComponentChange messageComponentChange) This is a 'hard' throttle that will abort the rule execution if possible.
-
Constructor Details
-
JiraRuleAbortionService
-
-
Method Details
-
abortRuleExecutions
public void abortRuleExecutions(TenantContext tenantContext, com.codebarrel.automation.api.config.RuleConfigBean ruleConfigBean, MessageComponentChange messageComponentChange) Description copied from interface:RuleAbortionServiceThis can be called when editing a rule. It will stop all ongoing rule executions for this rule and mark them as 'ABORTED'.- Specified by:
abortRuleExecutionsin interfaceRuleAbortionService- Parameters:
tenantContext- The tenant contextruleConfigBean- the rule to abortmessageComponentChange- 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:RuleAbortionServiceThis is a 'hard' throttle that will abort the rule execution if possible.- Specified by:
throttleAndStopRuleExecutionin interfaceRuleAbortionService- 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:RuleAbortionServiceThis 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:
markRuleExecutionAsLimitedin interfaceRuleAbortionService- Parameters:
tenantExecution- The rule execution to throttle.s- the component that was limitedmessageComponentChange- Message to put in the audit log.
-