flowable DmnEngine和DmnEngineConfiguration
一、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的更多相关文章
- flowable 五个引擎和组成引擎的服务
一.flowable的五个引擎 flowable包含五个引擎,分别是: 1.内容引擎 ContentEngine 2.身份识别引擎 IdmEngine 3.表单引擎 FormEngine 4.决策引擎 ...
- flowable EngineConfiguration的实现分析(2)
EngineConfiguration的实现类是一个抽象类:AbstractEngineConfiguration 一.引擎配置的分类 继承 AbsractEngineConfiguration的子类 ...
- flowable EngineConfiguration的作用和继承关系(1)
EngineConfiguration 是flowable引擎的核心部件. 在 flowable 中,实现引擎配置的顶层类是 AbstractEngineConfiguration 这是一个抽象类. ...
- RxJava2出现:Unable to create call adapter for io.reactivex.Flowable
前面一直使用的是Rxjava 1.x 版本,最近 Rxjava 2.x 版本发布了,并且支持了背压,便换成了 Rxjava 2.x 版本.更换之后出现了下面的错误. Caused by: java.l ...
- flowable设计器插件安装
原文地址:http://www.shareniu.com/ 工欲善其事必先利其器,要想使用flowable,必须搭建一套环境,本文以Eclipse中安装flowable插件为例详细说明整个安装过程. ...
- 工作流引擎 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 ...
- 工作流程引挈 https://www.flowable.org/
工作流程引挈 : https://www.flowable.org/ 起源:JBPM,Activiti
- Android RxJava 2 的用法 just 、from、map、subscribe、flatmap、Flowable、Function、Consumer ...【转】
先简单说说RxJava的用途与价值 原文出处:Android RxJava 2 的用法 用途: 异步 (也就是开线程跳转) 价值: 面对复杂的逻辑,它依然 简洁 ,代码 易读 RxJava2 与 Rx ...
- flowable 的ProcessEngine配置
1 flowable process engine 是通过 flowable.cfg.xml 配置文件配置的.在spring 环境中是使用 flowable-context.xml 配置文件的, P ...
随机推荐
- 利用python获取nginx服务的ip以及流量统计信息
#!/usr/bin/python #coding=utf8 log_file = "/usr/local/nginx/logs/access.log" with open(log ...
- 5309 《Java程序设计》第6周学习总结
教材学习内容总结 输入与输出 InputStream与OutputStream 从应用程序角度来看,如果要将数据从来源取出,可以使用输入串流:如果要将数据写入目的地,可以使用输出串流.在Java中,输 ...
- [CF960F]Pathwalks
题目大意:给你一张$n$个点$m$条边的带权有向图,可能有重边和自环.边会按照顺序给出.让你求出一条最长的路径,使得路径上的边满足边权和出现的时间严格递增.路径可以重复经过同一个点. 想办法把它转化成 ...
- Docker Mysql主从同步配置搭建Demo
进行Docker操作前,先建立目录,我的路径是d:/docker/mysql,目录结构如下: --mysql --master --data --conf --my.cnf --slaver --da ...
- Learning Perl 第六章习题第一题
按照first name找last name 知识点: 1. hash的使用和初始化 2. 使用exists函数检测hash中的键是否存在
- dapper-dot-net/Dapper NET40/SqlMapper.cs
/* License: http://www.apache.org/licenses/LICENSE-2.0 Home page: http://code.google.com/p/dapper-do ...
- 微信小程序UI------实现携程首页顶部的界面(弹性布局)
今天写了一个携程界面的UI,利用H5的弹性盒子来实现,学过H5弹性盒子的,来看是比较方便的,因为CSS代码都差不多. 可以看看这篇博客 快速使用CSS 弹性盒子 效果图如下: 主要是携程首页的四个模块 ...
- nodejs pm2配置使用
nodejs pm2配置使用教程参考链接:http://www.111cn.net/sys/linux/100927.htm 安装步骤: yum -y install npmnpm install - ...
- 【问题解决记录】无法识别的标志“-sdlMode”,在“p2”中
本文为大便一箩筐的原创内容,转载请注明出处,谢谢:http://www.cnblogs.com/dbylk/ 这是本人第一次使用MarkDown编辑器,试试看效果-w-,下面是正文: 一.报错原因 昨 ...
- influxdb和boltDB简介——MVCC+B+树,Go写成,Bolt类似于LMDB,这个被认为是在现代kye/value存储中最好的,influxdb后端存储有LevelDB换成了BoltDB
influxdb influxdb是最新的一个时间序列数据库,最新一两年才产生,但已经拥有极高的人气.influxdb 是用Go写的,0.9版本的influxdb对于之前会有很大的改变,后端存储有Le ...