Java Code Examples for org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl#setHistoryLevel()
The following examples show how to use
org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl#setHistoryLevel() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: HistoryLevelSetupCommand.java From camunda-bpm-platform with Apache License 2.0 | 5 votes |
protected void determineAutoHistoryLevel(ProcessEngineConfigurationImpl engineConfiguration, HistoryLevel databaseHistoryLevel) { HistoryLevel configuredHistoryLevel = engineConfiguration.getHistoryLevel(); if (configuredHistoryLevel == null && ProcessEngineConfiguration.HISTORY_AUTO.equals(engineConfiguration.getHistory())) { // automatically determine history level or use default AUDIT if (databaseHistoryLevel != null) { engineConfiguration.setHistoryLevel(databaseHistoryLevel); } else { engineConfiguration.setHistoryLevel(engineConfiguration.getDefaultHistoryLevel()); } } }
Example 2
Source File: HistoryLevelTest.java From camunda-bpm-platform with Apache License 2.0 | 5 votes |
@Test public void shouldInitHistoryLevelByObject() throws Exception { ProcessEngineConfigurationImpl config = createConfig(); config.setHistoryLevel(HistoryLevel.HISTORY_LEVEL_FULL); ProcessEngineConfigurationImpl processEngineConfiguration = buildProcessEngine(config); assertThat(processEngineConfiguration.getHistoryLevels().size(), is(4)); assertThat(processEngineConfiguration.getHistoryLevel(), is(HistoryLevel.HISTORY_LEVEL_FULL)); assertThat(processEngineConfiguration.getHistory(), is(HistoryLevel.HISTORY_LEVEL_FULL.getName())); }
Example 3
Source File: DeploymentAutoHistoryTest.java From camunda-bpm-platform with Apache License 2.0 | 5 votes |
@Override public ProcessEngineConfiguration configureEngine(ProcessEngineConfigurationImpl configuration) { configuration.setJdbcUrl("jdbc:h2:mem:DeploymentTest-HistoryLevelAuto;DB_CLOSE_DELAY=1000"); configuration.setDatabaseSchemaUpdate(ProcessEngineConfiguration.DB_SCHEMA_UPDATE_CREATE_DROP); configuration.setHistoryLevel(null); configuration.setHistory(ProcessEngineConfiguration.HISTORY_AUTO); return configuration; }
Example 4
Source File: DeploymentTest.java From camunda-bpm-platform with Apache License 2.0 | 5 votes |
@Override public ProcessEngineConfiguration configureEngine(ProcessEngineConfigurationImpl configuration) { configuration.setJdbcUrl("jdbc:h2:mem:DeploymentTest-HistoryLevelNone;DB_CLOSE_DELAY=1000"); configuration.setDatabaseSchemaUpdate(ProcessEngineConfiguration.DB_SCHEMA_UPDATE_CREATE_DROP); configuration.setHistoryLevel(HistoryLevel.HISTORY_LEVEL_NONE); configuration.setDbHistoryUsed(false); return configuration; }