use of org.camunda.bpm.engine.impl.persistence.entity.BatchManager in project camunda-bpm-platform by camunda.
the class AbstractSetBatchStateCmd method execute.
public Void execute(CommandContext commandContext) {
ensureNotNull(BadUserRequestException.class, "Batch id must not be null", "batch id", batchId);
BatchManager batchManager = commandContext.getBatchManager();
BatchEntity batch = batchManager.findBatchById(batchId);
ensureNotNull(BadUserRequestException.class, "Batch for id '" + batchId + "' cannot be found", "batch", batch);
checkAccess(commandContext, batch);
setJobDefinitionState(commandContext, batch.getSeedJobDefinitionId());
setJobDefinitionState(commandContext, batch.getMonitorJobDefinitionId());
setJobDefinitionState(commandContext, batch.getBatchJobDefinitionId());
batchManager.updateBatchSuspensionStateById(batchId, getNewSuspensionState());
logUserOperation(commandContext);
return null;
}
Aggregations