The second option is great for testing: {@link #createStandalonInMemeProcessEngineConfiguration()}
ProcessEngine processEngine = ProcessEngineConfiguration .createStandaloneInMemProcessEngineConfiguration() .buildProcessEngine();This creates a new process engine with all the defaults to connect to an memory h2 database (jdbc:h2:tcp://localhost/activiti) in standalone mode. The DB schema strategy default is in this case
create-drop
. Standalone mode means that Activiti will manage the transactions on the JDBC connections that it creates. One transaction per service method. On all forms of creating a process engine, you can first customize the configuration before calling the {@link #buildProcessEngine()} method by calling any of the setters like this:
ProcessEngine processEngine = ProcessEngineConfiguration .createProcessEngineConfigurationFromResourceDefault() .setMailServerHost("gmail.com") .setJdbcUsername("mickey") .setJdbcPassword("mouse") .buildProcessEngine();@see ProcessEngines @author Tom Baeyens
The second option is great for testing: {@link #createStandalonInMemeProcessEngineConfiguration()}
ProcessEngine processEngine = ProcessEngineConfiguration .createStandaloneInMemProcessEngineConfiguration() .buildProcessEngine();This creates a new process engine with all the defaults to connect to an memory h2 database (jdbc:h2:tcp://localhost/activiti) in standalone mode. The DB schema strategy default is in this case
create-drop
. Standalone mode means that Activiti will manage the transactions on the JDBC connections that it creates. One transaction per service method. On all forms of creating a process engine, you can first customize the configuration before calling the {@link #buildProcessEngine()} method by calling any of thesetters like this:
ProcessEngine processEngine = ProcessEngineConfiguration .createProcessEngineConfigurationFromResourceDefault() .setMailServerHost("gmail.com") .setJdbcUsername("mickey") .setJdbcPassword("mouse") .buildProcessEngine();@see ProcessEngines @author Tom Baeyens
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|