AnsweredAssumed Answered

newbie using Activiti 6 and Springboot 2.0.1

Question asked by listert on Jul 5, 2018
Latest reply on Jul 9, 2018 by listert


I'm finding it difficult to configure Activiti into a Spingboot application api.

First of all is it a viable thing to embed Activiti into an API type application for use within that application or should Activiti be run standalone - we are not going Activiti 7 while its in early release stages.

The error is due to bean definition but I'm not sure where the beans should be defined and how - if thats correct approach for version 6. Our standards with Springhboot 2 is to annotate beans in java rather than xml context.


any pointers to relevant pages appreciated


so far I have...





<?xml version="1.0" encoding="UTF-8"?>
    <process id="oneTaskProcess" name="The One Task Process">
        <startEvent id="theStart" />
        <sequenceFlow id="flow1" sourceRef="theStart" targetRef="theTask" />
        <userTask id="theTask" name="my task" />
        <sequenceFlow id="flow2" sourceRef="theTask" targetRef="theEnd" />
        <endEvent id="theEnd" />



public class Application {

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

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

return new CommandLineRunner() {
public void run(String... strings) throws Exception {
System.out.println("Number of process definitions : "
+ repositoryService.createProcessDefinitionQuery().count());
System.out.println("Number of tasks : " + taskService.createTaskQuery().count());
System.out.println("Number of tasks after process start: " + taskService.createTaskQuery().count());


and getting error
APPLICATION FAILED TO START\r\n***************************\r\n\r\nDescription:\r\n\r\nParameter 0 of method init in required a bean of type 'org.activiti.engine.RepositoryService' that could not be found.\r\n\r\n\r\nAction:\r\n\r\nConsider defining a bean of type 'org.activiti.engine.RepositoryService' in your configuration.\r\n","logger_name":"org.springframework.boot.diagnostics.LoggingFailureAnalysisReporter","thread_name":"restartedMain","level":"ERROR","level_value":40000}