Skip to main content
You can use a Spring application context XML file to bootstrap the process engine. It is possible to bootstrap both application-managed and container-managed process engines through Spring. Note that you can also use a Spring JavaConfig for bootstrapping instead of XML.

Configure an Application-Managed Process Engine

The ProcessEngine can be configured as a regular Spring bean. The starting point of the integration is the class org.camunda.bpm.engine.spring.ProcessEngineFactoryBean. That bean takes a process engine configuration and creates the process engine. This means that the creation and configuration of properties for Spring is the same as documented in the configuration section. For Spring integration the configuration and engine beans will look like this:
Note that the processEngineConfiguration bean uses the SpringProcessEngineConfiguration class.

Configure a Container-Managed Process Engine as a Spring Bean

If you want the process engine to be registered with the ASEE Flow ProcessEngineService, you must use org.camunda.bpm.engine.spring.container.ManagedProcessEngineFactoryBean instead of the ProcessEngineFactoryBean shown in the example above. You will also need to ensure:
  1. That none of your webapps include camunda-webapp*.jar within their own lib folder, this should be at a shared level.
  2. That your server.xml contains JNDI entries for the ‘ProcessEngineService’ and ‘ProcessApplicationService’ as below:
In that case the constructed process engine object is registered with ASEE Flow and can be referenced for creating process application deployments and exposed through the runtime container integration.

Configure a Process Engine Plugin

In Spring you can configure a process engine plugin by setting a list value to the processEnginePlugins property of the processEngineConfiguration bean:

Using Spring JavaConfig

In addition to the Spring application context XML file, you can bootstrap the process engine using Spring JavaConfig. The configuration class can look like this:
Note that you can define your custom beans in the configuration class, in combination with an additional XML file or using component scan. The following example adds a component scan to the configuration class to detect and instantiate all beans in the package “com.example”.