1.2.1 工作流管理系统参考模型

http://book.51cto.com/art/201009/228705.htm

*************************************************

《jBPM4工作流应用开发指南》第1章工作流基础,本章将为您开宗明义地介绍工作流这门科学,使您了解这门"很有前途的"技术的概念、发展历程以及目前的状况,并给您一个选择jBPM的理由。本节为大家介绍工作流管理系统参考模型。

AD:51CTO 网+ 第十二期沙龙:大话数据之美_如何用数据驱动用户体验

1.2.1  工作流管理系统参考模型

许多软件开发商都有工作流产品,并且不断有新的工作流产品走入市场。市场上可选择的产品范围很大,因此每个开发商只关注产品的特殊功能,而用户可以采用不同的产品来满足不同的需求。

然而,由于各个厂商不兼容的流程控制方式,导致没有统一的规范使得不同的工作流产品协同工作。对于这个问题,业界一直认为,所有的工作流产品都有一些相同的特性,只要其各种功能遵循公共的标准,就可以实现不同工作流产品间的协同工作。

由此WfMC应运而生,WfMC的全称是Workflow Management Coalition--工作流管理联盟,它是由一些公司联合在一起成立的组织,从事工作流问题的研究和指导。

图1-5所示就是WfMC提出的工作流管理系统参考模型(Reference Model of the Workflow Management Coalition)。作为工作流技术标准化的工业组织,WfMC的这个参考模型无疑为各家工作流管理软件提供者的系统设计规划给出了权威的参考,乃至标准。

 
(点击查看大图)图1-5  工作流管理系统参考模型

首先,最重要的部分就是中间的工作流引擎,可以说它就是整个工作流管理系统的心脏,因为所有的工作流管理系统都要使用工作流引擎:

1)为执行的流程实例解释流程定义--这些流程定义一般都是由接口1获得的。

2)组织调度流程的实例,推进工作流程的前进,这包括条件流转、分支聚合、父子流程……

3)处理工作任务的分配、接受、提交等行为--无论是人工干预或自动执行的任务,都需要经过工作流引擎计算和持久化(如果需要的话)。

4)管理调用其他的4个接口--这可能包括执行工作流程定义中的一些外部脚本。

工作流引擎做的工作就像心脏把血液不断地送到身体的各个部分一样。关于工作流引擎应该如何架构和设计,在本书后面章节会涉及。

那么,接下来说说工作流管理系统"身体"的5个组成部分吧,也就是图1-5所示的5个接口。

接口1--流程定义工具。

前面提到过我们使用它来设计业务流程定义供工作流引擎来实例化运行。所谓的"业务流程定义"一般来说就是一段XML,它一般遵循XPDL(XML Process Define Language)标准、BPEL(Business Process Execution Language)标准或其他厂商自定义的标准(例如jBPM的流程定义语言就是jPDL)。事实上可以把流程定义工具理解为一个产生XML的图形化设计建模软件。这种软件各个厂商的技术实现可谓五花八门,仅基于Web的就有很多种技术实现,例如Java Swing,Flash,ActiveX;当然,很多开源项目采用的还是基于客户端的实现,例如jBPM使用的是基于Eclipse图形化插件的实现,Shark Workflow使用的则是JAWE(一种基于Java技术实现的XPDL建模工具)。当然,它们的最终目的都是统一的--产生XML格式的流程定义。

接口2--工作流客户端应用。

这很有意思,当业务流程设计好了、运行起来了,那么我们--"人类"如何与工作流引擎交互呢?这时候,工作流引擎就通过接口2,为我们提供各种各样的工作任务列表、工作表单、流程列表以及一些查询功能。我们通过这些接口应用,就可以填写表单、处理任务……从而实现人与工作流引擎的沟通。

接口3--执行外部应用。

工作流引擎通过这个接口去执行一些外部的或面向专门职能领域的应用程序,例如财务系统、报表系统等,让第三方系统参与进来,从而完成定义的工作流程。这看起来就像EAI(Enterprise Application Integration,企业应用集成)的特性,而事实上它也可以说就是Workflow EAI。同时我们也可以发现接口2和接口3之间的界定有些模糊,难道接口2提到的"工作任务列表"不能算是外部的应用程序吗?没错!这个问题确实存在,这也就是为什么荷兰工作流大师Aalst在其著作《工作流管理--模型、方法和系统》中写道"建议每个应用程序都由此'应用程序执行服务'打开"的原因,他是在建议统一这两个接口吗?总之,接口3在标准化方面众口不一。

接口4--其他工作流应用接口服务。

用来处理若干自治工作流管理系统之间的工作交换,例如实例转移、工作任务外包等。事实上,WfMC组织的初衷是想通过这个接口来连接各个不同的工作流引擎和系统,使它们在一个统一的标准下工作和交流。想法是非常不错的,但是,由于种种原因吧,作者认为是商业利益的因素以及WfMC还没有强大到能"号令江湖,莫敢不从"的地步,所以到目前为止,接口4基本不被支持,也就是说,各大厂商的工作流产品并不能用同一种语言对话。但是,随着jBPM4推出的PVM-流程虚拟机技术(这在本书的后面会涉及)的发展,实现接口4的障碍也许能被打破。您可以拭目以待。

接口5--管理和监控工具。

虽然很多工作流管理系统,特别是开源工作流管理系统实现的最简单部分就是这个接口,但作者认为最能体现工作流管理系统在企业管理方面价值的就是这个部分,它主要被用来搜集管理信息,这包括诸如工作流系统功能管理工具、流程实时监视和控制工具,以及工作效率分析和流程覆盖面分析等各种商业智能工具,这为提升企业的管理能力、优化重组企业的业务流程、分析企业内部的工作效率瓶颈等提供了重要的量化数据支持。我们说"工业化解放人类的体力,信息化解放人类的智力",这个接口提供的功能不正是解放了流程企业领导和决策者们的智力吗,而这正是企业信息化的初衷、工作流管理的最终价值所在。传统的工作流管理系统在这个接口上的"短板",正为下一节要说的BPM(Business Process Management)这个概念的支持者提供了攻击工作流技术的口实,BPM概念在这个接口上的强化成了很多人认为"Workflow系统"不等同于或弱于"BPM系统"的重要原因。事实上,这都不过是些概念而已,实现工作流管理系统、解决业务流程改进方面的问题才是我们所要做的。

总结一下,工作流管理系统参考模型的5大接口各自强调了什么?

接口1--提供流程定义。

接口2-提供工作任务列表等客户端应用程序,实现使用者与工作流引擎的沟通。

接口3--支持外部应用程序参与工作流程。

接口4--支持不同工作流引擎系统间的连接。

接口5--提供监控工具,搜集管理信息。

还有一些问题供读者思考:

接口3和接口5标准化工作进展较为缓慢,为什么?读者可以参考上文的说明思考得出。

接口3和接口4需要完善的地方很多,例如,流程和工作任务的事务、回滚(包括被动退回和主动取回的任务)问题,在这两个问题上如何处理、怎么处理好、如何保持原子性,如何进行"补偿",乃至如何支持"中国特色"的业务,都是很有思考空间的。


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
BPM4工作流应用开发指南 《jBPM4工作流应用开发指南》是2010年电子工业出版社出版的图书,作者是胡奇。 完全解析jBPM4应用开发技术 9位工作流业内专家联袂推荐 随着在现代企业管理中对于信息化、流程化的深度挖掘,具有业务流程管理的技术和思想已经成为致力于全面掌控企业级应用系统人士“日常生活、居家旅行”的必备素质。 本书分两篇。第一篇介绍工作流管理技术的概念、起源和发展历程,开源工作流选型,以及jBPM——这个迄今为止最成功的Java开源工作流项目的“前世今生”。此外,本篇还可以帮助读者快速上手jBPM4、使用jBPM4开发企业流程应用,包括安装和配置jBPM4、使用jBPM图形化流程设计器(GPD)设计流程、把流程部署到服务器上去、使用jBPM 4 Service API控制流程、掌握jBPM流程定义语言、流程变量、流程脚本。第二篇主要涉及基于jBPM4这个强大的应用程序框架打造属于自己独特业务的“企业流程管理平台”,包括jBPM4扩展研发先决条件、深入jPDL和jBPM Service API、升级jBPM3到jBPM4、流程虚拟机原理、jBPM4的设计思想、随需而配jBPM4、异步工作执行器、深入jBPM4电子邮件支持、系统日志、jBPM4与Spring框架集成、jBPM4与JBoss应用服务器集成、中国特色工作流的jBPM实现。 本书结构条理清晰,实践例程与理论思想紧密结合,翔实易懂,由浅入深,具有很强的参考性和实用性。本书适合所有掌握JavaEE(Java企业级版本)开发技术的人员——无论您是技术开发者、项目实施者、系统架构师,还是流程分析师、业务方案顾问,本书都适合您。 第一篇 jBPM工作流开发基础 1 第1章 工作流基础 2 1.1 工作流概念 2 1.1.1 工作流管理思想之于企业现代化管理 2 1.1.2 工作流技术在企业中的应用 5 1.1.3 如何从一个开发者的角度看工作流技术 6 1.2 工作流管理系统的发展历程 9 1.2.1 工作流管理系统参考模型 11 1.2.2 BPM 15 1.3 开源工作流选型 16 1.4 jBPM 19 1.4.1 jBPM前世今生 19 1.4.2 关于jBPM4您需要知道的 19 1.5 小结 23 第2章 安装和配置jBPM4 24 2.1 jBPM4安装先决条件 24 2.2 快速开始吧 26 2.3 安装脚本详解 27 2.3.1 关于配置文件 30 2.3.2 关于依赖库 31 2.4 安装到JBoss 31 2.5 安装到Tomcat 32 2.6 基于Web的Signavio流程设计器 33 2.6.1 jBPM Web流程设计器简介 33 2.6.2 独立安装Signavio 34 2.6.3 配置Signavio 34 2.7 用户自定义jBPM Web应用程序 35 2.8 安装jBPM数据库 35 2.8.1 新数据库安装 36 2.8.2 升级旧的数据库 36 2.9 安装图形化流程设计器(GPD) 37 2.9.1 获取Eclipse 37 2.9.2 在Eclipse中安装GPD插件 37 2.9.3 配置jBPM运行环境 38 2.9.4 添加jPDL4 Schema校验 41 2.9.5 导入和使用范例 41 2.10 例程:jBPM HelloWorld 43 2.11 小结 45 第3章 使用jBPM图形化流程设计器(GPD)设计流程 46 3.1 创建一个新流程 47 3.2 编辑流程定义源 49 3.3 例程:设计一个“复杂的”业务流程 49 3.4 小结 53 第4章 把流程部署到服务器上去 54 4.1 部署流程定义和资源文件 54 4.2 部署流程Java类的3个方法 57 4.3 例程:部署业务流程定义 58 4.4 小结 61 第5章 使用jBPM4 Service API控制流程 62 5.1 流程定义、流程实例和执行的概念 62 5.2 流程引擎API 64 5.3 利用API部署流程 67 5.4 通过API删除已部署的流程 69 5.5 使用API发起新的流程实例 69 5.5.1 发起流程实例的常规方法 70 5.5.2 指定业务键发起流程实例 70 5.5.3 指定变量发起流程实例 71 5.6 唤醒一个等待状态的执行 71 5.7 任务服务API 72 5.8 历史服务API 75 5.9 管理服务API 76 5.10 查询服务API 77 5.11 例程:利用jBPM Service API完成流程实例 78 5.12 小结 80 第6章 掌握jBPM流程定义语言 81 6.1 process(流程) 82 6.2 流转控制活动 84 6.2.1 start(开始活动) 85 6.2.2 state(状态活动) 86 6.2.3 decision(判断活动) 89 6.2.4 fork – join(分支/聚合活动) 97 6.2.5 end(结束活动) 102 6.2.6 task(人工任务活动) 107 6.2.7 sub-process(子流程活动) 120 6.2.8 自定义活动 132 6.3 自动活动 134 6.3.1 java(Java程序活动) 135 6.3.2 script(脚本活动) 139 6.3.3 hql(Hibernate查询语言活动) 144 6.3.4 sql(结构化查询语言活动) 147 6.3.5 mail(邮件活动) 149 6.4 事件 153 6.4.1 事件监听 155 6.4.2 事件传播 157 6.4.3 处理异常事件 159 6.5 异步执行 160 6.5.1 异步活动 162 6.5.2 异步分支/聚合 164 6.6 用户代码 166 6.6.1 用户代码的定义 166 6.6.2 用户代码的类加载 168 6.7 小结 170 第7章 流程变量 171 7.1 变量作用域 173 7.2 变量类型 174 7.3 变量的自动更新和序列化 175 7.4 例程:用变量去控制一个流程的运行 177 7.5 小结 179 第8章 流程脚本 182 8.1 Java统一表达式语言 182 8.1.1 语法特点 183 8.1.2 值和方法表达式 184 8.1.3 隐式对象 187 8.1.4 运算符和保留字 188 8.1.5 一些经典EL表达式的例子 190 8.2 例程:用脚本去控制一个流程的运行 192 8.3 小结 194 第二篇 定制属于自己的流程——深入jBPM4扩展研发 195 第9章 jBPM4扩展研发先决条件 196 9.1 深入应用jBPM4所需要知道的 196 9.1.1 如果您的业务基于复杂的规则,在jBPM中加入Drools吧 196 9.1.2 抉择,是否使用BPEL 197 9.2 Maven仓库和Java依赖库 199 9.3 小结 200 第10章 深入jPDL和jBPM Service API 201 10.1 timer(定时器)能为您做什么 201 10.1.1 持续时间表达式 202 10.1.2 工作日历 202 10.1.3 定时转移 204 10.1.4 定时事件 205 10.1.5 工作日历定时 207 10.1.6 定时重复 208 10.2 使用group活动编组流程 209 10.3 如何在活动中调用EJB方法 214 10.4 使用jms活动 215 10.4.1 模拟JMS服务 217 10.4.2 JMS文本消息 219 10.4.3 JMS Object消息 220 10.4.4 JMS Map消息 222 10.5 历史会话监听链 223 10.6 自定义Web任务表单 225 10.6.1 基本思路 225 10.6.2 表单格式 226 10.7 流程实例的自动迁移 228 10.7.1 简单的流程实例迁移 230 10.7.2 终止流程实例运行的迁移 232 10.7.3 应用活动映射的迁移 234 10.7.4 自定义迁移处理器 236 10.8 小结 239 第11章 升级jBPM3到jBPM4 240 11.1 你所要知道的升级局限性 241 11.2 流程定义转换工具 242 11.2.1 命令行执行 242 11.2.2 Java编码执行 243 11.3 jBPM3到jBPM4的语义变更及翻译 244 11.4 小结 246 第12章 流程虚拟机原理 247 12.1 PVM的架构 247 12.2 PVM的实现 250 12.3 小结 253 第13章 jBPM4的设计思想 254 13.1 API设计 254 13.1.1 活动API 256 13.1.2 事件监听API 256 13.2 执行环境设计 257 13.3 命令设计 258 13.4 服务设计 259 13.5 历史流程处理原理 262 13.6 数据持久化设计 263 13.6.1 jBPM4流程定义资源和实例运行时数据表 264 13.6.2 jBPM4流程历史数据表 265 13.6.3 jBPM4身份认证数据表 266 13.6.4 jBPM4引擎属性数据表 267 13.7 例程:扩展jBPM4的API满足客户化的需求 268 13.8 小结 270 第14章 随需而配jBPM4 272 14.1 配置文件设计概要 273 14.2 配置工作日历 274 14.3 配置身份认证组件(组织适配器) 274 14.4 小结 277 第15章 异步工作执行器 278 15.1 设计原理 278 15.2 配置使用 280 15.3 小结 281 第16章 深入jBPM4电子邮件支持 282 16.1 电子邮件的产生 282 16.2 电子邮件服务器 285 16.3 电子邮件扩展 287 16.4 小结 289 第17章 系统日志 290 17.1 配置日志 290 17.2 日志输出级别 292 17.3 Java Logging API日志 292 17.4 利用持久化层日志进行调试 294 17.5 小结 295 第18章 jBPM4与Spring框架集成 296 18.1 集成的目标 297 18.2 为集成配置jBPM4 297 18.3 为集成配置Spring 299 18.4 使用 301 18.5 测试 302 18.6 小结 302 第19章 jBPM4与JBoss应用服务器集成 303 19.1 流程定义打包部署 303 19.2 在JBoss企业级编程模型中使用jBPM4 304 19.3 小结 306 第20章 中国特色工作流的jBPM实现 307 20.1 退回 308 20.2 取回 313 20.3 会签 318 20.4 委派 326 20.5 自由流 331 20.6 小结 332 附录A jBPM术语 334
1. Introduction 1.1. Background Work Flow Management is a fast evolving technology which is increasingly being exploited by businesses in a variety of industries. Its primary characteristic is the automation of processes involving combinations of human and machine-based activities, particularly those involving interaction with IT applications and tools. Although its most prevalent use is within the office environment in staff intensive operations such as insurance, banking, legal and general administration, etc, it is also applicable to some classes of industrial and manufacturing applications . Many software vendors have WFM products available today which involve WFM technology and there is a continual introduction of more products into the market. The availability of a wide range of products within the market has allowed individual product vendors to focus on particular functional capabilities and users have adopted particular products to meet specific application needs. However, there are, as yet, no standards defined to enable different WFM products to work together, which is resulting in incompatible "islands" of process automation. The WFM Coalition is a grouping of companies who have joined together to address the above situation. It has been recognised that all work flow management products have some common characteristics, enabling them potentially to achieve a level of interoperability through the use of common standards for various functions. The WFM Coalition has been established to identify these functional areas and develop appropriate specifications for implementation in workflow products. It is intended that such specifications will enable interoperability between heterogeneous workflow products and improved integration of workflow applications with other IT services such as electronic mail and document management, thereby improving the opportunities for the effective use of workflow technology within the IT market, to the benefit of both vendors and users of such technology. 1.2. Purpose The purpose of this document is to provide a framework to support the development of the various specifications described above. It provides a common "Reference Model" for workflow management systems identifying their characteristics, terminology and components, enabling the individual specifications to be developed within the context of an overall model for workflow systems. The detailed specifications will be developed as separate documents. 1.3. Scope This document covers the concepts, terminology, general structure of a workflow management system, its major functional components and the interfaces and information interchange flows between them. It identifies the areas appropriate for standardisation and illustrates the potential interoperability scenarios which may be supported through the use of common standards. It also discusses, where appropriate, the applicability of existing standards to workflow management systems and their integration with other standard IT services. It does not cover wider aspects of business process engineering which lie outside the use of information technology to support the business process. 1.4. Audience The intended audience of this document is the work flow coalition membership as well as others that are interested in the efforts of the coalition and wish to understand the top level technical architecture which underpins the work of the Coalition. The document is intended for a moderately technical audience but extensive prior knowledge of workflow systems is not assumed. 1.5. How to read this document Chapter 2 provides a general introduction to the concepts of workflow systems technology, its evolution, the business context and background on the types of systems which may incorporate this type of technology. If you are unfamiliar with workflow technology you should start here; if you are already familiar with workflow management systems, consider starting at Chapter 3. Chapter 3 discuses the internal structure of workflow systems, the major functional components and the nature of their interactions. It introduces the top level architecture and identifies the various interfaces which may be used to support interoperability between different system components and integration with other major IT infrastructure components. Chapter 4 provides a general overview of the workflow application programme interface (WAPI), comments on the necessary protocol support for open interworking and discusses the principles of conformance to the specifications. It identifies those aspects of the specifications which are required to support various classes of interoperability. The detailed WAPI specifications are published as separate specification documents (see cross references below).

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值