Search in sources :

Example 6 with ProcessEngineConfiguration

use of org.camunda.bpm.engine.ProcessEngineConfiguration in project camunda-bpm-platform by camunda.

the class ProcessEngineInitializationTest method testCustomDefaultRetries.

public void testCustomDefaultRetries() {
    ProcessEngineConfiguration configuration = ProcessEngineConfiguration.createProcessEngineConfigurationFromResource("org/camunda/bpm/engine/test/standalone/initialization/customdefaultretries.camunda.cfg.xml");
    assertEquals(5, configuration.getDefaultNumberOfRetries());
}
Also used : ProcessEngineConfiguration(org.camunda.bpm.engine.ProcessEngineConfiguration)

Example 7 with ProcessEngineConfiguration

use of org.camunda.bpm.engine.ProcessEngineConfiguration in project camunda-bpm-platform by camunda.

the class JobExecutorTest method testJobExecutorHintConfiguration.

public void testJobExecutorHintConfiguration() {
    ProcessEngineConfiguration engineConfig1 = ProcessEngineConfiguration.createStandaloneInMemProcessEngineConfiguration();
    assertTrue("default setting is true", engineConfig1.isHintJobExecutor());
    ProcessEngineConfiguration engineConfig2 = ProcessEngineConfiguration.createStandaloneInMemProcessEngineConfiguration().setHintJobExecutor(false);
    assertFalse(engineConfig2.isHintJobExecutor());
    ProcessEngineConfiguration engineConfig3 = ProcessEngineConfiguration.createStandaloneInMemProcessEngineConfiguration().setHintJobExecutor(true);
    assertTrue(engineConfig3.isHintJobExecutor());
}
Also used : ProcessEngineConfiguration(org.camunda.bpm.engine.ProcessEngineConfiguration)

Example 8 with ProcessEngineConfiguration

use of org.camunda.bpm.engine.ProcessEngineConfiguration in project camunda-bpm-platform by camunda.

the class EmbeddedProcessApplicationTest method testDeployAppWithCustomEngine.

public void testDeployAppWithCustomEngine() {
    TestApplicationWithCustomEngine processApplication = new TestApplicationWithCustomEngine();
    processApplication.deploy();
    ProcessEngine processEngine = BpmPlatform.getProcessEngineService().getProcessEngine("embeddedEngine");
    assertNotNull(processEngine);
    assertEquals("embeddedEngine", processEngine.getName());
    ProcessEngineConfiguration configuration = ((ProcessEngineImpl) processEngine).getProcessEngineConfiguration();
    // assert engine properties specified
    assertTrue(configuration.isJobExecutorDeploymentAware());
    assertTrue(configuration.isJobExecutorPreferTimerJobs());
    assertTrue(configuration.isJobExecutorAcquireByDueDate());
    assertEquals(5, configuration.getJdbcMaxActiveConnections());
    processApplication.undeploy();
}
Also used : ProcessEngineConfiguration(org.camunda.bpm.engine.ProcessEngineConfiguration) ProcessEngineImpl(org.camunda.bpm.engine.impl.ProcessEngineImpl) ProcessEngine(org.camunda.bpm.engine.ProcessEngine)

Aggregations

ProcessEngineConfiguration (org.camunda.bpm.engine.ProcessEngineConfiguration)8 HashMap (java.util.HashMap)2 ProcessEngine (org.camunda.bpm.engine.ProcessEngine)2 StandaloneProcessEngineConfiguration (org.camunda.bpm.engine.impl.cfg.StandaloneProcessEngineConfiguration)2 ProcessEngineImpl (org.camunda.bpm.engine.impl.ProcessEngineImpl)1 ProcessEngineConfigurationImpl (org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl)1 JobExecutor (org.camunda.bpm.engine.impl.jobexecutor.JobExecutor)1 AbstractFoxPlatformIntegrationTest (org.camunda.bpm.integrationtest.util.AbstractFoxPlatformIntegrationTest)1 Test (org.junit.Test)1