Search in sources :

Example 1 with HistoricJobLogManager

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);
}
Also used : HistoricJobLogManager(org.camunda.bpm.engine.impl.persistence.entity.HistoricJobLogManager) HistoricIncidentManager(org.camunda.bpm.engine.impl.persistence.entity.HistoricIncidentManager)

Example 2 with HistoricJobLogManager

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);
    }
}
Also used : CommandContext(org.camunda.bpm.engine.impl.interceptor.CommandContext) JobDefinitionManager(org.camunda.bpm.engine.impl.persistence.entity.JobDefinitionManager) HistoricJobLogManager(org.camunda.bpm.engine.impl.persistence.entity.HistoricJobLogManager) HistoricIncidentManager(org.camunda.bpm.engine.impl.persistence.entity.HistoricIncidentManager)

Aggregations

HistoricIncidentManager (org.camunda.bpm.engine.impl.persistence.entity.HistoricIncidentManager)2 HistoricJobLogManager (org.camunda.bpm.engine.impl.persistence.entity.HistoricJobLogManager)2 CommandContext (org.camunda.bpm.engine.impl.interceptor.CommandContext)1 JobDefinitionManager (org.camunda.bpm.engine.impl.persistence.entity.JobDefinitionManager)1