Why is there no documentation for Spring Boot and Camunda side by side execution

Hi,

I am using Spring Boot as my backend for my application. The Spring Boot need to have a REST API.

Also I want to have Camunda with it for BPM.

On the whole internet I cannot find even one tutorial, that shows, how I can have the following:

localhost:8081 --> REST API calls (that in turn uses runtimeService to do actions on camunda processes, e.g. start new process instance)
localhost:8080 --> Camunda web app/dashboard

All the tutorials explain only (for Spring Boot + Camunda) how to get to the dashboard. Thats all. Noone explains how I can have a REST API alongside the Camunda.

There’s nothing to special about having the REST API and spring boot integrated.
Just add the spring boot starter to your pom file.

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

the default end point is http://localhost:8080/rest/
Then you can take a look at the detailed docs on the REST API or you can follow this video.

No, thats not what I mean! I dont mean the REST API offered by Camunda. I mean my own REST API, that I created myself. But never mind, I figured out, how to do it:

So in the same Spring project, I have my own controller:

@RestController
@RequestMapping("/v1/user")
public class OrderController {

    @Autowired
    private RuntimeService runtimeService;

    @GetMapping(value = "/company")
    public String index() {
        runtimeService.startProcessInstanceByKey("OrderProcess");
        return "index";
    }


}

So now I can call the camunda dashboard on localhost:8080/app/cockpit...

and I can make rest call: http://localhost:8080/v1/user/company which in turn does something on the process.

:grinning:

@derweise you need to register your custom rest controller classes to access via engine services.

@Override
  protected void registerAdditionalResources() {
    register(OrderController.class);
    CamundaRestResources.getResourceClasses().add(OrderController.class);
  }