use of org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl in project camunda-bpm-platform by camunda.
the class JobPrioritizationBpmnExpressionValueTest method testDefaultEngineConfigurationSetting.
public void testDefaultEngineConfigurationSetting() {
ProcessEngineConfigurationImpl config = new StandaloneInMemProcessEngineConfiguration();
assertTrue(config.isEnableGracefulDegradationOnContextSwitchFailure());
}
use of org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl in project camunda-bpm-platform by camunda.
the class DbSchemaPrefixTestHelper method afterPropertiesSet.
public void afterPropertiesSet() throws Exception {
dataSource = new PooledDataSource(ReflectUtil.getClassLoader(), "org.h2.Driver", "jdbc:h2:mem:DatabaseTablePrefixTest;DB_CLOSE_DELAY=1000;MVCC=TRUE;", "sa", "");
// create schema in the
Connection connection = dataSource.getConnection();
connection.createStatement().execute("drop schema if exists SCHEMA1");
connection.createStatement().execute("create schema SCHEMA1");
connection.close();
ProcessEngineConfigurationImpl config1 = createCustomProcessEngineConfiguration().setProcessEngineName("DatabaseTablePrefixTest-engine1").setDataSource(dataSource).setDbMetricsReporterActivate(false).setDatabaseSchemaUpdate(// disable auto create/drop schema
"NO_CHECK");
config1.setDatabaseTablePrefix("SCHEMA1.");
ProcessEngine engine1 = config1.buildProcessEngine();
// create the tables in SCHEMA1
connection = dataSource.getConnection();
connection.createStatement().execute("set schema SCHEMA1");
engine1.getManagementService().databaseSchemaUpgrade(connection, "", "SCHEMA1");
connection.close();
engine1.close();
}
use of org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl in project camunda-bpm-platform by camunda.
the class InvoiceProcessApplication method startFirstProcess.
/**
* In a @PostDeploy Hook you can interact with the process engine and access
* the processes the application has deployed.
*/
@PostDeploy
public void startFirstProcess(ProcessEngine processEngine) {
createUsers(processEngine);
// enable metric reporting
ProcessEngineConfigurationImpl processEngineConfiguration = (ProcessEngineConfigurationImpl) processEngine.getProcessEngineConfiguration();
processEngineConfiguration.setDbMetricsReporterActivate(true);
processEngineConfiguration.getDbMetricsReporter().setReporterId("REPORTER");
startProcessInstances(processEngine, "invoice", 1);
startProcessInstances(processEngine, "invoice", null);
// disable reporting
processEngineConfiguration.setDbMetricsReporterActivate(false);
}
use of org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl in project camunda-bpm-platform by camunda.
the class ExecutionTree method forExecution.
public static ExecutionTree forExecution(final String executionId, ProcessEngine processEngine) {
ProcessEngineConfigurationImpl configuration = (ProcessEngineConfigurationImpl) processEngine.getProcessEngineConfiguration();
CommandExecutor commandExecutor = configuration.getCommandExecutorTxRequired();
ExecutionTree executionTree = commandExecutor.execute(new Command<ExecutionTree>() {
public ExecutionTree execute(CommandContext commandContext) {
ExecutionEntity execution = commandContext.getExecutionManager().findExecutionById(executionId);
return ExecutionTree.forExecution(execution);
}
});
return executionTree;
}
use of org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl in project camunda-bpm-platform by camunda.
the class JobExecutorBatchTest method replaceJobExecutor.
@Before
public void replaceJobExecutor() throws Exception {
ProcessEngineConfigurationImpl processEngineConfiguration = engineRule.getProcessEngineConfiguration();
defaultJobExecutor = processEngineConfiguration.getJobExecutor();
jobExecutor = new CountingJobExecutor();
processEngineConfiguration.setJobExecutor(jobExecutor);
}
Aggregations