use of org.camunda.bpm.engine.impl.history.HistoryLevel in project camunda-bpm-platform by camunda.
the class HistoricBatchManager method createHistoricBatch.
public void createHistoricBatch(final BatchEntity batch) {
ProcessEngineConfigurationImpl configuration = Context.getProcessEngineConfiguration();
HistoryLevel historyLevel = configuration.getHistoryLevel();
if (historyLevel.isHistoryEventProduced(HistoryEventTypes.BATCH_START, batch)) {
HistoryEventProcessor.processHistoryEvents(new HistoryEventProcessor.HistoryEventCreator() {
@Override
public HistoryEvent createHistoryEvent(HistoryEventProducer producer) {
return producer.createBatchStartEvent(batch);
}
});
}
}
use of org.camunda.bpm.engine.impl.history.HistoryLevel in project camunda-bpm-platform by camunda.
the class IncidentAuthorizationTest method clearDatabase.
protected void clearDatabase() {
CommandExecutor commandExecutor = processEngineConfiguration.getCommandExecutorTxRequired();
commandExecutor.execute(new Command<Object>() {
public Object execute(CommandContext commandContext) {
HistoryLevel historyLevel = Context.getProcessEngineConfiguration().getHistoryLevel();
if (historyLevel.equals(HistoryLevel.HISTORY_LEVEL_FULL)) {
commandContext.getHistoricJobLogManager().deleteHistoricJobLogsByHandlerType(TimerSuspendProcessDefinitionHandler.TYPE);
List<HistoricIncident> incidents = Context.getProcessEngineConfiguration().getHistoryService().createHistoricIncidentQuery().list();
for (HistoricIncident incident : incidents) {
commandContext.getHistoricIncidentManager().delete((HistoricIncidentEntity) incident);
}
}
return null;
}
});
}
use of org.camunda.bpm.engine.impl.history.HistoryLevel in project camunda-bpm-platform by camunda.
the class MigratingActivityInstance method migrateActivityInstanceHistory.
protected void migrateActivityInstanceHistory(final DelegateExecution execution) {
HistoryLevel historyLevel = Context.getProcessEngineConfiguration().getHistoryLevel();
if (!historyLevel.isHistoryEventProduced(HistoryEventTypes.ACTIVITY_INSTANCE_MIGRATE, this)) {
return;
}
HistoryEventProcessor.processHistoryEvents(new HistoryEventProcessor.HistoryEventCreator() {
@Override
public HistoryEvent createHistoryEvent(HistoryEventProducer producer) {
return producer.createActivityInstanceMigrateEvt(MigratingActivityInstance.this);
}
});
}
use of org.camunda.bpm.engine.impl.history.HistoryLevel in project camunda-bpm-platform by camunda.
the class MigratingActivityInstance method migrateProcessInstanceHistory.
protected void migrateProcessInstanceHistory(final DelegateExecution execution) {
HistoryLevel historyLevel = Context.getProcessEngineConfiguration().getHistoryLevel();
if (!historyLevel.isHistoryEventProduced(HistoryEventTypes.PROCESS_INSTANCE_MIGRATE, this)) {
return;
}
HistoryEventProcessor.processHistoryEvents(new HistoryEventProcessor.HistoryEventCreator() {
@Override
public HistoryEvent createHistoryEvent(HistoryEventProducer producer) {
return producer.createProcessInstanceUpdateEvt(execution);
}
});
}
use of org.camunda.bpm.engine.impl.history.HistoryLevel in project camunda-bpm-platform by camunda.
the class HistoricTaskInstanceManager method updateHistoricTaskInstance.
public void updateHistoricTaskInstance(final TaskEntity taskEntity) {
ProcessEngineConfigurationImpl configuration = Context.getProcessEngineConfiguration();
HistoryLevel historyLevel = configuration.getHistoryLevel();
if (historyLevel.isHistoryEventProduced(HistoryEventTypes.TASK_INSTANCE_UPDATE, taskEntity)) {
HistoryEventProcessor.processHistoryEvents(new HistoryEventProcessor.HistoryEventCreator() {
@Override
public HistoryEvent createHistoryEvent(HistoryEventProducer producer) {
return producer.createTaskInstanceUpdateEvt(taskEntity);
}
});
}
}
Aggregations