Beispiel #1
0
 protected internal virtual void checkAccess(CommandContext commandContext, HistoricBatchEntity batch)
 {
     foreach (CommandChecker checker in commandContext.ProcessEngineConfiguration.CommandCheckers)
     {
         checker.checkDeleteHistoricBatch(batch);
     }
 }
Beispiel #2
0
        public virtual object execute(CommandContext commandContext)
        {
            EnsureUtil.ensureNotNull(typeof(BadUserRequestException), "Historic batch id must not be null", "historic batch id", batchId);

            HistoricBatchEntity historicBatch = commandContext.HistoricBatchManager.findHistoricBatchById(batchId);

            EnsureUtil.ensureNotNull(typeof(BadUserRequestException), "Historic batch for id '" + batchId + "' cannot be found", "historic batch", historicBatch);

            checkAccess(commandContext, historicBatch);

            writeUserOperationLog(commandContext);

            historicBatch.delete();

            return(null);
        }