Sunil Kosuri
Sunil Kosuri

Reputation: 99

Spring Boot 2.0.2 + Flowable 6.3.1 Process Deployment

I am trying to integrate Spring Boot 2.0.2 with Flowable 6.3.1. and running into a problem where I am unable to deploy a process one-task-process.bpmn20.xml from the resources/processes/ folder. The XML file is not being picked up and the error says:

Caused by: org.flowable.engine.common.api.FlowableIllegalArgumentException: resource 'one-task-process.bpmn20.xml' not found
    at org.flowable.engine.impl.repository.DeploymentBuilderImpl.addClasspathResource(DeploymentBuilderImpl.java:80) ~[flowable-engine-6.3.0.jar:6.3.0]
    at com.stsi.pss.Application$1.run(Application.java:458) ~[classes/:na]
    at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:797) [spring-boot-2.0.2.RELEASE.jar:2.0.2.RELEASE]
    ... 10 common frames omitted

My Spring Boot Application Starter file is as follows and it also prints out the class path which does not include the processes folder.

imports...

@Configuration
@ComponentScan
@EnableAutoConfiguration
@SpringBootApplication
public class Application {

    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }

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

        return new CommandLineRunner() {
            @Override
            public void run(String... strings) throws Exception {

                ClassLoader cl = ClassLoader.getSystemClassLoader();

                URL[] urls = ((URLClassLoader)cl).getURLs();

                for(URL url: urls){
                    System.out.println(url.getFile());
                }

                System.out.println("Number of process definitions : "
                        + repositoryService.createProcessDefinitionQuery().count());
                System.out.println("Number of tasks : " + taskService.createTaskQuery().count());
                runtimeService.startProcessInstanceByKey("oneTaskProcess");
                System.out.println("Number of tasks after process start: "
                        + taskService.createTaskQuery().count());
            }
        };
    }
}

I would appreciate any help.

Upvotes: 0

Views: 1560

Answers (1)

Sunil Kosuri
Sunil Kosuri

Reputation: 99

I made a mistake in naming the process definition file. I fixed the filename and the system is working as expected.

Upvotes: 1

Related Questions