一、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. C++利用系统时间产生的随机数

    本文由青松原创并依GPL-V2及其后续版本发放,转载请注明出处且应包含本行声明. C++中常用rand()函数生成随机数,但严格意义上来讲生成的只是伪随机数(pseudo-random integra ...

  2. [BZOJ4756]Promotion Counting

    Description The cows have once again tried to form a startup company, failing to remember from past ...

  3. RabbitMQ Network Partitions

    Clustering and Network Partitions RabbitMQ clusters do not tolerate network partitions well. If you ...

  4. java基础笔试题二(集合关系)

    知识点:java集合继承关系(Collection,Map) 1.集合框架体系图 2.java的集合层次 来自博客(http://blog.csdn.net/stubbornaccepted/arti ...

  5. JDK 中的监控与故障处理工具-04 (jmap)

    jmap : memory map for java jmap 命令用于生成堆转储快照文件, 一般称为heapdump 或者 dump 文件.如果不是用 jmap 命令, 要获得 java 堆转储快照 ...

  6. 实现表单checkbox获取已选择的值js代码

    <input type="checkbox" name="cb" value="1" />aa <input type=& ...

  7. R中的sub替换函数【转】

    R中的grep.grepl.sub.gsub.regexpr.gregexpr等函数都使用正则表达式的规则进行匹配.默认是egrep的规则,也可以选用Perl语言的规则.在这里,我们以R中的sub函数 ...

  8. SVN 与Eclipse 关联 || 安装beyond 插件

    1.让本地svn代码与库建立联系   右击项目名称,Team -  share project 2.本地svn版本一般与Eaclipse svn插件 版本一致!http://subclipse.tig ...

  9. Amazon, Clear, Debian, Gentoo, Red Hat, SUSE & Ubuntu Performance On The EC2 Cloud

    https://www.phoronix.com/scan.php?page=article&item=ec2-holiday-2017&num=5

  10. MVC后台的几种跳转方法

    //当服务器执行到Response.Redirect语句时,会立即中断页面的生命周期,直接向客户端返回信息,让客户端进行重定向操作.302(暂时重定向) Response.Redirect(" ...