About process deployment rest call

Hi all,

I am new with camunda and when I download camunda from Camunda Platform Download Hub | Camunda and start start-camunda.bat, I can work with standalone-working camunda. When I use its process deployment rest api, I can deploy a new process without camunda restart requirement. Even though I stop camunda and start it again, the new process is still here. When I work with spring boot application embedded version of camunda, I can also make rest calls to deploy process and the new process can also be used without camunda restart. But the main issue is that if I stop the spring boot application and run it again, the new process doesn’t exist any more and the only processes that I can use are the ones under resources folder. Is there any one that can tell me difference between these two usage? What happens under the hood? Where does the standalone version stores the deployed processes?

My dependencies for spring boot application:

<dependency>
  <groupId>org.camunda.bpm.springboot</groupId>
  <artifactId>camunda-bpm-spring-boot-starter-rest</artifactId>
  <version>3.4.2</version>
</dependency>

<dependency>
  <groupId>org.camunda.bpm.springboot</groupId>
  <artifactId>camunda-bpm-spring-boot-starter-webapp</artifactId>
  <version>3.4.2</version>
</dependency>

<dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-starter-web</artifactId>
</dependency>

<dependency>
  <groupId>com.h2database</groupId>
  <artifactId>h2</artifactId>
</dependency>

Hi @alimercetin,

the main diffrence between the pre packaged distribution running in Tomcat and your Spring boot setup is, that the prepackaged distro uses a file based database where your Spring boot application uses an in memory database.

The in memory database is lost, once the jvm is stopped.

You can add the file based database in spring boot with adding this dependency to you pom:

    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-jdbc</artifactId>
    </dependency>

and configure this datasource in your application.yaml:

spring.datasource:
  url: jdbc:h2:./camunda-db;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
  username: sa
  password: sa

Hope this helps, Ingo

Hi @Ingo_Richtsmeier,

Thanks for your help. It works :slight_smile: