Interface RuleScheduleService

All Known Implementing Classes:
RuleScheduleServiceImpl

public interface RuleScheduleService
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Long
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Finds and runs all overdue schedules.
    void
    removeSchedule(TenantContext context, Long ruleId)
    Disables all schedules for a given rule.
    void
    updateSchedule(TenantContext context, com.codebarrel.automation.api.config.RuleConfigBean ruleConfig, com.codebarrel.automation.api.config.RuleConfigBean oldRuleConfig)
    Update the stored rule execution schedule for the provided rule.
  • Field Details

    • MAX_SCHEDULE_ERRORS

      static final Long MAX_SCHEDULE_ERRORS
  • Method Details

    • executeAllOverdueSchedules

      void executeAllOverdueSchedules(Environment env)
      Finds and runs all overdue schedules. This method should execute fast and simply queue schedules to be executed (and not actually execute them)
      Parameters:
      env - The environment from which to retrieve schedules
    • updateSchedule

      void updateSchedule(TenantContext context, com.codebarrel.automation.api.config.RuleConfigBean ruleConfig, @Nullable com.codebarrel.automation.api.config.RuleConfigBean oldRuleConfig)
      Update the stored rule execution schedule for the provided rule. This needs to set or remove the nextExecution time from the underlying store.
      Parameters:
      context - The database tenant context
      ruleConfig - The updated rule configuration
      oldRuleConfig - The previous rule configuration before the update
    • removeSchedule

      void removeSchedule(TenantContext context, Long ruleId)
      Disables all schedules for a given rule.
      Parameters:
      context - The database tenant context
      ruleId - the rule to remove schedules for