Class ProcessEngineConfiguration

Direct Known Subclasses:
ProcessEngineConfigurationImpl

public abstract class ProcessEngineConfiguration extends AbstractEngineConfiguration
Configuration information from which a process engine can be build.

Most common is to create a process engine based on the default configuration file:

 ProcessEngine processEngine = ProcessEngineConfiguration.createProcessEngineConfigurationFromResourceDefault().buildProcessEngine();
 

To create a process engine programmatic, without a configuration file, the first option is createStandaloneProcessEngineConfiguration()

 ProcessEngine processEngine = ProcessEngineConfiguration.createStandaloneProcessEngineConfiguration().buildProcessEngine();
 

This creates a new process engine with all the defaults to connect to a remote h2 database (jdbc:h2:tcp://localhost/flowable) in standalone mode. Standalone mode means that the process engine will manage the transactions on the JDBC connections that it creates. One transaction per service method. For a description of how to write the configuration files, see the userguide.

The second option is great for testing: createStandaloneInMemProcessEngineConfiguration()

 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/flowable) in standalone mode. The DB schema strategy default is in this case create-drop. Standalone mode means that Flowable 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 buildProcessEngine() method by calling any of the setters like this:

 ProcessEngine processEngine = ProcessEngineConfiguration.createProcessEngineConfigurationFromResourceDefault().setMailServerHost("gmail.com").setJdbcUsername("mickey").setJdbcPassword("mouse")
         .buildProcessEngine();
 
Author:
Tom Baeyens
See Also: