首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Spring Boot 2.0.2 + Flowable 6.3.1流程部署

Spring Boot 2.0.2 + Flowable 6.3.1流程部署
EN

Stack Overflow用户
提问于 2018-08-10 05:10:47
回答 1查看 1.1K关注 0票数 0

我正在尝试集成Spring Boot 2.0.2和Flowable 6.3.1。并且遇到了一个问题,我无法从resources/ process /文件夹部署一个进程one-task-process.bpmn20.xml。未拾取XML文件,错误为:

代码语言:javascript
复制
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文件如下所示,它还打印出不包括进程文件夹的类路径。

代码语言:javascript
复制
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());
            }
        };
    }
}

如果有任何帮助,我将不胜感激。

EN

回答 1

Stack Overflow用户

发布于 2018-08-28 08:24:44

我在命名过程定义文件时犯了错误。我修复了文件名,系统运行正常。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/51775827

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档