一、DmnEngineConfiguration创建实例

DmnEngineConfiguration 提供了7个公共的静态方法,用于创建自身实例。

其中5个是使用spring的机制加载配置文件。

另外2个是Standalone形式的,代码如下:

    public static DmnEngineConfiguration createStandaloneDmnEngineConfiguration() {
        return new StandaloneDmnEngineConfiguration();
    }

    public static DmnEngineConfiguration createStandaloneInMemDmnEngineConfiguration() {
        return new StandaloneInMemDmnEngineConfiguration();
    }

根据前面的分析,StandaloneDmnEngineConfiguration没有添加任何的代码,完全等同与父类;

而StandaloneInMemDmnEngineConfiguration只是修改了父类的jdbc url的参数,设置为h2数据库的配置。

二、DmnEngine构建

DmnEngineConfiguration实例创建后,调用buildDmnEngine(),获得DmnEngine的实例。

    public DmnEngine buildDmnEngine() {
        init();
        return new DmnEngineImpl(this);
    }

三、服务初始化

在init()方法里面做了很多初始化的工作。这里只说和DmnEngine相关的。

protected void init() {
...
initServices();
...
}

 protected void initServices() {
        initService(dmnManagementService);
        initService(dmnRepositoryService);
        initService(ruleService);
        initService(dmnHistoryService);
    }

    protected void initService(Object service) {
        if (service instanceof ServiceImpl) {
            ((ServiceImpl) service).setCommandExecutor(commandExecutor);
        }
    }

上面代码将DmnEngineConfiguration的 commandExecutor属性赋值给这四个服务。实际上,commandExecutor是DmnEngineConfiguration父类 AbstractEngineConfiguration的属性。

这四个服务的代码如下:

protected DmnManagementService dmnManagementService = new DmnManagementServiceImpl();
    protected DmnRepositoryService dmnRepositoryService = new DmnRepositoryServiceImpl();
    protected DmnRuleService ruleService = new DmnRuleServiceImpl();
    protected DmnHistoryService dmnHistoryService = new DmnHistoryServiceImpl();

这四个服务有相同的父类: ServiceImpl

ServiceImpl包含一个CommandExecutor属性。这四个服务的方法都是通过CommandExecutor实现代理模式来完成的。

flowable DmnEngine和DmnEngineConfiguration的更多相关文章

  1. flowable 五个引擎和组成引擎的服务

    一.flowable的五个引擎 flowable包含五个引擎,分别是: 1.内容引擎 ContentEngine 2.身份识别引擎 IdmEngine 3.表单引擎 FormEngine 4.决策引擎 ...

  2. flowable EngineConfiguration的实现分析(2)

    EngineConfiguration的实现类是一个抽象类:AbstractEngineConfiguration 一.引擎配置的分类 继承 AbsractEngineConfiguration的子类 ...

  3. flowable EngineConfiguration的作用和继承关系(1)

    EngineConfiguration 是flowable引擎的核心部件. 在 flowable 中,实现引擎配置的顶层类是 AbstractEngineConfiguration 这是一个抽象类. ...

  4. RxJava2出现:Unable to create call adapter for io.reactivex.Flowable

    前面一直使用的是Rxjava 1.x 版本,最近 Rxjava 2.x 版本发布了,并且支持了背压,便换成了 Rxjava 2.x 版本.更换之后出现了下面的错误. Caused by: java.l ...

  5. flowable设计器插件安装

    原文地址:http://www.shareniu.com/ 工欲善其事必先利其器,要想使用flowable,必须搭建一套环境,本文以Eclipse中安装flowable插件为例详细说明整个安装过程. ...

  6. 工作流引擎 Flowable 6.0.0.RC1 release,完全兼容Activi

    Flowable 6.0.0.RC1 release,第一个可流动的6引擎版本(6.0.0.RC1). Flowable 6.0.0.RC1 relase新增加的功能以及特色: 包重命名为org.Fl ...

  7. 工作流程引挈 https://www.flowable.org/

    工作流程引挈 :   https://www.flowable.org/ 起源:JBPM,Activiti

  8. Android RxJava 2 的用法 just 、from、map、subscribe、flatmap、Flowable、Function、Consumer ...【转】

    先简单说说RxJava的用途与价值 原文出处:Android RxJava 2 的用法 用途: 异步 (也就是开线程跳转) 价值: 面对复杂的逻辑,它依然 简洁 ,代码 易读 RxJava2 与 Rx ...

  9. flowable 的ProcessEngine配置

    1 flowable process engine 是通过  flowable.cfg.xml 配置文件配置的.在spring 环境中是使用 flowable-context.xml 配置文件的, P ...

随机推荐

  1. 20145310 《Java程序设计》第8周学习总结

    20145310 <Java程序设计>第8周学习总结 教材学习内容总结 本周主要进行第十四章和第十五章的学习. 第十四章 NIO使用频道(channel)来衔接数据节点,对数据区的标记提供 ...

  2. 20145314郑凯杰 《Java程序设计》第4周学习总结

    20145314郑凯杰 <Java程序设计>第4周学习总结 所有代码已上传: 教材学习内容总结 ①继承 设计程序中,因们需要设计多个模块,我想到了李晓东以前教我们的三个字"模块化 ...

  3. linux块设备读写流程

    在学习块设备原理的时候,我最关系块设备的数据流程,从应用程序调用Read或者Write开始,数据在内核中到底是如何流通.处理的呢?然后又如何抵达具体的物理设备的呢?下面对一个带Cache功能的块设备数 ...

  4. 关于JavaScript对象中的一切(一) -- 对象属性

    先上一张我制作的脑图.

  5. hadoop随手笔记

    1.Hadoop Streaming 是为了方便不太熟悉java用户编写MR程序的工具.用户可以将任何可执行文件(C++)或者脚本(python,ruby)作为Mapper/Reducer, 提高了效 ...

  6. 如何为openwrt中的某个模块生成PKG_MIRROR_HASH

    答:介绍两种方法,第一种自动生成(当然使用自动的啦),第二种手动生成 第一种方法: 1.在软件包的Makefile中让此项写成这样PKG_MIRROR_HASH:=skip  (如果不加上skip,那 ...

  7. [Hdu6315]Naive Operations

    题意:给定一个初始数组b和一个初始值全部为0的数组a,每次操作可以在给定的区间(l,r)内让a[i](l=<i<=r)加一,或者查询区间区间(l,r)中a[i]/b[i](l=<i& ...

  8. bellman-ford(可判负权回路+记录路径)

    #include<iostream> #include<cstdio> using namespace std; #define MAX 0x3f3f3f3f #define ...

  9. 01_zookeeper简介(刷新)

    1. 分布式系统及其问题 zookeeper是帮助我们构建分布式系统的一个软件(协调员的角色)首先,我们要明白分布式系统以及它的问题,之后才能理解为什么有zookeeper 1.1 分布式系统 分布式 ...

  10. Entity Framework 基于Oracle的code first 问题汇总

    1. 在code first 在数据库中建表时,需要指定schema, 默认是dbo, 需要改成我们的oracle登录名 protected override void OnModelCreating ...