《Flowable 6.6.0 BPMN用户指南》
1. 入门
2. 设置
3 The Flowable API
4 Flowable 6.6.0 BPMN用户指南 - (4)Spring集成
4.1 ProcessEngineFactoryBean
4.2 事务
4.3 表达式(Expressions)
4.4 自动资源摆设(Automatic resource deployment)
4.5 单位测试
4.6 使用Hibernate 4.2.x的JPA
Flowable 6.6.0 用户指南相关文档下载
《精编Flowable 6.6.0 应用步伐指南中文PDF版》
《精编Flowable 6.6.0 表单用户指南中文PDF版》
有关Flowable更多文档,拜见:
《Flowable文档大全》
4.3 表达式(Expressions)
When using the ProcessEngineFactoryBean, all expressions in the BPMN processes will also ‘see’ all the Spring beans, by default. It’s possible to limit the beans (even none) you want to expose in expressions using a map that you can configure. The example below exposes a single bean (printer), available to use under the key “printer”. To have NO beans exposed at all, just pass an empty list as ‘beans’ property on the SpringProcessEngineConfiguration. When no ‘beans’ property is set, all Spring beans in the context will be available.
当使用ProcessEngineFactoryBean时,默认情况下,BPMN流程中的所有表达式(expressions )也将“看到”所有Spring bean。使用你设置的map可以限制要在表达式中公开的bean(纵然没有)。下面的示例公开了一个bean(printer),可以在键“printer”下使用。要完全不公开bean,只需将空列表作为“beans”属性通报到SpringProcessEngineConfiguration即可。当没有设置’beans’属性时,上下文中的所有Spring bean都将可用。
Now the exposed beans can be used in expressions: for example, the SpringTransactionIntegrationTest hello.bpmn20.xml shows how a method on a Spring bean can be invoked using a UEL method expression:
现在公开的bean可以在表达式中使用:比方,SpringTransactionIntegrationTest hello.bpmn20.xml展示了如何使用UEL方法表达式调用Spring bean上的方法:
此中Printer如下:
- public class Printer { public void printMessage() { System.out.println("hello world"); }}
复制代码 Spring bean设置(如上所示)如下所示:
来源:https://blog.csdn.net/weixin_52265084/article/details/111879208
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作! |