use of org.camunda.bpm.engine.impl.persistence.entity.HistoricJobLogManager in project camunda-bpm-platform by camunda.
the class HistoricBatchEntity method delete.
public void delete() {
HistoricIncidentManager historicIncidentManager = Context.getCommandContext().getHistoricIncidentManager();
historicIncidentManager.deleteHistoricIncidentsByJobDefinitionId(seedJobDefinitionId);
historicIncidentManager.deleteHistoricIncidentsByJobDefinitionId(monitorJobDefinitionId);
historicIncidentManager.deleteHistoricIncidentsByJobDefinitionId(batchJobDefinitionId);
HistoricJobLogManager historicJobLogManager = Context.getCommandContext().getHistoricJobLogManager();
historicJobLogManager.deleteHistoricJobLogsByJobDefinitionId(seedJobDefinitionId);
historicJobLogManager.deleteHistoricJobLogsByJobDefinitionId(monitorJobDefinitionId);
historicJobLogManager.deleteHistoricJobLogsByJobDefinitionId(batchJobDefinitionId);
Context.getCommandContext().getHistoricBatchManager().delete(this);
}
use of org.camunda.bpm.engine.impl.persistence.entity.HistoricJobLogManager in project camunda-bpm-platform by camunda.
the class BatchEntity method delete.
public void delete(boolean cascadeToHistory) {
CommandContext commandContext = Context.getCommandContext();
deleteSeedJob();
deleteMonitorJob();
getBatchJobHandler().deleteJobs(this);
JobDefinitionManager jobDefinitionManager = commandContext.getJobDefinitionManager();
jobDefinitionManager.delete(getSeedJobDefinition());
jobDefinitionManager.delete(getMonitorJobDefinition());
jobDefinitionManager.delete(getBatchJobDefinition());
commandContext.getBatchManager().delete(this);
configuration.deleteByteArrayValue();
fireHistoricEndEvent();
if (cascadeToHistory) {
HistoricIncidentManager historicIncidentManager = commandContext.getHistoricIncidentManager();
historicIncidentManager.deleteHistoricIncidentsByJobDefinitionId(seedJobDefinitionId);
historicIncidentManager.deleteHistoricIncidentsByJobDefinitionId(monitorJobDefinitionId);
historicIncidentManager.deleteHistoricIncidentsByJobDefinitionId(batchJobDefinitionId);
HistoricJobLogManager historicJobLogManager = commandContext.getHistoricJobLogManager();
historicJobLogManager.deleteHistoricJobLogsByJobDefinitionId(seedJobDefinitionId);
historicJobLogManager.deleteHistoricJobLogsByJobDefinitionId(monitorJobDefinitionId);
historicJobLogManager.deleteHistoricJobLogsByJobDefinitionId(batchJobDefinitionId);
commandContext.getHistoricBatchManager().deleteHistoricBatchById(id);
}
}
Aggregations