Camunda Spring Boot - unable to pre-load bpmn Inside Jar

Hi;
I have a camunda spring boot engine with camunda-bpm-spring-boot-starter-rest and camunda-bpm-spring-boot-starter-webapp dependencies.
I also have ‘camunda-samples.jar’ as another depdendencies and it contains all my .bpmn files.
However when I start the engine; these bpmn flows are not getting pre-loaded.
I also have deployment-resource-pattern=classpath
:**/*.bpmn in application.properties file; but no luck.

What is it that I could be missing?

Do you have the processes.xml in your src/main/recources/META-INF? Do you have the @EnableProcessApplication on your App-Class?

Hi, I have recently done something similar.

So in my project with the bpmns and related resources the structure is as follows

with the contents of processes.xml

<process-application xmlns="http://www.camunda.org/schema/1.0/ProcessApplication">
  <process-archive name="included1">
    <properties>
      <property name="resourceRootPath">deployment/one</property>
      <property name="additionalResourceSuffixes">html</property>
    </properties>
  </process-archive>
  <process-archive name="included2">
    <properties>
      <property name="resourceRootPath">deployment/two</property>
      <property name="additionalResourceSuffixes">html</property>
    </properties>
  </process-archive>
</process-application>

in the main project to get this working we had to unpack the jar. So in the build.gradle

bootJar {
    requiresUnpack '**/deployment-example-included-bpmns*.jar'
}

Hope that helps

Matt

yes I do both.

Matt;
It works in IDE; but fails to load when in big fat jar.

src/main/resources under camunda-samples.jar

Capture

process xml

    <process-application xmlns="http://www.camunda.org/schema/1.0/ProcessApplication">
      <process-archive name="samples">
        <properties>
          <property name="resourceRootPath">samples</property>      
        </properties>
      </process-archive>  
    </process-application>

and unpackaged in pom.xml

<plugin>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-maven-plugin</artifactId>
				<configuration>
					<requiresUnpack>
						<requiresUnpack>
							<groupId>com.firm.camunda</groupId>
							<artifactId>camunda-samples</artifactId>
						</requiresUnpack>
					</requiresUnpack>
				</configuration>
			</plugin>

Is the processes.xml in the samples jar or the main jar? As mine had to go in the jar with the bpmns

Thanks Matt. After moving processes.xml to samples jar. Works like charm!! both in IDE and as big fat jar.

Hi, I have the same problem
I have the same package structure
but code work only in IDE and doesn’t work with jar
I need to move resources to jar?