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 ...
随机推荐
- 编码解码--url编码解码
url编码解码,又叫百分号编码,是统一资源定位(URL)编码方式.URL地址(常说网址)规定了常用地数字,字母可以直接使用,另外一批作为特殊用户字符也可以直接用(/,:@等),剩下的其它所有字符必须通 ...
- [BZOJ4653 区间]
Description 在数轴上有 n个闭区间 [l1,r1],[l2,r2],...,[ln,rn].现在要从中选出 m 个区间,使得这 m个区间共同包含至少一个位置.换句话说,就是使得存在一个 x ...
- LeetCode——largest-rectangle-in-histogram1
Question Given n non-negative integers representing the histogram's bar height where the width of ea ...
- POJ - 3169 差分约束
题意:n头牛,按照编号从左到右排列,两头牛可能在一起,接着有一些关系表示第a头牛与第b头牛相隔最多与最少的距离,最后求出第一头牛与最后一头牛的最大距离是多少,如 果最大距离无限大则输出 ...
- 【eclipse】启动不了报错java was started but returned exit code=13
原因是jdk与eclipse的版本不对,一个是32位的一个是64位的.
- Caffe cpu版本 Linux配置命令及搭建
Caffee 安装过程 1.安装依赖包 $ sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-de ...
- eclipse 打开 maven项目,出现红色的感叹号
解决: 选中有感叹号的项目右键,用maven>>update project解决.[然后我再添加java system 类库就可以了]
- session判断重复提交
import javax.servlet.http.HttpServletRequest; /** * @author: jiang * @Date: 2019/2/19 09:37 * @Descr ...
- Spring事物原理完全解析
事务是什么?了解事务的原理吗?说下Spring的事务原理,能自己实现Spring事务原理吗?先自我检测下这些知识掌握了吗.那么接下来一起看下与Spring相关的事务 概念 事务具有ACID特性. 是指 ...
- 在线前端开发平台 Plunker
Plunker 网站 : http://plnkr.co/ Plunker 是一个用来创建.协作和分享 Web 开发思路的在线社区.编辑界面如下图所示: 特点: 基于 Node.js 环境运行 实时的 ...