flowable ProcessEngine和ProcessEngineConfiguration
ProcessEngine是流程引擎,ProcessEngineConfiguration与前面四个引擎配置有些不同。
ProcessEngineConfiguration增加了邮件服务和httpClient的封装。
一、实例化
ProcessEngineConfiguration 提供了7个公共的静态方法用于实例化。
public static ProcessEngineConfiguration createStandaloneProcessEngineConfiguration() {
return new StandaloneProcessEngineConfiguration();
}
public static ProcessEngineConfiguration createStandaloneInMemProcessEngineConfiguration() {
return new StandaloneInMemProcessEngineConfiguration();
}
二、创建ProcessEngine
创建ProcessEngine的方法是在ProcessEngineConfiguration的子类 ProcessEngineConfigurationImpl中提供的。
@Override
public ProcessEngine buildProcessEngine() {
init();
ProcessEngineImpl processEngine = new ProcessEngineImpl(this);
...
return processEngine;
}
三、初始化服务
创建引擎过程调用init()方法时,初始化服务。
public void init() {
...
initServices();
...
}
public void initServices() {
initService(repositoryService);
initService(runtimeService);
initService(historyService);
initService(identityService);
initService(taskService);
initService(formService);
initService(managementService);
initService(dynamicBpmnService);
}
public void initService(Object service) {
if (service instanceof ServiceImpl) {
((ServiceImpl) service).setCommandExecutor(commandExecutor);
}
}
这些服务定义在 ProcessEngineConfigurationImpl 中:
protected RepositoryService repositoryService = new RepositoryServiceImpl();
protected RuntimeService runtimeService = new RuntimeServiceImpl();
protected HistoryService historyService = new HistoryServiceImpl(this);
protected IdentityService identityService = new IdentityServiceImpl(this);
protected TaskService taskService = new TaskServiceImpl(this);
protected FormService formService = new FormServiceImpl();
protected ManagementService managementService = new ManagementServiceImpl();
protected DynamicBpmnService dynamicBpmnService = new DynamicBpmnServiceImpl(this);
初始化使AbstractEngineConfiguration的 CommandExecutor传递到这些服务的父类 ServiceImpl 中。
这些服务随着 processEngineConfigurationImpl实例传递给 processEngin实例。
flowable ProcessEngine和ProcessEngineConfiguration的更多相关文章
- 流程开发Activiti 与SpringMVC整合实例
流程(Activiti) 流程是完成一系列有序动作的概述.每一个节点动作的结果将对后面的具体操作步骤产生影响.信息化系统中流程的功能完全等同于纸上办公的层级审批,尤其在oa系统中各类电子流提现较为明显 ...
- Spring实例化Bean的三种方式及Bean的类型
1.使用类构造器实例化 [默认的类构造器] <bean id=“orderService" class="cn.itcast.OrderServiceBean"/ ...
- Activit工作流学习例子
看了网上一些文章,动手操作了一遍,终于学会了Activit的一些常规使用. 一.Eclipse中的Activiti插件安装 Activiti有一个Eclipse插件,Activiti Eclipse ...
- activiti基础环境搭建创建数据库表及策略
博主使用为activiti5.22的版本. 1.创建maven工程. 2.在pom文件中引入所需要的包,如:activiti包.数据库包. 这是我引用的包: <dependencies> ...
- activiti基础--0------------------------------生成23张表
1.工作流activiti.cfg.xml配置文件 <beans xmlns="http://www.springframework.org/schema/beans" xm ...
- 工作流学习之入门demo
/** * Copyright (C), 2015-2018, XXX有限公司 * FileName: DemoMain * Author: happy * Date: 2018/6/23 16:33 ...
- Activiti工作流学习笔记(三)——自动生成28张数据库表的底层原理分析
原创/朱季谦 我接触工作流引擎Activiti已有两年之久,但一直都只限于熟悉其各类API的使用,对底层的实现,则存在较大的盲区. Activiti这个开源框架在设计上,其实存在不少值得学习和思考的地 ...
- flowable 的ProcessEngine配置
1 flowable process engine 是通过 flowable.cfg.xml 配置文件配置的.在spring 环境中是使用 flowable-context.xml 配置文件的, P ...
- flowable学习笔记-简单流程概念介绍
1 Flowable process engine允许我们创建ProcessEngine 对象和使用 Flowable 的API ProcessEngine是线程安全的,他是通过 ProcessEng ...
随机推荐
- 20135302魏静静——linux课程第七周实验及总结
linux课程第七周实验及总结 实验及学习总结 1. 编译链接的过程和ELF可执行文件格式(以hello为例) GNU编译系统编译源码: 首先,运行C预处理器(cpp),将.c文件翻译成.i文件——g ...
- 通过Excel生成批量SQL语句
项目中有时会遇到这样的要求:用户给发过来一些数据,要我们直接给存放到数据库里面,有的是Insert,有的是Update等等,少量的数据我们可以采取最原始的办法,也就是在SQL里面用Insert int ...
- Jackson 框架JSON、XML、List、Map直接相互转换
博客分类: json 参考:http://www.cnblogs.com/hoojo/archive/2011/04/22/2024628.html 在其基础上做了稍微调整 详情见附件 jacks ...
- linux下tar的使用方法
1.仅打包 tar -cvf hello.tar hello (输出文件大小为10240) 2.打包后压缩成gzip压缩格式 tar -czvf hello.tar.gz hello (输出文件大小为 ...
- Oracle修改表结构
--添加字段 alter table [tablename] add [column name] [column data type]; --修改字段数据类型 alter table [tablen ...
- linux下安装sphinx
1.下载sphinx源码包 上面截图的这个网址 复制链接地址 在putty终端使用:wget http://sphinxsearch.com/files/sphinx-2.3.1-beta.t ...
- Docker pull网络错误
[root@Oracle ~]# docker search centos Error response from daemon: Get https://index.docker.io/v1/sea ...
- Java实习二
链表(java实现) Link.java public class Link{ private Node first; public Link(){ this.first = null; } //判断 ...
- maven 本地仓库的配置
<?xml version="1.0" encoding="UTF-8"?> <!--Licensed to the Apache Softw ...
- codeforces781D Axel and Marston in Bitland
题目链接:codeforces781D 正解:$bitset$+状压$DP$ 解题报告: 考虑用$f[t][0.1][i][j]$表示从$i$出发走了$2^t$步之后走到了$j$,且第一步是走的$0$ ...