项目地址:https://gitee.com/lwj/flowable.git 分支flowable-base
视频地址:https://www.bilibili.com/video/av79774697/
*DMN集成:
这里我们说的是springboot集成DMN
*
*

配置POM

这里我们用的版本是flowable 6.5.0

<!-- 配置DMN -->
        <dependency>
            <groupId>org.flowable</groupId>
            <artifactId>flowable-spring-boot-starter-dmn</artifactId>
            <version>${flowable.version}</version>
        </dependency>
        <dependency>
            <groupId>org.flowable</groupId>
            <artifactId>flowable-dmn-spring-configurator</artifactId>
            <version>${flowable.version}</version>
        </dependency>
        <dependency>
            <groupId>org.flowable</groupId>
            <artifactId>flowable-dmn-json-converter</artifactId>
            <version>${flowable.version}</version>
        </dependency>

配置Config

我们自己要定义个config 命名为:FlowableDmnConfig

@Configuration
public class FlowableDmnConfig implements EngineConfigurationConfigurer<SpringDmnEngineConfiguration> {

    @Override
    public void configure(SpringDmnEngineConfiguration configure) {
        //设置是否升级 false不升级  true升级
        configure.setDatabaseSchemaUpdate(ProcessEngineConfiguration.DB_SCHEMA_UPDATE_TRUE);
    }

    @Bean
    public DmnJsonConverter dmnJsonConverter(){
        return new DmnJsonConverter();
    }
    @Bean
    public DmnXMLConverter dmnXMLConverter(){
        return new DmnXMLConverter();
    }

}

通过上述的配置,现在在spring容器中已经存在一些接口bean了

//运行结果
DmnRuleService
DmnRepositoryService
DmnHistoryService
DmnManagementService

这些bean可以直接使用无需单独创建