Class EmbeddedQuartzScheduler


  • @Internal
    public class EmbeddedQuartzScheduler
    extends Object
    An embedded workflow scheduler based on quartz Scheduler that store all workflow in memory, it does not have high availability. This scheduler will be embedded in SqlGateway process to provide service by rest api.

    This embedded scheduler is mainly used for testing scenarios and is not suitable for production environment.

    • Constructor Detail

      • EmbeddedQuartzScheduler

        public EmbeddedQuartzScheduler()
    • Method Detail

      • start

        public void start()
      • stop

        public void stop()
      • resumeScheduleWorkflow

        public void resumeScheduleWorkflow​(String workflowName,
                                           String workflowGroup,
                                           Map<String,​String> dynamicOptions)
                                    throws SchedulerException
        Resume a quartz schedule job with new dynamic options. If the dynamic options is empty, just resume the job. If the dynamic options is not empty, since we cannot update the old workflow job, we need to remove the old job and create a new job with new dynamic options. The new job will be with new dynamic options. The new job will use the same job key and cron expression as the old job.
        Parameters:
        workflowName - The name of the workflow to be resumed.
        workflowGroup - The group of the workflow to be resumed.
        dynamicOptions - A map containing the new dynamic options for the workflow. If empty, the workflow is simply resumed.
        Throws:
        SchedulerException - if the workflow does not exist or if there is an error resuming the workflow.
      • getQuartzScheduler

        @VisibleForTesting
        public org.quartz.Scheduler getQuartzScheduler()