public void deleteJob(JobEntity job) { deleteJob(job, true); }
public void deleteJob(JobEntity job) { deleteJob(job, true); }
public Void execute(CommandContext commandContext) { commandContext.getJobManager().deleteJob((JobEntity) job); return null; } });
public Void execute(CommandContext commandContext) { commandContext.getJobManager().deleteJob((JobEntity) job); return null; } });
public Void execute(CommandContext commandContext) { List<Job> jobs = processEngine.getManagementService().createJobQuery().list(); if (jobs.size() > 0) { assertEquals(1, jobs.size()); String jobId = jobs.get(0).getId(); commandContext.getJobManager().deleteJob((JobEntity) jobs.get(0)); commandContext.getHistoricJobLogManager().deleteHistoricJobLogByJobId(jobId); } return null; } });
public Void execute(CommandContext commandContext) { List<Job> jobs = otherProcessEngine.getManagementService().createJobQuery().list(); if (jobs.size() > 0) { assertEquals(1, jobs.size()); String jobId = jobs.get(0).getId(); commandContext.getJobManager().deleteJob((JobEntity) jobs.get(0)); commandContext.getHistoricJobLogManager().deleteHistoricJobLogByJobId(jobId); } return null; } });
public Void execute(CommandContext commandContext) { List<Job> jobs = managementService.createJobQuery().list(); if (jobs.size() > 0) { assertEquals(1, jobs.size()); String jobId = jobs.get(0).getId(); commandContext.getJobManager().deleteJob((JobEntity) jobs.get(0)); commandContext.getHistoricJobLogManager().deleteHistoricJobLogByJobId(jobId); } return null; } });
public Void execute(CommandContext commandContext) { List<Job> jobs = managementService.createJobQuery().list(); if (jobs.size() > 0) { assertEquals(1, jobs.size()); String jobId = jobs.get(0).getId(); commandContext.getJobManager().deleteJob((JobEntity) jobs.get(0)); commandContext.getHistoricJobLogManager().deleteHistoricJobLogByJobId(jobId); } return null; } });
public Void execute(CommandContext commandContext) { List<Job> jobs = engineRule.getManagementService().createJobQuery().list(); if (jobs.size() > 0) { assertEquals(1, jobs.size()); String jobId = jobs.get(0).getId(); commandContext.getJobManager().deleteJob((JobEntity) jobs.get(0)); commandContext.getHistoricJobLogManager().deleteHistoricJobLogByJobId(jobId); } return null; } });
public Void execute(CommandContext commandContext) { List<Job> jobs = processEngine.getManagementService().createJobQuery().list(); if (jobs.size() > 0) { String jobId = jobs.get(0).getId(); commandContext.getJobManager().deleteJob((JobEntity) jobs.get(0)); commandContext.getHistoricJobLogManager().deleteHistoricJobLogByJobId(jobId); } return null; } });
public Void execute(CommandContext commandContext) { List<Job> jobs = engineRule.getManagementService().createJobQuery().list(); if (jobs.size() > 0) { assertEquals(1, jobs.size()); String jobId = jobs.get(0).getId(); commandContext.getJobManager().deleteJob((JobEntity) jobs.get(0)); commandContext.getHistoricJobLogManager().deleteHistoricJobLogByJobId(jobId); } commandContext.getMeterLogManager().deleteAll(); return null; } });
public Void execute(CommandContext commandContext) { commandContext.getJobManager().deleteJob((JobEntity) job); commandContext.getHistoricJobLogManager().deleteHistoricJobLogByJobId(job.getId()); return null; } });
public Void execute(CommandContext commandContext) { List<Job> jobs = managementService.createJobQuery().list(); if (jobs.size() > 0) { assertEquals(1, jobs.size()); String jobId = jobs.get(0).getId(); commandContext.getJobManager().deleteJob((JobEntity) jobs.get(0)); commandContext.getHistoricJobLogManager().deleteHistoricJobLogByJobId(jobId); } List<HistoricIncident> historicIncidents = historyService.createHistoricIncidentQuery().list(); for (HistoricIncident historicIncident : historicIncidents) { commandContext.getDbEntityManager().delete((HistoricIncidentEntity) historicIncident); } commandContext.getMeterLogManager().deleteAll(); return null; } });
public void delete(boolean incidentResolved) { CommandContext commandContext = Context.getCommandContext(); incrementSequenceCounter(); // clean additional data related to this job JobHandler jobHandler = getJobHandler(); if (jobHandler != null) { jobHandler.onDelete(getJobHandlerConfiguration(), this); } // fire delete event if this job is not being executed boolean executingJob = this.equals(commandContext.getCurrentJob()); commandContext.getJobManager().deleteJob(this, !executingJob); // Also delete the job's exception byte array if (exceptionByteArrayId != null) { commandContext.getByteArrayManager().deleteByteArrayById(exceptionByteArrayId); } // remove link to execution ExecutionEntity execution = getExecution(); if (execution != null) { execution.removeJob(this); } removeFailedJobIncident(incidentResolved); }
public void delete(boolean incidentResolved) { CommandContext commandContext = Context.getCommandContext(); incrementSequenceCounter(); // clean additional data related to this job JobHandler jobHandler = getJobHandler(); if (jobHandler != null) { jobHandler.onDelete(getJobHandlerConfiguration(), this); } // fire delete event if this job is not being executed boolean executingJob = this.equals(commandContext.getCurrentJob()); commandContext.getJobManager().deleteJob(this, !executingJob); // Also delete the job's exception byte array if (exceptionByteArrayId != null) { commandContext.getByteArrayManager().deleteByteArrayById(exceptionByteArrayId); } // remove link to execution ExecutionEntity execution = getExecution(); if (execution != null) { execution.removeJob(this); } removeFailedJobIncident(incidentResolved); }
public Void execute(CommandContext commandContext) { List<Job> jobs = commandContext.getDbEntityManager().createJobQuery().list(); for (Job job : jobs) { commandContext.getJobManager().deleteJob((JobEntity) job, false); } for (HistoricJobLog jobLog : commandContext.getDbEntityManager().createHistoricJobLogQuery().list()) { commandContext.getHistoricJobLogManager().deleteHistoricJobLogById(jobLog.getId()); } return null; }
public Void execute(CommandContext commandContext) { List<Job> jobs = managementService.createJobQuery().list(); for (Job job : jobs) { commandContext.getJobManager().deleteJob((JobEntity) job); commandContext.getHistoricJobLogManager().deleteHistoricJobLogByJobId(job.getId()); } List<HistoricIncident> historicIncidents = historyService.createHistoricIncidentQuery().list(); for (HistoricIncident historicIncident : historicIncidents) { commandContext.getDbEntityManager().delete((HistoricIncidentEntity) historicIncident); } commandContext.getMeterLogManager().deleteAll(); return null; } });
public Void execute(CommandContext commandContext) { List<Job> jobs = managementService.createJobQuery().list(); for (Job job : jobs) { commandContext.getJobManager().deleteJob((JobEntity) job); commandContext.getHistoricJobLogManager().deleteHistoricJobLogByJobId(job.getId()); } List<HistoricIncident> historicIncidents = historyService.createHistoricIncidentQuery().list(); for (HistoricIncident historicIncident : historicIncidents) { commandContext.getDbEntityManager().delete((HistoricIncidentEntity) historicIncident); } commandContext.getMeterLogManager().deleteAll(); return null; } });
public Void execute(CommandContext commandContext) { List<Job> jobs = historyService.findHistoryCleanupJobs(); for (Job job: jobs) { commandContext.getJobManager().deleteJob((JobEntity) job); commandContext.getHistoricJobLogManager().deleteHistoricJobLogByJobId(job.getId()); } //cleanup "detached" historic job logs final List<HistoricJobLog> list = historyService.createHistoricJobLogQuery().list(); for (HistoricJobLog jobLog: list) { commandContext.getHistoricJobLogManager().deleteHistoricJobLogByJobId(jobLog.getJobId()); } commandContext.getMeterLogManager().deleteAll(); return null; } });
public Void execute(CommandContext commandContext) { List<Job> jobs = historyService.findHistoryCleanupJobs(); for (Job job: jobs) { commandContext.getJobManager().deleteJob((JobEntity) job); commandContext.getHistoricJobLogManager().deleteHistoricJobLogByJobId(job.getId()); } //cleanup "detached" historic job logs final List<HistoricJobLog> list = historyService.createHistoricJobLogQuery().list(); for (HistoricJobLog jobLog: list) { commandContext.getHistoricJobLogManager().deleteHistoricJobLogByJobId(jobLog.getJobId()); } List<HistoricIncident> historicIncidents = historyService.createHistoricIncidentQuery().list(); for (HistoricIncident historicIncident : historicIncidents) { commandContext.getDbEntityManager().delete((HistoricIncidentEntity) historicIncident); } commandContext.getMeterLogManager().deleteAll(); return null; } });