Java Code Examples for org.camunda.bpm.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration#setProcessEngineName()

The following examples show how to use org.camunda.bpm.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration#setProcessEngineName() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: StandaloneDebugWebsocketBootstrap.java    From camunda-bpm-workbench with GNU Affero General Public License v3.0 6 votes vote down vote up
public static void main(String[] args) {

    // start process engine
    StandaloneInMemProcessEngineConfiguration processEngineConfiguration = new StandaloneInMemProcessEngineConfiguration();
    processEngineConfiguration.setProcessEngineName(ProcessEngines.NAME_DEFAULT);

    // add plugins
    List<ProcessEnginePlugin> processEnginePlugins = processEngineConfiguration.getProcessEnginePlugins();
    processEnginePlugins.add(new DebuggerPlugin());
    processEnginePlugins.add(new SpinProcessEnginePlugin());
    processEnginePlugins.add(new ConnectProcessEnginePlugin());

    processEngineConfiguration.buildProcessEngine();

    DebugSessionFactory.getInstance().setSuspend(false);

    // start debug server
    DebugWebsocket debugWebsocket = null;
    try {

      // configure & start the server
      debugWebsocket = new DebugWebsocketConfiguration()
        .port(9090)
        .startServer();

      // block
      debugWebsocket.waitForShutdown();

    } finally {
      if(debugWebsocket != null) {
        debugWebsocket.shutdown();
      }
    }

  }
 
Example 2
Source File: HistoryLevelTest.java    From camunda-bpm-platform with Apache License 2.0 5 votes vote down vote up
protected ProcessEngineConfigurationImpl createConfig() {
  StandaloneInMemProcessEngineConfiguration configuration = new StandaloneInMemProcessEngineConfiguration();
  configuration.setProcessEngineName("process-engine-HistoryTest");
  configuration.setDbMetricsReporterActivate(false);
  configuration.setJdbcUrl("jdbc:h2:mem:HistoryTest");
  return configuration;
}
 
Example 3
Source File: DatabaseHistoryPropertyAutoTest.java    From camunda-bpm-platform with Apache License 2.0 5 votes vote down vote up
private static ProcessEngineConfigurationImpl config(final String schemaUpdate, final String historyLevel) {
  StandaloneInMemProcessEngineConfiguration engineConfiguration = new StandaloneInMemProcessEngineConfiguration();
  engineConfiguration.setProcessEngineName(UUID.randomUUID().toString());
  engineConfiguration.setDatabaseSchemaUpdate(schemaUpdate);
  engineConfiguration.setHistory(historyLevel);
  engineConfiguration.setDbMetricsReporterActivate(false);
  engineConfiguration.setJdbcUrl("jdbc:h2:mem:DatabaseHistoryPropertyAutoTest");

  return engineConfiguration;
}
 
Example 4
Source File: DetermineHistoryLevelCmdTest.java    From camunda-bpm-platform with Apache License 2.0 5 votes vote down vote up
private static ProcessEngineConfigurationImpl config(final String schemaUpdate, final String historyLevel) {
  StandaloneInMemProcessEngineConfiguration engineConfiguration = new StandaloneInMemProcessEngineConfiguration();
  engineConfiguration.setProcessEngineName(UUID.randomUUID().toString());
  engineConfiguration.setDatabaseSchemaUpdate(schemaUpdate);
  engineConfiguration.setHistory(historyLevel);
  engineConfiguration.setDbMetricsReporterActivate(false);
  engineConfiguration.setJdbcUrl("jdbc:h2:mem:DatabaseHistoryPropertyAutoTest");

  return engineConfiguration;
}
 
Example 5
Source File: MultiEngineCommandContextTest.java    From camunda-bpm-platform with Apache License 2.0 4 votes vote down vote up
private ProcessEngine createProcessEngine(String name) {
  StandaloneInMemProcessEngineConfiguration processEngineConfiguration = new StandaloneInMemProcessEngineConfiguration();
  processEngineConfiguration.setProcessEngineName(name);
  processEngineConfiguration.setJdbcUrl(String.format("jdbc:h2:mem:%s", name));
  return processEngineConfiguration.buildProcessEngine();
}