EngineConfiguration 是flowable引擎的核心部件。

在 flowable 中,实现引擎配置的顶层类是 AbstractEngineConfiguration 这是一个抽象类。

一、作用

1、第一个作用是配置引擎使用的数据库信息。

protected String databaseType;
    protected String jdbcDriver = "org.h2.Driver";
    protected String jdbcUrl = "jdbc:h2:tcp://localhost/~/flowable";
    protected String jdbcUsername = "sa";
    protected String jdbcPassword = "";
    protected String dataSourceJndiName;
    protected int jdbcMaxActiveConnections;
    protected int jdbcMaxIdleConnections;
    protected int jdbcMaxCheckoutTime;
    protected int jdbcMaxWaitTime;
    protected boolean jdbcPingEnabled;
    protected String jdbcPingQuery;
    protected int jdbcPingConnectionNotUsedFor;
    protected int jdbcDefaultTransactionIsolationLevel;
    protected DataSource dataSource;
    protected DbSchemaManager dbSchemaManager;

2、第二个作用是提供 数据库表结构初始化状态的行为定义。

 public static final String DB_SCHEMA_UPDATE_FALSE = "false";

    public static final String DB_SCHEMA_UPDATE_CREATE = "create";

    public static final String DB_SCHEMA_UPDATE_CREATE_DROP = "create-drop";

    public static final String DB_SCHEMA_UPDATE_DROP_CREATE = "drop-create";

    public static final String DB_SCHEMA_UPDATE_TRUE = "true";

3、第三个作用是对mybatis进行封装,提供数据库操作入口

 protected DbSqlSessionFactory dbSqlSessionFactory;
    protected SqlSessionFactory sqlSessionFactory;
    protected TransactionFactory transactionFactory;
    protected TransactionContextFactory transactionContextFactory;

    protected Set<Class<?>> customMybatisMappers;
    protected Set<String> customMybatisXMLMappers;

    protected Set<String> dependentEngineMyBatisXmlMappers;
    protected List<CustomMybatisTypeAliasConfig> dependentEngineMybatisTypeAliasConfigs;
    protected List<CustomMyBatisTypeHandlerConfig> dependentEngineMybatisTypeHandlerConfigs;

    protected List<SessionFactory> customSessionFactories;
    protected Map<Class<?>, SessionFactory> sessionFactories;

    protected boolean enableEventDispatcher = true;
    protected FlowableEventDispatcher eventDispatcher;
    protected List<FlowableEventListener> eventListeners;
    protected Map<String, List<FlowableEventListener>> typedEventListeners;
    protected List<EventDispatchAction> additionalEventDispatchActions;

    protected boolean transactionsExternallyManaged;

4、第四个作用 是提供sql执行上下文环境和执行队列

 protected CommandExecutor commandExecutor;
    protected Collection<? extends CommandInterceptor> defaultCommandInterceptors;
    protected CommandConfig defaultCommandConfig;
    protected CommandConfig schemaCommandConfig;
    protected CommandContextFactory commandContextFactory;
    protected CommandInterceptor commandInvoker;

    protected List<CommandInterceptor> customPreCommandInterceptors;
    protected List<CommandInterceptor> customPostCommandInterceptors;
    protected List<CommandInterceptor> commandInterceptors;

5、第五个作用是完成引擎内部服务的配置和初始化,并构建引擎实例

通过调用相应的方法,获得每个引擎。

formEngineConfiguration.buildFormEngine();
idmEngineConfiguration.buildIdmEngine();
dmnEngineConfiguration.buildDmnEngine();
contentEngineConfiguration.buildContentEngine();
processEngineConfiguration.buildProcessEngine();

当然,在调用这个方法之前,需要进行设定适当的参数。

二、继承关系

三、分类

根据用途分为五类:

1、内容引擎配置

ContentEngineConfiguration

2、流程引擎配置

ProcessEngineConfiguration

3、身份引擎配置

IdmEngineConfiguration

4、决策引擎配置

DmnEngineConfiguration

5、表单引擎配置

FormEngineConfiguration

除了流程引擎配置外,其他的引擎配置类都提供了两种不同的配置,包括支持Spring的引擎配置类和独立的引擎配置类。

独立的引擎配置类又被扩展支持内存类型的引擎配置类。

这些继承了 AbstractEngineConfig 类的引擎配置类,定制不同的数据库使用模式(单租户、多租户、单数据库、多数据库)、mybatis配置文件、事务的处理、资源的获取等。

flowable EngineConfiguration的作用和继承关系(1)的更多相关文章

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

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

  2. EF-CodeFirst 继承关系TPH、TPT、TPC

    继承关系 面向对象的三大特征之一:继承 ,在开发中起到了重要的作用.我们的实体本身也是类,继承自然是没有问题.下面开始分析 EF里的继承映射关系TPH.TPT.TPC 现在我们有这样一个需求,用户里要 ...

  3. JavaSE复习日记 : 继承关系和super关键字以及继承关系中方法的覆写

    /* * 类的继承和super关键字 * * 软件开发的三大目的: * 可拓展性; * 可维护性; * 可重用性; * * 这里单说下可重用性这一项: * 为了代码复用,复用方式有: * 函数的调用复 ...

  4. angularjs 中的scope继承关系——(2)

    转自:http://www.lovelucy.info/understanding-scopes-in-angularjs.html angularjs 中的scope继承关系 ng-include ...

  5. 游戏编程之Unity常用脚本类的继承关系

    前言学习Unity开发引擎的初学者会接触大量的脚本类,而这些类之间的关系往往容易被忽略.本文对Unity引擎开发中的一些常用类及其关系进行了简单的归纳总结. 博文首发地址:http://tieba.b ...

  6. java基础11 继承(super、extends关键字和重写,这三个要素出现的前提:必须存在继承关系)

    面向对象的三大特征: 1.封装   (将一类属性封装起来,并提供set()和get()方法给其他对象设置和获取值.或者是将一个运算方法封装起来,其他对象需要此种做运算时,给此对象调用) 2.继承   ...

  7. Pycharm 查看一个类的继承关系图

    Pycharm 查看一个类的继承关系图 在我们开发过程中: 无论是使用的开发框架自带的类, 还是我们自定义的类都特别多; 并且类之间单继承和多继承频繁使用, 这个继承,不仅仅是一级的继承关系,包括好几 ...

  8. Style在Android中的继承关系

    Style在Android中的继承关系 Android的Styles(样式)和Themes(主题)非常类似Web开发里的CSS,方便开发者将页面内容和布局呈现分开.Style和Theme在Androi ...

  9. drf:restful概念,类继承关系,drf请求封装,drf请求流程,版本控制组件,认证组件(token),权限组件

    1.restful规范 resfful规范的概念最重要: 是一套规范,规则,用于程序之间进行数据交换的约定. 他规定了一些协议,对我们感受最直接的就是,以前写增删改查的时候需要些四个视图寒素,rest ...

随机推荐

  1. valid 校验方式

    校验参数方法:1.最简单的方式是,使用Java bean注解校验(如 @NotEmpty...)2.适合复杂点的自定义校验(推荐) 2.1 先定义一个校验接口: public interface Va ...

  2. 【Semantic Segmentation】Segmentation综述

    部分转自:https://zhuanlan.zhihu.com/p/37618829 一.语义分割基本介绍 1.1 概念 语义分割(semantic segmentation) : 就是按照" ...

  3. [WCF安全1]使用basicHttpBinding构建UserName授权的WCF应用程序

    最近到了新公司,leader让我研究一下WCF的传输安全机制.以前也做过WCF的应用,但是很少涉及安全方面的东西.所以,花了三天的时间研究了一下如何在WCF的应用程序中配置安全.在这个系列文章中,我会 ...

  4. java 集合操作小结

    Map<String,String> m1=new HashMap<String,String>(); m1.put("zara", "name1 ...

  5. Visual Studio 2010 C++ 属性设置基础

    在 <Visual Studio 2010 C++ 工程文件解读>中提到了C++工程中可以进行用户自定义的属性设置,如何进行属性设置呢? 下面我们来了解一下 props 文件的基本规则: ...

  6. poj 2528 Mayor's posters 线段树+离散化 || hihocode #1079 离散化

    Mayor's posters Description The citizens of Bytetown, AB, could not stand that the candidates in the ...

  7. SQL Server死锁总结

    1. 死锁原理 根据操作系统中的定义:死锁是指在一组进程中的各个进程均占有不会释放的资源,但因互相申请被其他进程所站用不会释放的资源而处于的一种永久等待状态. 死锁的四个必要条件:互斥条件(Mutua ...

  8. js计算之递归

    看以下js代码: var w = [{ label: '你好', node: [ { label: '你好啊', node: [{ label: "还好", node: [] }, ...

  9. java 不可不知的数据库知识-----事物

    每一个java开发对数据库都不会陌生,提到数据库,那么就一定要了解的一个知识点------事物,下面就对事物简单记录一下相关知识点. 最初接触事物的时候其实是从JDBC事物开始的,JDBC比较基础,这 ...

  10. SVN更新操作提示需要清理操作,清理操作提示乱码,更新SVN失败

    1.下载sqlite3.exe,下载方式如下: 1):sqlite网址:https://www.sqlite.org/download.html (根据操作系统自行下载) 2.下载的文件解压后将sql ...