Search in sources :

Example 1 with QuarkusProcessEngineConfiguration

use of org.camunda.bpm.quarkus.engine.extension.QuarkusProcessEngineConfiguration in project camunda-bpm-platform by camunda.

the class CamundaEngineDefaultConfigTest method shouldApplyDefaults.

@Test
public void shouldApplyDefaults() {
    // given
    // a ProcessEngineConfiguration instance
    QuarkusProcessEngineConfiguration configuration = (QuarkusProcessEngineConfiguration) processEngine.getProcessEngineConfiguration();
    // then
    assertThat(configuration.isJobExecutorActivate()).isTrue();
    assertThat(configuration.getJdbcUrl()).isNull();
    assertThat(configuration.getJdbcUsername()).isNull();
    assertThat(configuration.getJdbcPassword()).isNull();
    assertThat(configuration.getJdbcDriver()).isNull();
    assertThat(configuration.getDatabaseSchemaUpdate()).isEqualTo(DB_SCHEMA_UPDATE_TRUE);
    assertThat(configuration.isTransactionsExternallyManaged()).isTrue();
    assertThat(configuration.getIdGenerator()).isInstanceOf(StrongUuidGenerator.class);
    assertThat(configuration.getHistory()).isEqualTo("full");
    assertThat(configuration.getHistoryLevel()).isEqualTo(HistoryLevel.HISTORY_LEVEL_FULL);
}
Also used : QuarkusProcessEngineConfiguration(org.camunda.bpm.quarkus.engine.extension.QuarkusProcessEngineConfiguration) QuarkusUnitTest(io.quarkus.test.QuarkusUnitTest) Test(org.junit.jupiter.api.Test)

Example 2 with QuarkusProcessEngineConfiguration

use of org.camunda.bpm.quarkus.engine.extension.QuarkusProcessEngineConfiguration in project camunda-bpm-platform by camunda.

the class CamundaEngineConfigurationConfigTest method shouldApplyProcessEngineConfigurationProperties.

@Test
public void shouldApplyProcessEngineConfigurationProperties() {
    // given
    // a ProcessEngineConfiguration instance
    QuarkusProcessEngineConfiguration configuration = (QuarkusProcessEngineConfiguration) processEngine.getProcessEngineConfiguration();
    // then
    assertThat(configuration.isCmmnEnabled()).isEqualTo(false);
    assertThat(configuration.isDmnEnabled()).isEqualTo(false);
    assertThat(configuration.getHistory()).isEqualTo("none");
    assertThat(configuration.isInitializeTelemetry()).isEqualTo(false);
}
Also used : QuarkusProcessEngineConfiguration(org.camunda.bpm.quarkus.engine.extension.QuarkusProcessEngineConfiguration) Test(org.junit.jupiter.api.Test) QuarkusUnitTest(io.quarkus.test.QuarkusUnitTest)

Example 3 with QuarkusProcessEngineConfiguration

use of org.camunda.bpm.quarkus.engine.extension.QuarkusProcessEngineConfiguration in project camunda-bpm-platform by camunda.

the class CamundaEngineRecorder method createProcessEngineConfiguration.

public RuntimeValue<ProcessEngineConfigurationImpl> createProcessEngineConfiguration(BeanContainer beanContainer, CamundaEngineConfig config) {
    QuarkusProcessEngineConfiguration configuration = beanContainer.instance(QuarkusProcessEngineConfiguration.class);
    // apply properties from config before any other configuration.
    PropertyHelper.applyProperties(configuration, config.genericConfig, PropertyHelper.KEBAB_CASE);
    if (configuration.getDataSource() == null) {
        String datasource = config.datasource.orElse(DEFAULT_DATASOURCE_NAME);
        configuration.setDataSource(DataSources.fromName(datasource));
    }
    if (configuration.getTransactionManager() == null) {
        configuration.setTransactionManager(transactionManager());
    }
    // if not already configured by a custom configuration
    if (configuration.getJobExecutor() == null) {
        configureJobExecutor(configuration, config);
    }
    configureCdiEventBridge(configuration);
    return new RuntimeValue<>(configuration);
}
Also used : RuntimeValue(io.quarkus.runtime.RuntimeValue) QuarkusProcessEngineConfiguration(org.camunda.bpm.quarkus.engine.extension.QuarkusProcessEngineConfiguration)

Aggregations

QuarkusProcessEngineConfiguration (org.camunda.bpm.quarkus.engine.extension.QuarkusProcessEngineConfiguration)3 QuarkusUnitTest (io.quarkus.test.QuarkusUnitTest)2 Test (org.junit.jupiter.api.Test)2 RuntimeValue (io.quarkus.runtime.RuntimeValue)1