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?
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?
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.
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.
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
Ok! Thanks for suggestion.
Ask for and offer help to other Alfresco Process Services and Activiti Users and members of the Alfresco team.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.