public virtual object Execute(CommandContext commandContext)
            {
                IHistoryLevel historyLevel = ESS.FW.Bpm.Engine.context.Impl.Context.ProcessEngineConfiguration.HistoryLevel;

                if (historyLevel.Equals(HistoryLevelFields.HistoryLevelFull))
                {
                    commandContext.HistoricJobLogManager.deleteHistoricJobLogsByHandlerType(TimerSuspendProcessDefinitionHandler.TYPE);
                    IList <IHistoricIncident> incidents =
                        ESS.FW.Bpm.Engine.context.Impl.Context.ProcessEngineConfiguration.HistoryService.CreateHistoricIncidentQuery()
                        .ToList();
                    ; foreach (IHistoricIncident incident in incidents)
                    {
                        commandContext.HistoricIncidentManager
                        .Delete((HistoricIncidentEntity)incident);
                    }
                }

                return(null);
            }
Exemple #2
0
 private void InitializeInstanceFields()
 {
     IsHistoryEnabled          = !historyLevel.Equals(HistoryLevelFields.HistoryLevelNone);
     IsHistoryLevelFullEnabled = historyLevel.Equals(HistoryLevelFields.HistoryLevelFull);
 }