Guls
March 15, 2020, 9:33am
1
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?
matt
March 15, 2020, 11:30am
3
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
Guls
March 15, 2020, 3:55pm
5
Matt;
It works in IDE; but fails to load when in big fat jar.
src/main/resources under camunda-samples.jar
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>
matt
March 15, 2020, 5:46pm
6
Is the processes.xml in the samples jar or the main jar? As mine had to go in the jar with the bpmns
Guls
March 18, 2020, 5:50am
7
Thanks Matt. After moving processes.xml to samples jar. Works like charm!! both in IDE and as big fat jar.
11116
July 30, 2020, 8:36am
8
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?