Embedded engine without Spring Boot

Hi,

I’m very new and interested by Camunda. I’m evaluating the best way to integrate it in our application (a REST API build with Jersey and execute in Tomcat 9, we don’t use Spring Boot).

We are currently evaluating the different architecture solutions (camunda-bpm-platform-architecture).

I tried the Shared, Container-Managed Process Engine to begin, it works great but we have to use the Camunda Tomcat distribution, so I want to try the Embedded Process Engine to be independent of the application server. (It may be a bad choice but it just a test for the moment).

And I’m stuck while trying it, I add the following dependency in our pom.xml:

<dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>org.camunda.bpm</groupId>
      <artifactId>camunda-bom</artifactId>
      <version>7.8.0</version>
      <scope>import</scope>
      <type>pom</type>
    </dependency>
  </dependencies>
</dependencyManagement>

<!-- [...] -->

<dependencies>
  <dependency>
    <groupId>org.camunda.bpm</groupId>
    <artifactId>camunda-engine</artifactId>
  </dependency>
</dependencies>

I add camunda.cfg.xml, META-INF/bpm-platform.xml and META-INF/processes.xml in my app, so they are available in my classpath.

Nothing important in these files, I copied them from the documentation and just change my database configuration in camunda.cfg.xml which seems to works.

But I suspect the bpm-platform.xml to be ignored by the engine because I get an error when I run the following code:

var engine = ProcessEngineConfiguration.createProcessEngineConfigurationFromResourceDefault().buildProcessEngine();

// org.camunda.bpm.engine.ProcessEngineException: historyLevel mismatch: configuration says HistoryLevelAudit(name=audit, id=2) and database says HistoryLevelFull(name=full, id=3)

The configuration in my bpm-platform.xml is not loaded, I check it with a debug point just before the exception. My bpm-platform.xml contains the following property:

<properties>
  <property name="history">full</property>
</properties>

But the actual ProcessEngineConfigurationImpl object contains the following property:

According to the documentation (configure-location-of-the-bpm-platform-xml-file), the engine should looks like in my classpath:

  1. META-INF/bpm-platform.xml exists on the classpath

I checked the first three points, the JNDI entry is not set, the environment variable and the system property neither.

I looked for embedded engine example in your Github but I only found examples with Spring Boot so not applicable in my case.

Any help would be appreciated :grinning: