flowable ProcessEngine和ProcessEngineConfiguration
来源:互联网 发布:windowsce软件 编辑:程序博客网 时间:2024/05/22 04:28
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实例。
阅读全文
1 1
- flowable ProcessEngine和ProcessEngineConfiguration
- Activiti5第八弹,ProcessEngineConfiguration和ProcessEngine
- Activiti5中的ProcessEngineConfiguration和ProcessEngine详解
- flowable中的processEngineConfiguration配置
- flowable DmnEngine和DmnEngineConfiguration
- flowable FormEngine和FormEngineConfiguration
- flowable IdmEngine和IdmEngineConfiguration
- Flowable
- 两大容器ProcessEngineConfiguration和CommandContextFactory
- flowable ContentEngine和ContentEngineConfiguration的关系
- flowable EngineConfiguration的作用和继承关系(1)
- flowable 五个引擎和组成引擎的服务
- flowable入门
- flowable使用
- flowable appModel
- flowable正式版
- flowable工作流
- 《Flowable基础二 Flowable是什么》
- spring中bean的生命周期
- 吾爱破解160个crackme之003
- Ajax中POST和GET的区别
- 【转】SAP采购订单屏幕增强
- 【设计模式】JDK源码中用到的设计模式
- flowable ProcessEngine和ProcessEngineConfiguration
- kvc的理解和应用
- Xamarin XAML语言教程模板视图TemplatedView(二)
- Single Number
- mysql存储过程
- Swift
- 用于移动和嵌入式视觉应用的 MobileNets
- 安装libpng提示--configure: error: ZLib not installed
- 常用工具