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 ...
随机推荐
- 重新想,重新看——CSS3变形,过渡与动画③
这一篇主要谈谈CSS3的过渡属性. 过渡属性被设计的十分通俗易懂,属性写法为transition,有四个子属性: <transition-property> 表示需要过渡的属性[必须](本 ...
- 教你如何挑选深度学习GPU【转】
本文转载自:https://blog.csdn.net/qq_38906523/article/details/78730158 即将进入 2018 年,随着硬件的更新换代,越来越多的机器学习从业者又 ...
- Oh My Zsh 插件篇 - 实用工具
Oh My Zsh 除了为我们提供快捷的命令行操作之外,还提供了强大丰富的插件机制,每个社区贡献者都可以贡献自己的插件,让整个生态体系更加丰富完善.今天给大家介绍了一下它的实用工具类插件. 前面我们分 ...
- windows下,python3安装django和mysql驱动
1.安装python3和django (1)Python 下载地址:https://www.python.org/downloads/ (2)Django 下载地址:https://www.djang ...
- jQuery基本筛选选择器
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...
- Dijkstra FORMCM
Dijkstra 算法 date: 2018/2/2 author:pprp theme:Dijstra 简述 辅助空间 vis数组:记录是否已经判断过 dis数组:记录指定原点到其他点的距离 mp二 ...
- Mac Homebrew安装php56 到phpstorm过程问题汇总
Mac自带版本是php5.5,本来是用homebrew安装xdebug 命令:brew install php55-xdebug 但是安装之后使用phpstorm还是有问题.php -v 并没有显示有 ...
- [转载]Eclipse的常用快捷键
常用的快捷键 ctrl+1:快速修复错误 ctrl+shift+L :查看快捷键 alt+?或alt+/:自动补全代码或者提示代码 ctrl+o:快速outline视图 ctrl+shift+r:打开 ...
- 我的Ansible学习笔记
Ansible常见错误 http://afewbug.com/article/26官方文档 http://docs.ansible.com/ansible/安装配置 http://sofar.blog ...
- Sql Server中的DBCC命令详细介绍
一:DBCC 1:什么是DBCC 我不是教学老师,我也说不到没有任何无懈可击的定义,全名:Database Console Commands.顾名思义“数据库控制台命令”,说到“控制台“,我第一反应就 ...