Mutliple bpmn processes in springboot

Hi friends,
I am trying to use mutliple bpmn files in my spring boot project. I am new to Camunda so request you to please guide me on the following things:

  1. I have bpmn files for LoanApproval process, Credit Check process…etc. How can i set up all processes in the project/application/resources folder at once? I mean how to run springboot application for all the processes?
  2. I would like to invoke these processes from one of my nodejs microservice. I believe i can call the rest endpoints provided by individual processes (by their process keys). Pls guide me if there is any other better and efficient wy?
  3. I want to set up my own db (MySQL or Postgres ) for process engine. Can i set up one shared prostgres db (process engine db) for all the processes (running with mutliple spring boot projects)?

Hi @mahiman01,

If you add the @EnableProcessApplication annotation at the Spring boot main class, all BPMN files in src/main/resource will be deployed to the process engine.

No, that’s the way to go.

Yes, you will create a heterogenious cluster of process applications.

Hope this helps, Ingo

Thanks so much @Ingo_Richtsmeier for your kind response!!
One thing ask… I am trying rest calls like http://localhost:8080/engine-rest/deployment/create
from the springboot embedded process engine… but looks like i am missing something… i always get
{

"timestamp": "2022-01-26T11:29:52.226+00:00",

"status": 404,

"error": "Not Found",

"path": "/engine-rest/deployment/create"

}

My main java file:
SpringBootApplication
EnableProcessApplication
public class WebappExampleProcessApplication {

Autowired
private RuntimeService runtimeService;

public static void main(String… args) {
SpringApplication.run(WebappExampleProcessApplication.class, args);
}

EventListener
private void processPostDeploy(PostDeployEvent event) {
runtimeService.startProcessInstanceByKey(“loanApproval”);
}

}

applylication.yml file is:
camunda.bpm:

admin-user:

id: demo

password: demo

firstName: Demo

filter:

create: All tasks

Hi @mahiman01,

I assume you miss the camunda-bpm-spring-boot-starter-rest dependency in your pom file.
https://docs.camunda.org/manual/latest/user-guide/spring-boot-integration/rest-api/

Hope this helps, Ingo

yes Ingo… you are right.
thank you for all your help :slight_smile: