protected void suspendJobs(List<Job> jobs) { for (Job job: jobs) { JobEntity jobInstance = (JobEntity) job; jobInstance.setSuspensionState(SuspensionState.SUSPENDED.getStateCode()); jobInstance.setDuedate(null); } }
protected void suspendJobs(List<Job> jobs) { for (Job job: jobs) { JobEntity jobInstance = (JobEntity) job; jobInstance.setSuspensionState(SuspensionState.SUSPENDED.getStateCode()); jobInstance.setDuedate(null); } }
public void reschedule(JobEntity jobEntity, Date newDuedate) { jobEntity.init(Context.getCommandContext()); jobEntity.setSuspensionState(SuspensionState.ACTIVE.getStateCode()); jobEntity.setDuedate(newDuedate); hintJobExecutorIfNeeded(jobEntity, newDuedate); }
public void reschedule(JobEntity jobEntity, Date newDuedate) { jobEntity.init(Context.getCommandContext()); jobEntity.setSuspensionState(SuspensionState.ACTIVE.getStateCode()); jobEntity.setDuedate(newDuedate); hintJobExecutorIfNeeded(jobEntity, newDuedate); }
public JobEntity createMonitorJob(boolean setDueDate) { // Maybe use an other job declaration JobEntity monitorJob = BATCH_MONITOR_JOB_DECLARATION.createJobInstance(this); if (setDueDate) { monitorJob.setDuedate(calculateMonitorJobDueDate()); } Context.getCommandContext() .getJobManager().insertAndHintJobExecutor(monitorJob); return monitorJob; }
public JobEntity createMonitorJob(boolean setDueDate) { // Maybe use an other job declaration JobEntity monitorJob = BATCH_MONITOR_JOB_DECLARATION.createJobInstance(this); if (setDueDate) { monitorJob.setDuedate(calculateMonitorJobDueDate()); } Context.getCommandContext() .getJobManager().insertAndHintJobExecutor(monitorJob); return monitorJob; }
public Void execute(CommandContext commandContext) { Date currentTime = ClockUtil.getCurrentTime(); commandContext.getJobManager() .findJobById(job.getId()) .setDuedate(new Date(currentTime.getTime() - 10000)); return null; }
public Void execute(CommandContext commandContext) { JobEntity job = commandContext .getJobManager() .findJobById(jobId); if (job != null) { for(CommandChecker checker : commandContext.getProcessEngineConfiguration().getCommandCheckers()) { checker.checkUpdateJob(job); } job.setDuedate(newDuedate); } else { throw new ProcessEngineException("No job found with id '" + jobId + "'."); } return null; } }
public Void execute(CommandContext commandContext) { JobEntity job = commandContext .getJobManager() .findJobById(jobId); if (job != null) { for(CommandChecker checker : commandContext.getProcessEngineConfiguration().getCommandCheckers()) { checker.checkUpdateJob(job); } job.setDuedate(newDuedate); } else { throw new ProcessEngineException("No job found with id '" + jobId + "'."); } return null; } }
protected void suspendJobs(List<Job> jobs) { for (Job job: jobs) { JobEntity jobInstance = (JobEntity) job; jobInstance.setSuspensionState(SuspensionState.SUSPENDED.getStateCode()); jobInstance.setDuedate(null); } }
job.setExclusive(resolveExclusive(context)); job.setRetries(resolveRetries(context)); job.setDuedate(resolveDueDate(context));
job.setExclusive(resolveExclusive(context)); job.setRetries(resolveRetries(context)); job.setDuedate(resolveDueDate(context));
public void reschedule(JobEntity jobEntity, Date newDuedate) { jobEntity.init(Context.getCommandContext()); jobEntity.setSuspensionState(SuspensionState.ACTIVE.getStateCode()); jobEntity.setDuedate(newDuedate); hintJobExecutorIfNeeded(jobEntity, newDuedate); }
public JobEntity createMonitorJob(boolean setDueDate) { // Maybe use an other job declaration JobEntity monitorJob = BATCH_MONITOR_JOB_DECLARATION.createJobInstance(this); if (setDueDate) { monitorJob.setDuedate(calculateMonitorJobDueDate()); } Context.getCommandContext() .getJobManager().insertAndHintJobExecutor(monitorJob); return monitorJob; }
public Void execute(CommandContext commandContext) { Date currentTime = ClockUtil.getCurrentTime(); commandContext.getJobManager() .findJobById(job.getId()) .setDuedate(new Date(currentTime.getTime() - 10000)); return null; }
public Void execute(CommandContext commandContext) { JobEntity job = commandContext .getJobManager() .findJobById(jobId); if (job != null) { for(CommandChecker checker : commandContext.getProcessEngineConfiguration().getCommandCheckers()) { checker.checkUpdateJob(job); } job.setDuedate(newDuedate); } else { throw new ProcessEngineException("No job found with id '" + jobId + "'."); } return null; } }
job.setExclusive(resolveExclusive(context)); job.setRetries(resolveRetries(context)); job.setDuedate(resolveDueDate(context));