04-23-2018 03:47 AM
I use Spring boot 2.0.1.RELEASE with Activiti 5.22.0 and write a init method in start application:
@Bean
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", "john.doe@activiti.com");
variables.put("phoneNumber", "123456789");
runtimeService.startProcessInstanceByKey("hireProcess", variables);
}
};
}
run but comes out the error below:
Description:
Parameter 0 of method init in com.test.Test required a bean of type 'org.activiti.engine.RepositoryService' that could not be found.
Action:
Consider defining a bean of type 'org.activiti.engine.RepositoryService' in your configuration.
and i try use Activiti 5.19.0.2 or Activiti 6.0.0 is ok, i don't know why?
04-23-2018 06:16 AM
You can use Activiti 6 which should work with Spring Boot 1.5, but the main focus of Activiti 7 is to build things on top Spring Boot 2.x. You can take a look at our Runtime Bundle Starter module here:
and an example here:
example-runtime-bundle/pom.xml at develop · Activiti/example-runtime-bundle · GitHub
For our cloud deployments.
Can you please elaborate what kind of application are you trying to build? Where are you planning to run your SB app?
04-23-2018 08:41 PM
Thanks for reply. Now i just test how to use Spring boot work with Activiti well, and next i will use Spring Cloud build a microservies stystem.
04-23-2018 08:36 PM
Thanks for reply. Now i just test how to use Spring boot work with Activiti well, and next i will use Spring Cloud build a microservies stystem.
04-24-2018 08:33 AM
Great, when you start looking at Spring Cloud make sure that you check our Activiti Cloud approach, already using all the goodness of Spring Cloud, Docker and targeting Kubernetes for microservices deployments
04-25-2018 01:57 AM
Ok! Thanks for suggestion.
Explore our Alfresco products with the links below. Use labels to filter content by product module.