本文整理汇总了Java中org.camunda.bpm.engine.ProcessEngineConfiguration.createProcessEngineConfigurationFromResource方法的典型用法代码示例。如果您正苦于以下问题:Java ProcessEngineConfiguration.createProcessEngineConfigurationFromResource方法的具体用法?Java ProcessEngineConfiguration.createProcessEngineConfigurationFromResource怎么用?Java ProcessEngineConfiguration.createProcessEngineConfigurationFromResource使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.camunda.bpm.engine.ProcessEngineConfiguration
的用法示例。
在下文中一共展示了ProcessEngineConfiguration.createProcessEngineConfigurationFromResource方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setDmnEngineConfigurationOverXmlConfiguration
import org.camunda.bpm.engine.ProcessEngineConfiguration; //导入方法依赖的package包/类
@Test
public void setDmnEngineConfigurationOverXmlConfiguration() {
// given an embedded DMN engine configuration in XML process engine configuration
// with default expression language
ProcessEngineConfigurationImpl processEngineConfiguration = (ProcessEngineConfigurationImpl) ProcessEngineConfiguration
.createProcessEngineConfigurationFromResource(CONFIGURATION_XML);
// checks that the configuration is set as on XML
DefaultDmnEngineConfiguration dmnEngineConfiguration = processEngineConfiguration.getDmnEngineConfiguration();
assertThat(dmnEngineConfiguration, is(notNullValue()));
assertThat(dmnEngineConfiguration.getDefaultInputExpressionExpressionLanguage(), is("groovy"));
// when the engine is initialized
engine = processEngineConfiguration.buildProcessEngine();
// then the default expression language should be set in the DMN engine
assertThat(getConfigurationOfDmnEngine().getDefaultInputExpressionExpressionLanguage(), is("groovy"));
}
示例2: get
import org.camunda.bpm.engine.ProcessEngineConfiguration; //导入方法依赖的package包/类
@Override
public ProcessEngineConfiguration get() {
try {
return ProcessEngineConfiguration.createProcessEngineConfigurationFromResource(cfgXmlFilename);
} catch (Exception e) {
return null;
}
}
示例3: testMyBatisConnectionPoolProperlyConfigured
import org.camunda.bpm.engine.ProcessEngineConfiguration; //导入方法依赖的package包/类
public void testMyBatisConnectionPoolProperlyConfigured() {
ProcessEngineConfigurationImpl config = (ProcessEngineConfigurationImpl) ProcessEngineConfiguration
.createProcessEngineConfigurationFromResource("org/camunda/bpm/engine/test/api/cfg/connection-pool.camunda.cfg.xml");
ProcessEngine engine = config.buildProcessEngine();
// Expected values
int maxActive = 25;
int maxIdle = 10;
int maxCheckoutTime = 30000;
int maxWaitTime = 25000;
Integer jdbcStatementTimeout = 300;
assertEquals(maxActive, config.getJdbcMaxActiveConnections());
assertEquals(maxIdle, config.getJdbcMaxIdleConnections());
assertEquals(maxCheckoutTime, config.getJdbcMaxCheckoutTime());
assertEquals(maxWaitTime, config.getJdbcMaxWaitTime());
assertEquals(jdbcStatementTimeout, config.getJdbcStatementTimeout());
// Verify that these properties are correctly set in the MyBatis datasource
Configuration sessionFactoryConfiguration = config.getDbSqlSessionFactory().getSqlSessionFactory().getConfiguration();
DataSource datasource = sessionFactoryConfiguration.getEnvironment().getDataSource();
assertTrue(datasource instanceof PooledDataSource);
PooledDataSource pooledDataSource = (PooledDataSource) datasource;
assertEquals(maxActive, pooledDataSource.getPoolMaximumActiveConnections());
assertEquals(maxIdle, pooledDataSource.getPoolMaximumIdleConnections());
assertEquals(maxCheckoutTime, pooledDataSource.getPoolMaximumCheckoutTime());
assertEquals(maxWaitTime, pooledDataSource.getPoolTimeToWait());
assertEquals(jdbcStatementTimeout, sessionFactoryConfiguration.getDefaultStatementTimeout());
engine.close();
}
示例4: setUp
import org.camunda.bpm.engine.ProcessEngineConfiguration; //导入方法依赖的package包/类
protected void setUp() throws Exception {
ProcessEngineConfigurationImpl processEngineConfiguration = (ProcessEngineConfigurationImpl) ProcessEngineConfiguration
.createProcessEngineConfigurationFromResource("org/camunda/bpm/engine/test/standalone/jpa/camunda.cfg.xml");
processEngineConfiguration.setJavaSerializationFormatEnabled(true);
cachedProcessEngine = processEngineConfiguration.buildProcessEngine();
EntityManagerSessionFactory entityManagerSessionFactory = (EntityManagerSessionFactory) processEngineConfiguration
.getSessionFactories()
.get(EntityManagerSession.class);
entityManagerFactory = entityManagerSessionFactory.getEntityManagerFactory();
}
示例5: main
import org.camunda.bpm.engine.ProcessEngineConfiguration; //导入方法依赖的package包/类
public static void main(String[] args) {
ProcessEngineConfigurationImpl processEngineConfiguration = (ProcessEngineConfigurationImpl) ProcessEngineConfiguration
.createProcessEngineConfigurationFromResource("camunda.cfg.xml");
ProcessEngine processEngine = processEngineConfiguration.buildProcessEngine();
// register test scenarios
ScenarioRunner runner = new ScenarioRunner(processEngine, ENGINE_VERSION);
// compensation
runner.setupScenarios(DeployProcessWithoutIsExecutableAttributeScenario.class);
processEngine.close();
}
示例6: main
import org.camunda.bpm.engine.ProcessEngineConfiguration; //导入方法依赖的package包/类
public static void main(String[] args) {
ProcessEngineConfigurationImpl processEngineConfiguration = (ProcessEngineConfigurationImpl) ProcessEngineConfiguration
.createProcessEngineConfigurationFromResource("camunda.cfg.xml");
ProcessEngine processEngine = processEngineConfiguration.buildProcessEngine();
// register test scenarios
ScenarioRunner runner = new ScenarioRunner(processEngine, ENGINE_VERSION);
// compensation
runner.setupScenarios(CreateProcessInstanceWithVariableScenario.class);
processEngine.close();
}
示例7: main
import org.camunda.bpm.engine.ProcessEngineConfiguration; //导入方法依赖的package包/类
public static void main(String[] args) {
ProcessEngineConfigurationImpl processEngineConfiguration = (ProcessEngineConfigurationImpl) ProcessEngineConfiguration
.createProcessEngineConfigurationFromResource("camunda.cfg.xml");
ProcessEngine processEngine = processEngineConfiguration.buildProcessEngine();
// register test scenarios
ScenarioRunner runner = new ScenarioRunner(processEngine, ENGINE_VERSION);
// compensation
runner.setupScenarios(DeployUserWithoutSaltForPasswordHashingScenario.class);
processEngine.close();
}
示例8: main
import org.camunda.bpm.engine.ProcessEngineConfiguration; //导入方法依赖的package包/类
public static void main(String[] args) {
ProcessEngineConfigurationImpl processEngineConfiguration = (ProcessEngineConfigurationImpl) ProcessEngineConfiguration
.createProcessEngineConfigurationFromResource("camunda.cfg.xml");
ProcessEngine processEngine = processEngineConfiguration.buildProcessEngine();
// register test scenarios
ScenarioRunner runner = new ScenarioRunner(processEngine, ENGINE_VERSION);
// cmmn sentries
runner.setupScenarios(SentryScenario.class);
// compensation
runner.setupScenarios(SingleActivityCompensationScenario.class);
runner.setupScenarios(NestedCompensationScenario.class);
runner.setupScenarios(SingleActivityConcurrentCompensationScenario.class);
runner.setupScenarios(ParallelMultiInstanceCompensationScenario.class);
runner.setupScenarios(SequentialMultiInstanceCompensationScenario.class);
runner.setupScenarios(NestedMultiInstanceCompensationScenario.class);
runner.setupScenarios(InterruptingEventSubProcessCompensationScenario.class);
runner.setupScenarios(NonInterruptingEventSubProcessCompensationScenario.class);
runner.setupScenarios(InterruptingEventSubProcessNestedCompensationScenario.class);
// job
runner.setupScenarios(JobMigrationScenario.class);
// boundary events
runner.setupScenarios(NonInterruptingBoundaryEventScenario.class);
processEngine.close();
}
示例9: testDefaultRetries
import org.camunda.bpm.engine.ProcessEngineConfiguration; //导入方法依赖的package包/类
public void testDefaultRetries() {
ProcessEngineConfiguration configuration = ProcessEngineConfiguration
.createProcessEngineConfigurationFromResource("org/camunda/bpm/engine/test/standalone/initialization/defaultretries.camunda.cfg.xml");
assertEquals(JobEntity.DEFAULT_RETRIES, configuration.getDefaultNumberOfRetries());
}
示例10: testCustomDefaultRetries
import org.camunda.bpm.engine.ProcessEngineConfiguration; //导入方法依赖的package包/类
public void testCustomDefaultRetries() {
ProcessEngineConfiguration configuration = ProcessEngineConfiguration
.createProcessEngineConfigurationFromResource("org/camunda/bpm/engine/test/standalone/initialization/customdefaultretries.camunda.cfg.xml");
assertEquals(5, configuration.getDefaultNumberOfRetries());
}
示例11: bootstrapEngine
import org.camunda.bpm.engine.ProcessEngineConfiguration; //导入方法依赖的package包/类
public ProcessEngine bootstrapEngine(String configurationResource) {
ProcessEngineConfigurationImpl processEngineConfiguration = (ProcessEngineConfigurationImpl) ProcessEngineConfiguration
.createProcessEngineConfigurationFromResource(configurationResource);
configureEngine(processEngineConfiguration);
return processEngineConfiguration.buildProcessEngine();
}
示例12: main
import org.camunda.bpm.engine.ProcessEngineConfiguration; //导入方法依赖的package包/类
/**
* @param args
*/
public static void main(String[] args) {
if(args.length != 2) {
throw LOG.invokeSchemaResourceToolException(args.length);
}
final String configurationFileResourceName = args[0];
final String schemaFileResourceName = args[1];
ensureNotNull("Process engine configuration file name cannot be null", "configurationFileResourceName", configurationFileResourceName);
ensureNotNull("Schema resource file name cannot be null", "schemaFileResourceName", schemaFileResourceName);
ProcessEngineConfigurationImpl configuration = (ProcessEngineConfigurationImpl) ProcessEngineConfiguration.createProcessEngineConfigurationFromResource(configurationFileResourceName);
ProcessEngine processEngine = configuration.buildProcessEngine();
configuration.getCommandExecutorTxRequired().execute(new Command<Void>() {
public Void execute(CommandContext commandContext) {
commandContext.getDbSqlSession()
.executeSchemaResource(schemaFileResourceName);
return null;
}
});
processEngine.close();
}