【问题标题】:Spring Boot 2.0.2 + Flowable 6.3.1 Process DeploymentSpring Boot 2.0.2 + Flowable 6.3.1 流程部署
【发布时间】:2018-08-09 21:10:47
【问题描述】:

我正在尝试将 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());
            }
        };
    }
}

我将不胜感激。

【问题讨论】:

  • 不相关,但您可以删除这些注释:Configuration ComponentScan EnableAutoConfiguration
  • 您使用的是 Flowable 的哪些启动器?如何调用部署?是 Flowable 自动部署吗?

标签: spring-boot flowable


【解决方案1】:

我在命名流程定义文件时犯了一个错误。我修复了文件名,系统按预期工作。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-09-30
    • 2017-09-30
    • 2016-01-14
    • 2018-09-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-03-28
    相关资源
    最近更新 更多