一、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. crontab + rsyncd同步方案

    目的主机: rsync --daemon [root@iZ23ohdbxmrZ ~]# vim /etc/rsyncd.conf #global settingsport = 873pid file= ...

  2. 延迟环境变量扩展(bat)

    延迟环境变量扩展(bat) 之前遇到一些环境变量的问题,简单记录下 From:http://www.cnblogs.com/dongzhiquan/archive/2012/09/05/2671218 ...

  3. Linux下安装SVN服务端

    安装 使用yum安装非常简单: yum install subversion 配置 2.1. 创建仓库 我们这里在/home下建立一个名为svn的仓库(repository),以后所有代码都放在这个下 ...

  4. DBUS及常用接口介绍

    [原文]  1. 概述 1.1  DBUS概述     DBUS是一种高级的进程间通信机制.DBUS支持进程间一对一和多对多的对等通信,在多对多的通讯时,需要后台进程的角色去分转消息,当一个进程发消息 ...

  5. WPF圆角透明无边框窗体

    <Window x:Class="ImportData.MainWindow" xmlns="http://schemas.microsoft.com/winfx/ ...

  6. 数据库访问辅助类SqlHelper

    程序访问数据库需要进行的操作有创建与某个指定数据库的连接, 然后打开创建好的连接,创建执行指令(也就是sql执行代码), 最后执行指令,关闭创建的连接,释放资源. ado.net是一组用于和数据源进行 ...

  7. class文件直接修改_反编译修改class文件变量

    今天笔者同事遇到一个问题,客户同事的数据库连接信息直接写在代码中,连接的密码改了,但是又没有源代码,所以只能直接修改Java class文件. 记录一下修改步骤: 1.下载JClassLib_wind ...

  8. 如何优雅地使用 rm 防止误删除?

    IT 界的有一个老梗,一次某论坛的数据库管理员抱怨自己老板一直虐待他,结果他一气之下就删库跑路了...... 于是... 据新华社北京 8 月 20 日电 ,北京一软件工程师徐某离职后因公司未能如期结 ...

  9. ZooKeeper分布式锁简单实践

    ZooKeeper分布式锁简单实践 在分布式解决方案中,Zookeeper是一个分布式协调工具.当多个JVM客户端,同时在ZooKeeper上创建相同的一个临时节点,因为临时节点路径是保证唯一,只要谁 ...

  10. LeetCode第[73]题(Java):Set Matrix Zeroes(矩阵置0)

    题目:矩阵置0 难度:Easy 题目内容: Given a m x n matrix, if an element is 0, set its entire row and column to 0. ...