我正在尝试将 Spring Boot 2.0.2 与 Flowable 6.3.1 集成。并遇到无法从资源/进程/文件夹部署进程 one-task-process.bpmn20.xml 的问题。XML 文件没有被拾取并且错误说:
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
我的 Spring Boot Application Starter 文件如下,它还打印出不包含进程文件夹的类路径。
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());
}
};
}
}
我将不胜感激任何帮助。