Package org.camunda.bpm.engine.impl.cfg

Examples of org.camunda.bpm.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration


  public static ProcessEngineConfiguration createStandaloneProcessEngineConfiguration() {
    return new StandaloneProcessEngineConfiguration();
  }

  public static ProcessEngineConfiguration createStandaloneInMemProcessEngineConfiguration() {
    return new StandaloneInMemProcessEngineConfiguration();
  }
View Full Code Here


    // existing process engines to make sure that the db is clean
    // and that there are no existing process engines involved.
    ProcessEngines.destroy();

    // Creating the DB schema (without building a process engine)
    ProcessEngineConfigurationImpl processEngineConfiguration = new StandaloneInMemProcessEngineConfiguration();
    processEngineConfiguration.setProcessEngineName("reboot-test-schema");
    processEngineConfiguration.setJdbcUrl("jdbc:h2:mem:activiti-reboot-test;DB_CLOSE_DELAY=1000");
    ProcessEngine schemaProcessEngine = processEngineConfiguration.buildProcessEngine();
   
    // Create process engine and deploy test process
     ProcessEngine processEngine = new StandaloneProcessEngineConfiguration()
       .setProcessEngineName("reboot-test")
       .setDatabaseSchemaUpdate(ProcessEngineConfiguration.DB_SCHEMA_UPDATE_FALSE)
View Full Code Here

  }
 
  @Test
  public void testExecuteJobsForSingleEngine() {
    // configure and build a process engine
    StandaloneProcessEngineConfiguration standaloneProcessEngineConfiguration = new StandaloneInMemProcessEngineConfiguration();
    standaloneProcessEngineConfiguration.setProcessEngineName(getClass().getName() + "-engine1");
    standaloneProcessEngineConfiguration.setJdbcUrl("jdbc:h2:mem:jobexecutor-test-engine");
    standaloneProcessEngineConfiguration.setJobExecutorActivate(false);
    standaloneProcessEngineConfiguration.setJobExecutor(jobExecutor);
    ProcessEngine engine = standaloneProcessEngineConfiguration.buildProcessEngine();
   
    jobExecutor.registerProcessEngine((ProcessEngineImpl) engine);
       
       
    engine.getRepositoryService().createDeployment()
View Full Code Here

  }
 
  @Test
  public void testExecuteJobsForTwoEnginesSameAcquisition() {
    // configure and build a process engine
    StandaloneProcessEngineConfiguration engineConfiguration1 = new StandaloneInMemProcessEngineConfiguration();
    engineConfiguration1.setProcessEngineName(getClass().getName() + "-engine1");
    engineConfiguration1.setJdbcUrl("jdbc:h2:mem:activiti1");
    engineConfiguration1.setJobExecutorActivate(false);
    engineConfiguration1.setJobExecutor(jobExecutor);
    ProcessEngine engine1 = engineConfiguration1.buildProcessEngine();
   
    // and a second one
    StandaloneProcessEngineConfiguration engineConfiguration2 = new StandaloneInMemProcessEngineConfiguration();
    engineConfiguration2.setProcessEngineName(getClass().getName() + "engine2");
    engineConfiguration2.setJdbcUrl("jdbc:h2:mem:activiti2");
    engineConfiguration2.setJobExecutorActivate(false);
    engineConfiguration1.setJobExecutor(jobExecutor);
    ProcessEngine engine2 = engineConfiguration2.buildProcessEngine();
              
    jobExecutor.registerProcessEngine((ProcessEngineImpl) engine1);
    jobExecutor.registerProcessEngine((ProcessEngineImpl) engine2);
   
    // stop the acquisition
View Full Code Here

 
 
  @Test
  public void testJobAddedGuardForTwoEnginesSameAcquisition() throws InterruptedException {
// configure and build a process engine
    StandaloneProcessEngineConfiguration engineConfiguration1 = new StandaloneInMemProcessEngineConfiguration();
    engineConfiguration1.setProcessEngineName(getClass().getName() + "-engine1");
    engineConfiguration1.setJdbcUrl("jdbc:h2:mem:activiti1");
    engineConfiguration1.setJobExecutorActivate(false);
    engineConfiguration1.setJobExecutor(jobExecutor);
    ProcessEngine engine1 = engineConfiguration1.buildProcessEngine();
   
    // and a second one
    StandaloneProcessEngineConfiguration engineConfiguration2 = new StandaloneInMemProcessEngineConfiguration();
    engineConfiguration2.setProcessEngineName(getClass().getName() + "engine2");
    engineConfiguration2.setJdbcUrl("jdbc:h2:mem:activiti2");
    engineConfiguration2.setJobExecutorActivate(false);
    engineConfiguration1.setJobExecutor(jobExecutor);
    ProcessEngine engine2 = engineConfiguration2.buildProcessEngine();
              
    jobExecutor.registerProcessEngine((ProcessEngineImpl) engine1);
    jobExecutor.registerProcessEngine((ProcessEngineImpl) engine2);
   
    // stop the acquisition
View Full Code Here

@Configuration
public class ExampleConfiguration {

  @Bean
  public ProcessEngineConfiguration processEngineConfiguration() {
    return new StandaloneInMemProcessEngineConfiguration().setJobExecutorDeploymentAware(true);
  }
View Full Code Here

  public static ProcessEngineConfiguration createStandaloneProcessEngineConfiguration() {
    return new StandaloneProcessEngineConfiguration();
  }

  public static ProcessEngineConfiguration createStandaloneInMemProcessEngineConfiguration() {
    return new StandaloneInMemProcessEngineConfiguration();
  }
View Full Code Here

TOP

Related Classes of org.camunda.bpm.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.