工作流管理-相关基础理论的系统介绍.ppt
工作流管理,姜进磊2004.4,2,内容提要,工作流技术概述使能因素发展的阶段研究课题基本概念建立时功能元模型运行时功能系统体系结构典型系统举例,3,概述,使能技术e-mailinternet-enabled(HTTP/HTML),network computing and Java-enableddistributed computing services:X.500,LDAPapplication interoperability:OLE/ActiveX,OpenDocQueued/Persistent message systemsdata exchange:EDIdatabase access:ODBC/JDBC,4,概述,使能技术Distributed computing infrastructure:DCE,CORBA(ORB only or with services),DCOMWeb(HTTP/CGI),Agent(Servelet,Mobile Agents)Transaction processing:Client/Server(X/OPEN,TxRPC,MS Transaction Server,Encina),distributed transaction processing(Orbix-OTM)Work group support/enabler:e.g.,Lotus Notes上述技术为工作流管理提供了必要的基础设施(infrastructure),5,发展历史,起源:图像处理阶段1970s:OfficeTalk-D,SCOOP1980s:Visual Workflo,FlowMark1990-:开放结构,标准API,图形界面未来发展基本平台系统集成的kernel,6,工作流产品,Action Workflow System Action Technologies Inc.http:/CSE/Workflow(CSE Systems Corporation)http:/Delrina FormFlow(Delrina)DM/Workflow(Intergraph)EPIC/WF(Computron)FlowLogic(FlowLogic Corporation)http:/FlowMaker(Workflow),FlowMan(Logical Software Solutions)FlowMark(IBM)http:/InConcert(InConcert Inc.)http:/FloWare(BancTec Inc.)http:/GroupFlow(Pavone)JetForm(Jetform),7,工作流产品,Keyflow(Keyfile)KI Shell(UES)Livelink Workflow(Odesta)LinkWorks(DEC)http:/Notes(IBM/Lotus)METEOR(Infocosm,Inc.)http:/,Office.IQ workflow and document management software(Portfolio Technologies Inc.)http:/OmniDesk RouteBuilder(SIGMA/Wang)OPEN/workflow(Eastman Software,Wang)http:/Optix Workflow(Blueridge)Plexus FloWare(Recognition/BancTec),8,工作流产品,ViewStar System(ViewStar)ProcessIT(NCR)-Plexus FloWare OEMStaffware(Staffware)http:/TeamWARE Flow(ICL/TeamWare)Ultimus(UltimusVisual WorkFlo(FileNet)http:/WorkMAN(Reach Software),WorkVision(IA)WorkFlow(CSE Systems,Computer&Software Engineering)http:/WorkParty(Siemens Nixdorf)http:/WebFlow(Workflow Management on the WWW,Cap Gemini Innovation)http:/webflow.cginn.cgs.fr:4747/,9,分类之一,MQ Series WfVisual Workflo,StaffwareMetro,Teamware,InconcertInTempo,10,分类之二,11,分类之三,工作流过程本身的特点结构化即席的系统建模的方式面向文档的面向过程的所使用的底层支撑技术基于邮件的基于数据库的工作流过程的执行方式任务推动目标拉动,12,技术联盟,Workflow Management Coalition-WfMC成立于1993的非盈利组织现状:超过100的会员主要任务:通过制定一系列的标准提高工作流的使用软件术语(software terminology)互操作(interoperability)连通性(connectivity),13,相关问题,14,参考模型,15,接口,specifications for process definition data&interchangeinterfaces to support interoperability b/w different workflow systemsinterfaces to support interaction with a variety of IT application typesinterfaces to support interaction with user interface desktop functionsinterfaces to provide system monitoring and metric functions to facilitate the management of composite workflow application environments,16,研究课题,Stohr E.A.,Zhao J.L.Workflow Automation:Overview and Research Issues.Information Systems Frontiers,2001,3(3):281296技术方面Interoperability:standards and implementation strategiesScalability and WF architectureAvailabiliy,reliability,concurrency,fault toleranceSecurity,especially in B2B workflowsIncreasing the scope of systems(desktop,department,enterprise,B2B),17,研究课题,技术方面(cont.)Integration of WfMS with:external application systems,ERP,component-based application systems,business objects Integrity of cross-enterprise workflows(deadlocks,rollback,etc.)Monitoring&controlling cross-organizational workflowsIntegration of multi-paradigm process modeling methodsBusiness process management suites(modeling,simulation,verification,workflow,analysis),18,研究课题,技术方面(cont.)Dynamic process changeException handling with and without manual interventionAuthorization flexibility and integrityResource management and brokering管理和组织方面New analysis and design methodologies for automated processesFlexible modeling of workflows,verification of process models,19,研究课题,管理和组织方面(cont.)Matching workflow to organizational strategy,structure,and cultureAnalysis and design of collaborative systemsWorkflow implementation and change managementCost/benefit analysis and impact studiesFactors leading to adoption of workflow systemsControling work and monitoring of employeesPerformance measurements and incentive systemsIntegration of audit trail data and data warehouses;data mining opportunities,20,研究课题,管理和组织方面(cont.)Run-time scheduling and utilization of workflow human and software agentsImpact of WfMS on clerical work and middle management市场(market),经济(economic)和社会(social)方面WF market directions and investment opportunitiesProspects for competing stand-alone,embedded,&component-based workflow enginesImpact of workflow on supply chain automation,electronic markets,&industry structure,基本概念,工作流活动角色工作流模型工作流元模型,工作流实例工作流管理系统,22,工作流术语,定义1 工作流(workflow)WfMC:部分或全部业务过程在计算机环境下的自动执行W.M.P.van der Aalst:是一系列工作的偏序集Amit Sheth:涉及到多任务协调执行的活动,这些任务分别由不同的处理实体来完成IBM:业务过程的计算机化模型,定义了完成整个过程所需用的各种参数共识:工作流是业务过程的计算机实现,23,工作流术语,定义2 任务(task)&活动(activity)任务:为了取得业务目标而需要进行的一项具体工作活动:是工作流中的一个逻辑步骤或环节,有时也称作任务规格(task specification),是对任务的抽象表示定义3 参与者(actor)&角色(role)参与者:是一个人或者程序,它完成一项具体的任务角色:是一个权限和职责的集合,它是依据能力对参与者进行的逻辑抽象定义4 过程模型(process model)也称作过程规格(process specification),是对业务过程的抽象,24,工作流术语,定义5 组织模型(organization model)是对组织的抽象表示。一个组织将参与者划分成若干个小组(group),每个小组具有自己特定的内部结构定义6 工作流模型(workflow model)也称作工作流规格(workflow specification)或工作流类型(workflow type),是业务过程的计算机化的形式表示。它由过程模型和组织模型合并得到(合并过程就是将活动分配给相应的角色的过程),25,工作流术语,5个视图(view/perspective)功能(functional)视图行为(behavioral)视图信息(informational)视图操作(operational)视图组织(organizational)视图,26,工作流术语,定义7 工作流元模型(workflow metamodel)用于表述工作流模型而提供的一套语言设施定义8 工作流实例(workflow instance)是工作流模型的一次执行,27,基本概念,Business Process,Workflow Management System,Process Instances,Activity Instances,Work Items,Invoked Applications,Process Definition,Sub-Processes,Activities,Manual Activities,Automated Activities,Which may be,or,Is defined in a,(i.e what is intended to happen),Is managed by,(controls automated aspects of the business process via),Include one or more,(a representation of what is actually happening),(tasks allocated to a workflow participant),(computer tools/applications used to support an activity),Which include,And/Or,(a representation of what is intended to happen),Composed of,(which are not managed as part of the Workflow system),During execution are represented by,Used to manage and create,WfMC,29,小结,工作流的基本思想:工作流逻辑(Workflow Logic)与应用逻辑的分离需要解决的问题技术管理市场、经济等未来发展嵌入式组件化,建立时功能,31,元模型,WfMC元模型基于Petri网的模型基于语言-行为的模型面向对象模型基于图的模型基于形式逻辑的模型基于文法的模型基于规则的模型,WfMC元模型,Workflow Process Definition,Workflow ProcessRelevant Data,(Sub)ProcessDefinition,AtomicActivity,TransitionInformation,WorkflowApplicationDefinition,WorkflowParticipantDefinition,refers to,is implemented as,may use,may use,consists of,fromto,invokes,is performed by,33,基于Petri网的模型,信息控制网ICN(C,D,R,A)C是控制实体(活动和控制节点)及其关系的集合;c(C1,C2)表示活动C1在C2之前执行D是数据实体及其关系的集合;d(D1,C2)表示数据从数据源D1输入到节点C2中,d(C1,D2)则表示数据从节点C1输出到数据源D2中R是角色及其关系的集合;r(R1,C2)表示角色R1可以执行活动C2A是执行者及其关系的集合;a(A1,R2)表示执行者A1可以充当角色R2对应关系:变迁表示活动,位置表示控制节点,34,基于Petri网的模型,工作流网WF-Net是满足如下2个条件的Petri网PN=(S,T,F)存在2个特殊位置i和o,其中i表示源(Source),o表示漏(Sink)如果在T中添加一个变迁t*,在F中增加元素(o,t*)和(t*,i)得到PN*,则PN*是强连通的对应关系任务变迁状态位置令牌工作流的某个状态,35,采用WF-Net表示的工作流过程,36,基于语言-行为的模型,基础:语言/行为理论基本结构:工作流环产品:ActionFlow,37,面向对象模型,基本思想:实体的对象化参与者活动数据Joeris G.,Herzog O.Managing Evolving Workflow Specifications任务和工作流子模型:任务任务接口工作流文档子模型资源子模型 组织结构子模型,38,面向对象模型,高军等(基于对象模型工作流的失败处理与失败恢复.软件学报,2001,12(5):776782)的扩展class workflowdefinition attributes;/描述工作流的各种属性parameter;/输入和输出参数status;/工作流对象的状态task_description;/任务的具体描述:内部实现,失败后的执行策略,“恢复事件”发生时执行的操作sub_workflow_def;/子工作流定义:子工作流序列,参数对应关系,控制依赖关系,39,面向对象模型,David Edmond:反演型对象知识模型ROK(reflective Object Knowledge)状态(state)使能(can)任务(task)行为(act)映射(map)Atsushi Inamoto:面向对象的工作流自动化模型基类:电子表单,角色和工作对象运行:状态事务表,触发规则表和工作分配表,计算和描述环境,40,基于图的模型,有向无环图DAG:Sadiq W.,Orlowska M.E.Analyzing Process Models Using Graph Reduction Techniques.Information Systems,2000,25(2):1171342种符号对象节点协作节点任务节点:活动节点、子过程节点、活动块节点和空节点变迁(有向边),41,DAG,42,基于图的模型,条件化有向图CDG对应关系节点活动有向边活动之间的先后关系形式化描述:(n,A,F)n为过程的名字A为活动集合FAAC,(c,E)C,其中c为一布尔表达式,E为多个命名表达式构成的集合,43,基于形式逻辑的模型,Davulcu H.等人采用的并发事务逻辑CTR经典逻辑原子公式p(t1,tn),其中p为谓词逻辑,ti为函数项基本运算符号,扩展连接符:表示串行合取,|表示并行合取模态算子:表示执行可能性,表示隔离执行,44,基于形式逻辑的模型,路径path:用状态序列表示的一系列操作如果公式在某个路径为真,则表示它可以从状态s1开始执行而结束于状态sn操作说明:,为两个公式表示他们顺序执行|表示他们并行执行表示他们在同一路径上执行表示其中的某个执行表示永不被执行表示被隔离执行表示可能被执行,45,基于文法的模型,通用过程结构文法GPSG基本观点:工作流演化同时发生在2个方向水平方向:任务间无因果依赖关系,但共享信息垂直方向:任务间存在因果依赖关系对策:水平方向:将文档(document)和任务看作相互的对偶垂直方向:采用约束(constraint)来表达相关活动和文档之间的软依赖关系(soft dependencies),46,基于文法的模型,构造规则以活动为中心的规则:如何将一个业务目标分成子目标以及在何种条件下进行分解以文档为中心的规则:如何将过程中需要处理的数据对象分解成子文档约束举例:B.start=A.endB.end deadline B.start=B.end B.average_duration 实现基础:活动和文档都采用特征结构(feature structure),即都是用特征集合或者属性-值对来描述,47,基于规则的模型,对主动数据库中的ECA(Event-Condition-Action)进行扩充ECAA,48,元模型分类,Georgakopoulos D.et al(An Overview of Workflow Management.Distributed and Parallel Databases,1995,3(2):119153)基于通信的(communication-based)基于活动的(activity-based)Cichocki A.et al(Workflow and Process Automation:Concepts and Technology.Kluwer,1998)基于通信的基于活动的基于物品的(artifact-based),49,元模型比较,50,元模型分类,Yu Lei任务流状态转移关系捕获基于通信的,51,元模型分类,我们的方法:依赖关系的描述手段和机制基于通信的面向对象的基于规则的基于图形的,52,工作流模型分析,类型合法性(validation)正确性验证(correctness verification)性能(performance)方法仿真(simulation)和测试(testing)定理证明(theorem proving)/演绎验证(deductive verification)模型检验(model checking),53,工作流的正确性,结构属性控制流(control flow)、数据流(data flow)、时间约束(temporal constraints)可达性(reachability),结束(termination),死锁(deadlock),数据不一致(data inconsistency),输入数据缺失(missing input data)其他特征任务的再分配组织计划的更改访问外部数据库,54,已有工作,基于WF-Net的分析工作流的完整性(soundness):工作流最终会正常结束,所有的任务都是可达的优点:具有良好的数学基础和相应的分析工具Woflan缺点:只关注控制流,而忽略了时间、工作流数据以及资源分配等方面;只能验证完整性,55,已有工作,FlowMake:DAG模型目标:找出由于建模结构使用不当而造成的错误,例如死锁、缺乏同步、结束任务的不可达等 2个阶段语法检查:模型符合语法规则而且所有的属性都已经定义分析:图化简方法(graph reduction technique)图化简:一组能够保留冲突的化简规则。遵循这些规则,结构上正确的工作流图最终的化简结果为空,而存在冲突的工作流图最终结果不为空,56,已有工作,基于CTR的分析输入工作流规格(控制流图G、触发器以及时间约束集合C)与之等价的CTR规格CTR规格中只包含满足约束C的运行路线,调度器按照CTR规格中公式指定的顺序执行各个活动优点:支持全局约束,可以找出冗余的约束Ref.Davulcu H,Kifer M,Ramakrishnan C R and Ramakrishnan I V.Logic Based Modeling and Analysis of Workflows.In:Proc of ACM Conf on Principles of Database System,1998,25-33,57,已有工作,Tracta()标签转换系统LTS模拟系统的各个组件,表示系统的属性基础:进程代数(process algebra)基本组件一个有限状态过程一个完整的工作流规格基本组件的层次化组合死锁、安全性、活性以及其他应用相关的性质,如某个活动的输入是否符合要求,58,已有工作,Spin检验器(Verifying Business Processes using SPIN.In:Proc of the 4th International SPIN Workshop,1998,21-36)步骤用基于因果语义的图形化语言Amber来描述过程自动转换成用Promela描述的状态机输入到Spin中得到采用线性时序逻辑LTL(Linear Time Temporal Logic)表示的各种属性Model Checking for Managers.Lecture Notes in Computer Science 1680,1999,92-107引入业务需求模式作为过程属性的原始LTL规格接口,59,小结,元模型的重要性直接决定了执行系统(核心是工作流引擎)实现的难易程度待解决的问题元模型的描述能力:能够清楚的定义任意情况下的业务流程,能够满足用户在建模阶段提出的各种要求在保持模型的可理解性的同时,提高模型的灵活性而又将实现难度控制在一定的限度之内工作流过程的正确性验证与优化未涉及的方面:建模方法学,运行时功能,相关概念体系结构互操作自适应/动态工作流事务工作流,61,相关概念,1.Workflow Management System(WfMS):A system that defines,creates and manages the execution of workflows through the use of software running on one or more workflow enginesconsisting of software components to store and interpret process definitions,create and manage workflow instances as they are executed,and control their interaction with workflow participants and applicationsproviding administrative and supervisory functions2.work item:The representation of the work to be processed(by a workflow participant)in the context of an activity within a process instance.,62,相关概念,An activity typically generates one or more work items which together constitute the task to be undertaken by the user(a workflow participant)within this activityThe work item(s)are normally presented to the user via a work list and a worklist handler3.worklist:A list of work items associated with a given workflow participant.4.Worklist Handler:A software component that manages the interaction between the user and the worklist maintained by a workflow engine.,63,Worklist Handler实现,64,相关概念,5.Workflow Engine:A software service or engine that provides the run time execution environment for a workflow instance.providing operational functions to support the execution of business processes,based on the process definitions.6.Workflow Enactment Service:A software service that may consist of one or more workflow engines in order to create,manage and execute workflow instances.Applications may interface to this service via the workflow application programming interface(WAPI).,65,体系结构-I,分类1:Message orientedworkflow process definition is part of messagesorigins in enhances e-mails and electronic formsProduct examples:BeyondMail(Beyond),FormFlow(Delrina)Repository orientedworkflow process definition is stored in a repositorymodeling of execution of process componentsuse of databases or common/shared storage,usually supporting monitoring,tracking,66,体系结构-I,分类2:Production-orientedcommunicate with corporate databases,mainframe systems,etc.Messaging-basedimplemented by adding workflow features to e-mail transport mechanisms Document-orientedadd workflow capabilities to document management systems,67,体系结构-II,高度集中式,68,体系结构-II,同步集中式,69,体系结构-II,异步集中式,70,体系结构-II,部分分布式,71,体系结构-II,全分布式,72,体系结构的比较,73,互操作概述,定义:The ability for two or more Workflow Engines to communicate and work together to co-ordinate work.The ability to make two or more workflow engines appear to provide a single workflow enactment service,with process execution shared between engines.The ability to interoperate between both homogeneous and heterogeneous workflow engines,74,互操作的意义软件行业,the ability to share data and/or functionality of two software systems via at least one of the following ways,75,互操作的层次,Level 1-CoexistenceLevel 2-Unique GatewaysLevel 2A-Common Gateway APILevel 3-Limited Common APILevel 4-Complete Workflow APILevel 5-Shared Definition FormatLevel 6-Protocol CompatibilityLevel 7-Common Look&Feel,76,互操作模型,WfMC:链式模型嵌套模型平行同步,77,互操作模型,Cooperative Synchronous model,78,互操作模型,Cooperative Asynchronous Model,79,互操作模型,Parallel Synchronized model,80,互操作标准,WfMC:Interface 4 E-mail MIME bindingOMG:jFLOW(Joint Flow)IETF:Simple Workflow Access Protocol(SWAP)WfMC:Interface 4 XML binding,81,WfMC互操作接口,82,WfMC标准-MIME,Internet e-mail MIME Binding(Document Number WFMC-TC-1018)MIME Message Structure,83,WfMC标准-MIME,84,jFLOW,基于Corba支持链式和嵌套模型提供了与工作流执行、监控相关的一系列接口WfRequesterWfProcessWfProcessMgrWfActivityWfResource,jFLOW Model,86,SWAP,出发点:将Internet作为跨组织工作流的基础设施,将OMG的JointFlow和相关的WfMC标准结合起来在Internet上进行过程实例的初始化、控制和监控模型和相关操作借鉴OMG的JointFlow技术选择用URI来映射流程实例突破了传统的CGI方式,在工作流模块间传输采用XML编码的消息在传输机制上,采用了HTTP或WebDAV,87,Wf-XML,Wf-XML Binding(Document Number WFMC-TC-1023)Message Structure,Example:.-,88,Wf-XML,逻辑资源模型Observer担任服务请求者的角色ProcessDefinition则充当过程定义工具Process instance则是一个运行时服务提供者,执行、监控和管理过程实例的运行基本操作CreateProcessInstanceProcessInstanceStateChangedGetProcessInstanceDataChangeProcessInstanceState,89,小结,三种基本思路共享元模型(meta-Model)或流程定义对互操作接口封装和标准化基于合同(contract)进行互操作实现技术基于CORBA或其他专有架构基于ECA事件机制基于Software Agent基于消息传递机制趋势:接口标准化和基于Internet/Web平台,90,自适应/动态工作流,相关术语灵活性(flexibility):偏向于指工作流程运行过程中的灵活执行,如跳转、回滚、重做等动态变化(dynamic change):偏向于指工作流运行过程中人为的对流程进行修改,如添加、删除等操作自适应(adaptability):偏向于指工作流运行过程中异常出现的智能处理。,91,动因,变化的环境商业活动或环境工程部门技术进步系统的再配置(reconfiguration)软件组件的替换或升级新组件的添加组件接口变化,92,变化的情形,动态改进最初不能获得完整的流程规格用户参与考虑用户决策不可测事件外部激励,用户干预,超时错误情况系统故障,误操作,93,动态/自适应的类别,Domain,ProcessSchemaTask,Resource Software componentOrganization modelData Model,Infrastruct