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 ...
随机推荐
- hadoop HA + kerberos HA集群搭建问题和测试总结
1. 常见问题 (1)hostname设置问题.vi /etc/sysconfig/network (2)集群/etc/hosts没有统一. (3)yarn slave需要单独启动../sbin/y ...
- 简单的Java网络爬虫(获取一个网页中的邮箱)
import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.FileReader; impo ...
- COGS 197 [HAOI2008] 排名系统
★★★☆ 输入文件:rank.in 输出文件:rank.out 简单对比 时间限制:1 s 内存限制:128 MB [题目描述] 排名系统通常要应付三种请求:上传一条新的得分记录.查询 ...
- go语言中strings包中的Trim函数的作用是什么
答:Trim函数原型如下: func Trim(s string, cutset string) string 去掉字符串s中首部以及尾部与字符串cutset中每个相匹配的字符,如: s=" ...
- Java 面试题基础概念收集
问题:如果main方法被声明为private会怎样? 答案:能正常编译,但运行的时候会提示”main方法不是public的”. 问题:Java里的传引用和传值的区别是什么? 答案:传引用是指传递的是地 ...
- erwin逆向工程,logical模型列名修改为中文
逆向工程,应该选择physical template,这样拷贝到logical/physical 模型中,才可以将logical模型的列名修改为中文.
- 2017 ACM/ICPC Asia Regional Qingdao Online - 1011 A Cubic number and A Cubic Number
2017-09-17 17:12:11 writer:pprp 找规律,质数只有是两个相邻的立方数的差才能形成,公式就是3 * n * (n + 1) +1, 判断读入的数是不是满足 这次依然只是做了 ...
- python正则表达式 Python Re模块
最近在学python 练习的时候随手写的,方便以后自己参考~如果能对其他同学有所帮助就再好不过了 希望大家指正哦~ 我会随时整理的,先这样~ 正则表达式 1.元字符([ ]),它用来指定一个char ...
- tp5.1升级
# php think version v5.1.23 # composer update Loading composer repositories with package information ...
- [eclipse]Syntax error on tokens, delete these tokens问题解决
错误:Syntax error on tokens, delete these tokens 出现这样的错误一般是括号.中英文字符.中英文标点.代码前面的空格,尤其是复制粘贴的代码,去掉即可. 如下图 ...