How to run bpmn file outside the jar

Hi Team,

I have a spring boot application and want to keep the bpmn file outside the jar file and want to pass it from external path.
Could you please suggest, how can I achieve it?

Hello @shivzee

Actually deployed process definitions are stored in the process engine database. Your bpmn inside jar is used for convenient autodeployment. You can switch it off (see process.xml (property isScanForProcessDefinitions) and @EnableProcessApplication, .yml: auto-deployment-enabled: false). Then you need some (startup) code to deploy your bpmn with API from any other location.
best regards
R

To enable the REST API you can use the following starter in your pom.xml :

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

By default the application path is engine-rest , so without any further configuration you can access the api at http://localhost:8080/engine-rest .

Deploy the bpmn file using camunda rest api:

POST /deployment/create

DOC: Post Deployment | docs.camunda.org