Interface RuleEngineJobService

All Known Implementing Classes:
DefaultRuleEngineJobService

public interface RuleEngineJobService
The interface to provide routine operations and checks to support the rule engine related jobs
  • Method Details

    • getRuleEngineJob

      RuleEngineJobModel getRuleEngineJob(String jobCode, String springBeanName)
      Retrieves (or creates one if absent) the RuleEngineJob, identified by given spring Bean name
      Parameters:
      jobCode - job code
      springBeanName - spring bean name
      Returns:
      an instance of RuleEngineJobModel
    • isRunning

      boolean isRunning(String ruleEngineJobCode)
      Checks whether the RuleEngineJob has any active cron jobs
      Parameters:
      ruleEngineJobCode - code of the Job to check against
      Returns:
      boolean indicating whether this job has any active cron jobs
    • countRunningJobs

      int countRunningJobs(String ruleEngineJobCode)
      Checks how many currently active cron jobs a RuleEngineJob has
      Parameters:
      ruleEngineJobCode - code of the Job to check against
      Returns:
      number of active cron jobs currently running
    • triggerCronJob

      RuleEngineCronJobModel triggerCronJob(String ruleEngineJobCode, String jobPerformableBeanName, Supplier<RuleEngineCronJobModel> cronJobSupplier)
      Given the rule engine Job, create a new instance of RuleEngineCronJobModel and run it if no other associated cron job is currently in execution
      Parameters:
      ruleEngineJobCode - the code of the Job to create the cron job with
      jobPerformableBeanName - name of a bean of JobPerformable to run
      cronJobSupplier - a supplier for the instance of RuleEngineCronJobModel
      Returns:
      instance of RuleEngineCronJobModel