xxxxxxxxxx
import org.camunda.bpm.engine.RuntimeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class WorkflowController {
@Autowired
private RuntimeService runtimeService;
@GetMapping("/api/start-process")
public String startProcess() {
runtimeService.startProcessInstanceByKey("process_key");
return "Process started";
}
}