AnsweredAssumed Answered

How spring boot work with activiti?

Question asked by hank on Apr 23, 2018
Latest reply on Apr 25, 2018 by hank

I use Spring boot 2.0.1.RELEASE with Activiti  5.22.0 and write a init method in start application:


CommandLineRunner init(final RepositoryService repositoryService, final RuntimeService runtimeService,
final TaskService taskService) {

   return new CommandLineRunner() {

      public void run(String... strings) throws Exception {
      Map<String, Object> variables = new HashMap<String, Object>();
      variables.put("applicantName", "John Doe");
      variables.put("email", "");
      variables.put("phoneNumber", "123456789");
      runtimeService.startProcessInstanceByKey("hireProcess", variables);



run but comes out the error below:


Parameter 0 of method init in com.test.Test required a bean of type 'org.activiti.engine.RepositoryService' that could not be found.



Consider defining a bean of type 'org.activiti.engine.RepositoryService' in your configuration.

and i try use Activiti or Activiti 6.0.0 is ok, i don't know why?