This example demonstrates how you can build a Spring Boot application with the embedded Camunda enterprise version.
- Embedded Camunda Engine
- Camunda Enterprise web applications automatically deployed
- Process application and one BPMN process deployed
- Admin user configured with login and password configured in
application.yaml
- "All" filter automatically created in task-list
- automatic use of a
camunda-license.txt
It also contains a simple integration test, showing how this can be tested.
You will need:
- credentials to access the enterprise repo in your
settings.xml
- a valid camunda-license key file in your classpath in the file
camunda-license.txt
- To embed the Camunda Engine with Enterprise webapps you must add the following maven coordinates to your
pom.xml
:
...
<properties>
<camunda.version>7.11.0-ee</camunda.version>
</properties>
<dependencyManagement>
<dependencies>
...
<dependency>
<groupId>org.camunda.bpm</groupId>
<artifactId>camunda-bom</artifactId>
<version>${camunda.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter-webapp-ee</artifactId>
<version>3.3.1</version>
</dependency>
...
</dependencies>
...
- With Spring Boot you usually create an "application" class annotated with
@SpringBootApplication
. In order to have the Camunda process application registered, you can simply add the annotation@EnableProcessApplication
to the same class and also include aprocesses.xml
file to yourMETA-INF
folder:
@SpringBootApplication
@EnableProcessApplication
public class EnterpriseWebappExampleApplication {
public static void main(String... args) {
SpringApplication.run(EnterpriseWebappExampleApplication.class, args);
}
}
-
You can also put BPMN, CMMN and DMN files in your classpath, they will be automatically deployed and registered within the process application.
-
If you want your Camunda license automatically used on Engine startup, just put the file with the name
camunda-license.txt
on your classpath.
You can build the application with mvn clean install
and then run it with the java -jar
command.
Then you can access the Camunda Webapps in your browser: http://localhost:8080
(provide login/password from application.yaml
)