Create a Camunda Spring Boot Application

Goal

The goal of this lab is to create a spring boot application with the camunda-spring-boot-starter.

Short description

  • Create a new Maven project from our template at github.com/camunda-consulting/twitter-qa.
  • Import it into your IDE.
  • Check if you have access to the Camunda enterprise version. If your company is already an enterprise customer, you may find the dependency org.camunda.bpm.springboot:camunda-bpm-spring-boot-starter-webapp-ee:7.16.0-ee in your company maven proxy.
  • If you have access to the enterprise version of Camunda, change the camunda.version to the latest enterprise release and the dependency to the Camunda spring-boot starter webapp to camunda-bpm-spring-boot-starter-webapp-ee
  • Start the CamundaApplication and login to the (empty) Cockpit and Tasklist.

Detailed steps

  1. Download the project template as a zip file and unzip it to your computer in a folder. This will be your project folder.
  2. Import the pom.xml as an existing maven project into your IDE.
    • For the Eclipse IDE use File > Open Projects from Filesystem. Click on Directory, point to the parent folder of the pom.xml. The pom.xml should appear as a selection. Click on Finish
    • For IntelliJ use File > Open and navigate to the pom.xml file unzipped in Step 1. A dialog box should appear to open the pom.xml either as a project or file. Select Open as Project.
  3. Check with your Camunda administrator to see if your organization has access to the Enterprise version of Camunda either as a trial or as an actual license.
  4. If you have access to the Enterprise version and you don’t have have access to an maven mirror, you will need to enable the enterprise repository in the pom.xml at lines 98-111. Uncomment the camunda-bpm-nexus-ee repository and comment out the camunda-bpm-nexus repository using the <!-- --> comment tags.
  5. If you have access to the Enterprise version, change the camunda.version in the pom.xml at line 14 to the latest enterprise version, e.g. 7.16.0-ee like this <camunda.version>7.16.0-ee</camunda.version>. Ask your instructor about the latest available version.
  6. If you have access to the enterprise version, change the artifactId of the Camunda spring-boot starter webapp in line 59 of the pom.xml to the Enterprise version by appending -ee to it like this <artifactId>camunda-bpm-spring-boot-starter-webapp-ee</artifactId>.
  7. Run the application
    • For Eclipse IDE navigate to src > main > java > com.camunda.training, right click on the CamundaApplication class and select Run As > Java Application. Check the console to confirm the start of the spring boot application.
    • For IntelliJ you can either click on the run button as it should have recognized the Camunda application as a runnable resource or you can navigate to src > main > java > com.camunda.training and right click and select Run on CamundaApplication.
    • For the command line, navigate to your project folder and enter mvn clean spring-boot:run. Check the output for a successful start of the engine.
  8. Open your browser and point to localhost:8080/camunda/app/welcome/default/ and login with the user demo and the password demo.
  9. Accept or decline the telemetry meta and usage statistics collection.
  10. Inspect the (empty) Cockpit, Tasklist and Admin.
  11. Congratulations, you have successfully installed and started a Camunda application using Spring Boot.

On this Page: