Springboot+Rest+BPM+BPMN

Hi Team,

I am new to this concept and need indepth clarity.
Scenario: I have sample (developed in springboot rest) where I pass name in json(using soapui/chrome extn/anytool) and get details from db(Postgres)

Question:
1.For this how to create bpmn file. Understanding is we have to create before we develop this program. If yes then how do we now the class and flow to create?

  • Can we create .bpmn file from springboot rest?
    2.Now to this program how can intrgrate camunda and what features we can add?
  • I used
    @EventListener
    private void processPostDeploy(PostDeployEvent event) {
    runtimeService.startProcessInstanceByKey(“test”);
    }
  1. How to syn bpmn with logic we write.
  • In bpmn I can have request - 7-8 tasks and then end but in program I have only 4 task, consume request(start), send query to db(task) and then get the response(task) end.

but its working as log or like universal log. Please explain on how to create(bpmn and rest project) and use.
If you have a sample from creating of bpmn and same to use in craeting a rest based springboot, it will be in flow and clear to many of developers in details.

Explain scenariobased and when to choose and how to decide during bpmn creation