Activiti实战一

流程引擎概述

工作流引擎

这是Activiti工作的核心。负责生成流程运行时的各种实例及数据、监控和管理流程的运行。

ProcessEngineConfiguration bean

activiti.cfg.xml必须包含一个id为'processEngineConfiguration'的bean。

 <bean id="processEngineConfiguration" class="org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration">
这个bean会用来构建ProcessEngine。 有多个类可以用来定义processEngineConfiguration。 这些类对应不同的环境,并设置了对应的默认值。 最好选择(最)适用于你的环境的类, 这样可以少配置几个引擎的参数。 下面是目前可以使用的类(以后会包含更多):

org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration: 单独运行的流程引擎。Activiti会自己处理事务。 默认,数据库只在引擎启动时检测 (如果没有Activiti的表或者表结构不正确就会抛出异常)。
org.activiti.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration: 单元测试时的辅助类。Activiti会自己控制事务。 默认使用H2内存数据库。数据库表会在引擎启动时创建,关闭时删除。 使用它时,不需要其他配置(除非使用job执行器或邮件功能)。
org.activiti.spring.SpringProcessEngineConfiguration: 在Spring环境下使用流程引擎。 参考Spring集成章节。
org.activiti.engine.impl.cfg.JtaProcessEngineConfiguration: 单独运行流程引擎,并使用JTA事务。


引擎扩展图


流程引擎的API和服务

引擎API是与Activiti打交道的最常用方式。 我们从ProcessEngine开始,你可以获得很多囊括工作流/BPM方法的服务。 ProcessEngine和服务类都是线程安全的。 你可以在整个服务器中仅保持它们的一个引用就可以了。


ID生成器


项目实战一-------参与人扩展

项目实战二-------参与人条件交集并集扩展 

项目实战三-------参与人条件组织、部门、岗位等

项目实战四-------参与人条件用户组、角色等

项目实战五-------参与人条件用户、部门负责人、上级部门负责人

项目实战六-------参与人发起人


官方文档

http://www.mossle.com/docs/activiti/index.html#advanced.process.engine.configurators


Writing this book was a life-changer for me. After I wrote Open Source ESBs in Action for Manning a few years ago, I focused on my daily job for some time, working with open source enterprise integration frameworks like Mule, Camel, ServiceMix, and Spring Integration. My work, over time, drove me to designing and developing processes and BPM , and I started using j BPM and WebSphere Process Server. Then I learned that the founder of the j BPM project, Tom Baeyens, was leaving JB oss to work on a new open source project, which was in stealth mode at that time (early 2010). When the first alpha version of Activiti was released, I told myself I had to contribute to that project, one way or another. A piece that was missing in the first stages of the Activiti project was an Eclipse plug-in. I had some email conversations with Tom about contributing the plug-in to Activiti. We met and he told me that his goal was to disrupt the process engine space with the Activiti project. My enthusiasm grew even more and I offered my time to start working on a first version of the Activiti Designer. Together with my former col- leagues, Tiese Barrell, Yvo Swillens, and Ron van Liempd, we were able to deliver a first version within a couple of months. As we became part of the Activiti developer community, my hands were itching to start writing a book about Activiti. I felt that a great open source process engine would need a detailed book to describe all the possibilities and potential it offers. Manning was eager to publish a book about Activiti, and, together with Ron, we started writing in the autumn of 2010. We had a hard time keeping up with the frequent releases and the new functionality that kept on coming. But, it also was a lot of fun to be able to write about a new functionality that was just (or about to be) released. After a few meet-ups with the Activiti developer community and a couple of nice dinners with the Activiti team, we began discussing the possibility of my joining Alfresco to work on Activiti. In May 2011, I accepted the offer and was able to begin working on Activiti full-time. In the meantime, the writing of this book fell a little behind schedule. There was so much interesting work to be done developing the Activiti Designer, working on the Activiti Engine, and starting in a new job, that time caught up with me. After I had settled in a bit, I took up the writing task again and began working on the remaining chapters. So here I am, at the end of the process. I’ve switched from being a consultant to an open source software engineer, and I’m close to completing my second book. And, just like with my previous book, I have a new family addition coinciding with the book’s release. I hope you will enjoy reading this book as much as I loved writing it!
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

江晓曼*凡云基地

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值