Java Code Examples for org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl#setHistory()
The following examples show how to use
org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl#setHistory() .
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: HistoryLevelTest.java From camunda-bpm-platform with Apache License 2.0 | 5 votes |
@Test public void shouldInitHistoryLevelByString() throws Exception { ProcessEngineConfigurationImpl config = createConfig(); config.setHistory(HistoryLevel.HISTORY_LEVEL_FULL.getName()); 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 2
Source File: AbstractHistoryCleanupSchedulerTest.java From camunda-bpm-platform with Apache License 2.0 | 5 votes |
public static ProcessEngineConfiguration configure(ProcessEngineConfigurationImpl configuration, HistoryEventTypes... historyEventTypes) { configuration.setJdbcUrl("jdbc:h2:mem:" + AbstractHistoryCleanupSchedulerTest.class.getSimpleName()); configuration.setCustomHistoryLevels(setCustomHistoryLevel(historyEventTypes)); configuration.setHistory(customHistoryLevel.getName()); configuration.setDatabaseSchemaUpdate(DB_SCHEMA_UPDATE_CREATE_DROP); return configuration; }
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: CustomHistoryLevelUserOperationLogTest.java From camunda-bpm-platform with Apache License 2.0 | 5 votes |
public ProcessEngineConfiguration configureEngine(ProcessEngineConfigurationImpl configuration) { configuration.setJdbcUrl("jdbc:h2:mem:CustomHistoryLevelUserOperationLogTest"); configuration.setCustomHistoryLevels(Arrays.asList(customHistoryLevelUOL)); configuration.setHistory("aCustomHistoryLevelUOL"); configuration.setDatabaseSchemaUpdate(DB_SCHEMA_UPDATE_CREATE_DROP); return configuration; }
Example 5
Source File: CustomHistoryLevelIdentityLinkTest.java From camunda-bpm-platform with Apache License 2.0 | 5 votes |
public ProcessEngineConfiguration configureEngine(ProcessEngineConfigurationImpl processEngineConfiguration) { processEngineConfiguration.setJdbcUrl("jdbc:h2:mem:" + getClass().getSimpleName()); List<HistoryLevel> levels = new ArrayList<>(); levels.add(customHisstoryLevelIL); processEngineConfiguration.setCustomHistoryLevels(levels); processEngineConfiguration.setHistory("aCustomHistoryLevelIL"); processEngineConfiguration.setDatabaseSchemaUpdate(DB_SCHEMA_UPDATE_CREATE_DROP); return processEngineConfiguration; }
Example 6
Source File: CustomHistoryLevelIncidentTest.java From camunda-bpm-platform with Apache License 2.0 | 5 votes |
public ProcessEngineConfiguration configureEngine(ProcessEngineConfigurationImpl processEngineConfiguration) { processEngineConfiguration.setJdbcUrl("jdbc:h2:mem:" + CustomHistoryLevelIncident.class.getSimpleName()); List<HistoryLevel> levels = new ArrayList<>(); levels.add(customHistoryLevelIncident); processEngineConfiguration.setCustomHistoryLevels(levels); processEngineConfiguration.setHistory("aCustomHistoryLevelIncident"); processEngineConfiguration.setDatabaseSchemaUpdate(DB_SCHEMA_UPDATE_CREATE_DROP); return processEngineConfiguration; }
Example 7
Source File: CustomHistoryLevelWithoutUserOperationLogTest.java From camunda-bpm-platform with Apache License 2.0 | 5 votes |
public ProcessEngineConfiguration configureEngine(ProcessEngineConfigurationImpl configuration) { configuration.setJdbcUrl("jdbc:h2:mem:CustomHistoryLevelWithoutUserOperationLogTest"); configuration.setCustomHistoryLevels(Arrays.asList(customHistoryLevelFullWUOL)); configuration.setHistory("aCustomHistoryLevelWUOL"); configuration.setDatabaseSchemaUpdate(DB_SCHEMA_UPDATE_CREATE_DROP); return configuration; }
Example 8
Source File: PerfTestProcessEngine.java From camunda-bpm-platform with Apache License 2.0 | 5 votes |
protected static ProcessEngine createProcessEngine(javax.sql.DataSource datasource, Properties properties) { ProcessEngineConfigurationImpl processEngineConfiguration = new StandaloneProcessEngineConfiguration(); processEngineConfiguration.setDataSource(datasource); processEngineConfiguration.setDatabaseSchemaUpdate(ProcessEngineConfiguration.DB_SCHEMA_UPDATE_TRUE); processEngineConfiguration.setHistory(properties.getProperty("historyLevel")); processEngineConfiguration.setJdbcBatchProcessing(Boolean.valueOf(properties.getProperty("jdbcBatchProcessing"))); // load plugins String processEnginePlugins = properties.getProperty("processEnginePlugins", ""); for (String pluginName : processEnginePlugins.split(",")) { if(pluginName.length() > 1) { Object pluginInstance = ReflectUtil.instantiate(pluginName); if(!(pluginInstance instanceof ProcessEnginePlugin)) { throw new PerfTestException("Plugin "+pluginName +" is not an instance of ProcessEnginePlugin"); } else { List<ProcessEnginePlugin> plugins = processEngineConfiguration.getProcessEnginePlugins(); if(plugins == null) { plugins = new ArrayList<ProcessEnginePlugin>(); processEngineConfiguration.setProcessEnginePlugins(plugins); } plugins.add((ProcessEnginePlugin) pluginInstance); } } } return processEngineConfiguration.buildProcessEngine(); }