Flowable 6.6.0 用户指南相关文档下载
- BPMN用户指南 第一部分 - 中文PDF精编版
- BPMN用户指南 第二部分 - 中文PDF精编版
- BPMN用户指南 第三部分 - 中文PDF精编版
- 应用程序指南 - 中文PDF精编版
- 应用程序指南 - 中英对照PDF精编版
- 应用程序指南 - Eclipse设计器中文PDF精编版
- 表单用户指南 - 中文PDF精编版
- 事件注册表用户指南 - 中文PDF精编版
Flowable 6.6.0 事件注册表用户指南
目录
1 事件注册表介绍
- 1.1 什么是事件注册表
- 1.2 什么是事件定义
- 1.3 什么是通道定义(Channel definition)
2 配置
- 2.1 创建事件注册表引擎
- 2.2 EventRegistryEngineConfiguration bean
- 2.3 插入流程引擎
- 2.4 数据库配置
- 2.5 JNDI 数据源配置
- 2.6 支持的数据库
- 2.7 创建数据库表
- 2.8 数据库表名解释
- 2.9 数据库升级
- 2.10 部署缓存配置
- 2.11 Logging
3 Flowable 事件注册表API
- 3.1 事件注册表引擎API与服务
- 3.2 异常策略
- 3.3 查询API
- 3.4 单元测试
- 3.5 Web应用中的事件注册表引擎
4 Spring集成
5 部署
6 REST API
有关Flowable的更多文档,参见:
3.5 Web应用中的事件注册表引擎
The EventRegistryEngine is a thread-safe class and can easily be shared among multiple threads. In a web application, this means it is possible to create the Event Registry engine once when the container boots and shut down the engine when the container goes down.
EventRegistryEngine是一个线程安全类,可以在多个线程之间轻松共享。在web应用程序中,这意味着可以在容器引导时创建一次事件注册表引擎,并在容器关闭时关闭引擎。
The following code snippet shows how you can write a simple ServletContextListener to initialize and destroy process engines in a plain Servlet environment:
以下代码片段显示了如何编写简单的ServletContextListener,以便在普通的Servlet环境中初始化和销毁流程引擎:
public class EventRegistryEnginesServletContextListener implements ServletContextListener {
public void contextInitialized(ServletContextEvent servletContextEvent) {
EventRegistryEngines.init();
}
public void contextDestroyed(ServletContextEvent servletContextEvent) {
EventRegistryEngines.destroy();
}
}
The contextInitialized method will delegate to EventRegistryEngines.init(). This will look for flowable.eventregistry.cfg.xml resource files on the classpath, and create a EventRegistryEngine for the given configurations (for example, multiple JARs with a configuration file). If you have multiple such resource files on the classpath, make sure they all have different names. When the Event Registry engine is needed, it can be fetched using:
contextInitialized方法将委托给EventRegistryEngines.init(). 这将寻找classpath 上的flowable.eventregistry.cfg.xml资源文件,并为给定的配置创建EventRegistryEngine(例如,具有一个配置文件的多个JAR)。如果classpath上有多个这样的资源文件,请确保它们都有不同的名称。当需要事件注册表引擎时,可以使用以下方法获取它:
EventRegistryEngines.getDefaultEventRegistryEngine()
或
EventRegistryEngines.getEventRegistryEngine("myName");
Of course, it’s also possible to use any of the variants of creating an Event Registry engine, as described in the configuration section.
The contextDestroyed method of the context-listener delegates to EventRegistryEngines.destroy(). That will properly close all initialized Event Registry engines.
当然,也可以使用创建事件注册表引擎的任何变体,如配置部分所述。
上下文侦听器(context-listener)的contextDestroyed方法委托给EventRegistryEngines.destroy()。这将正确关闭所有已初始化的事件注册表引擎。