一、CommandExecutor

ContentEngineConfiguration继承自 AbstractEngineConfiguration。

在 AbstractEngineConfiguration 中包含一个CommandExecutor 属性。

protected CommandExecutor commandExecutor;

二、ContentManagementService和ContentService

ContentEngineConfiguration中包含两个属性:

    protected ContentManagementService contentManagementService = new ContentManagementServiceImpl();

    protected ContentService contentService = new ContentServiceImpl();

三、创建ContentEngine

ContentEngine是通过调用ContentEngineConfiguration实例的buildContentEngine()完成创建的。

 public ContentEngine buildContentEngine() {
        init();
        return new ContentEngineImpl(this);
    }

1、传递CommandExecutor

在调用ContentEngineConfiguration的buildContentEngine()方法时,在 AbstractEngineConfiguration 中包含的CommandExecutor 属性被赋值给ServiceImpl。代码如下:

 protected void initServices() {
        initService(contentManagementService);
        initService(contentService);
    }

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

ServiceImpl是ContentService和ContentManagementService的父类,包含一个CommandExecutor 属性。(见下图)

至此,ContentEngineConfiguration 初始化了ContentService和ContentManagementService,并把父类中的CommandExecutor传递给了这两个类的实例。

2、构建ContentEngine

ContentEngineConfiguration被当作参数传递给ContentEngineImpl的构造方法。

 public ContentEngine buildContentEngine() {
        init();
        return new ContentEngineImpl(this);
    }

ContentEngineImpl通过ContentEngineConfiguration得到ConentService和ContentManagementService,并对外提供。

public ContentEngineImpl(ContentEngineConfiguration engineConfiguration) {
        this.engineConfiguration = engineConfiguration;
        this.name = engineConfiguration.getEngineName();
        this.managementService = engineConfiguration.getContentManagementService();
        this.contentService = engineConfiguration.getContentService();
        ...
 }

ContentEngine 提供的服务最终的执行者是ContentService和ContentManagementService的父类 ServiceImpl;

而 ServiceImpl的执行器是由 AbstractEngineConfiguration提供的。

flowable ContentEngine和ContentEngineConfiguration的关系的更多相关文章

  1. Android 异步框架 RxJava2

    观察者模式的概念 RxJava是android的异步框架,官方介绍是可观测的序列,组成异步基于事件程序的库.特点是观察者模式,基于事件流的链式调用,随着异步操作调度过程复杂的情况下,程序逻辑也变得越来 ...

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

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

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

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

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

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

  5. flowable表简要说明

    1. Flowable数据库表命名规则 ACT_RE_* ’RE’表示repository(存储).RepositoryService接口操作的表.带此前缀的表包含的是静态信息,如,流程定义,流程的资 ...

  6. 工作流选型专项,Camunda or flowable or?

    1. 名词解释 1.1. BPM Business Process Management,业务流程管理,“通过建模.自动化.管理和优化流程,打破跨部门跨系统业务过程依赖,提高业务效率和效果”. 1.2 ...

  7. Flowable—多实例任务:会签

    多实例任务 会签 什么是会签? 举个例子:比如我们有一个任务 可能需要多人审批,审批通过的条件可能比较多样,比如五个人审批.3个人审批过了就算过了,再或者有一个人权限比较高,拥有一票否决权. 即是其余 ...

  8. Flowable学习入门

    一.Flowable简介 1.Flowable是什么 Flowable是一个使用Java编写的轻量级业务流程引擎.Flowable流程引擎可用于部署BPMN 2.0流程定义(用于定义流程的行业XML标 ...

  9. 【流程】Flowable流程定义总结

    背景 近几年,互联网企业从消费互联网向产业互联网转型.在消费互联网时期,企业面对的时C端消费者,而产业互联网面对的是B端用户. 产业互联网涉及方方面面,企业信息化的建设就是B端用户的业务之一,在企业就 ...

随机推荐

  1. kali 安装最新firefox的悲惨经历

    最新的的firefox用的是量子内核,在windows上面的确感觉相比之前的firefox快了好多 想把kali 2017虚拟机的也替换掉 按照步骤: 1 添加源: /etc/apt/sources. ...

  2. 20145313张雪纯 《Java程序设计》第1周学习总结

    20145313 <Java程序设计>第1周学习总结 教材学习内容总结 java有三大平台,分别为Java SE(J2SE).Java EE(J2EE).Java ME(J2 ME). J ...

  3. 20145321 《Java程序设计》第2周学习总结

    20145321 <Java程序设计>第2周学习总结 教材学习内容总结 一.类型.变量.运算符 1.类型(基本类型) (1)整数:short(占2字节),int(占4字节),long(占8 ...

  4. js事件委托篇(附js一般写法和js、jq事件委托写法)

    参考: jQuery代码优化:事件委托篇 使用该技术能让你避免对特定的每个节点添加事件监听器:相反,事件监听器被添加在他们的父元素上,事件监听器会分析从子元素上冒泡上来的事件,并找到是哪个子元素事件. ...

  5. 手动装配Bean

    代码: import org.springframework.context.ApplicationContext; import org.springframework.context.suppor ...

  6. rocketmq事务消息

    rocketmq事务消息 参考: https://blog.csdn.net/u011686226/article/details/78106215 https://yq.aliyun.com/art ...

  7. Windows 下 ORA-12560: TNS: 协议适配器错误的问题

    Windows 下 ORA-12560: TNS: 协议适配器错误的问题原因有三个: 1.监听服务没有起起来.windows平台个一如下操作:开始---程序---管理工具---服务,打开服务面板,启动 ...

  8. spark SQL学习(认识spark SQL)

    spark SQL初步认识 spark SQL是spark的一个模块,主要用于进行结构化数据的处理.它提供的最核心的编程抽象就是DataFrame. DataFrame:它可以根据很多源进行构建,包括 ...

  9. HDU1698 just a Hook - 带有lazy标记的线段树

    2017-08-30 16:44:33 writer:pprp 上午刚刚复习了一下不带有lazy标记的线段树, 下午开始学带有lazy标记的线段树 这个是我看大佬代码敲的,但是出了很多问题, 这提醒我 ...

  10. JavaScript高级程序设计-读书笔记(7)

    第22章 高级技巧 1.高级函数 (1)安全的类型检测 在任何值上调用Object原生的toString()方法,都会返回一个[object NativeConstructorName]格式的字符串. ...