How Camunda works with Spring Boot

Hello. I trying to create SPA with Spring Boot and Camunda.
I use Camunda starter dependency. I can easily start my process by using RuntimeService, but how can I manage tasks without Cockpit? I want to DemoDelegate do some stuff and then I don’t have to open Cockpit and press " complete" button on task. I tried to use TaskService, but somehow Spring injects null in taskService variable. Need your help. Here is some code:

public class Main extends SpringBootServletInitializer {

    private RuntimeService runtimeService;

    public static void main (String[] args) {, args);

    protected SpringApplicationBuilder configure (SpringApplicationBuilder application) {
        return application.sources(Main.class);

    private void processPostDeploy(PostDeployEvent event) {

public class DemoDelegate implements JavaDelegate {

    TaskService taskService;
    public void setTaskService (TaskService taskService) {
        this.taskService = taskService;

    public void execute (DelegateExecution execution) throws Exception {
        System.out.println("First task");
        taskService.claim("Activity_1m1jmwo", "demo"); // nullPointer
// some logic here

Seems like in your BPMN-servictask you are not using delegateExpression but class to reference your vode. Could you double check this?
Background: class uses free reflection/default constructor. (Which is another good reason to prefer constructor injection -> fail fast)