轻量级工作流引擎服务的设计与实现

 2022-08-16 05:08

论文总字数:24686字

摘 要

现代企业为了适应迅速发展的市场环境,需要不断改造自己的业务流程。而每次在项目代码中重构流程的代价过大,因此企业希望能够将业务流程从代码中分离。本文开发了一款基于Petri网并符合BPMN 2.0规范的的轻量级工作流引擎服务,为了方便流程设计人员设计流程定义,还开发了一款基于BPMN元素的流程设计器,可以通过导入Petri网XML文件的方式或在图形化页面拖动元素的方式设计流程;实现了从BPMN元素到Petri网元素的映射,同时实现了基本的流程运转、流程回退、并行流程、分支流程等功能。为了控制权限,本文引入了流程分组的概念。项目开发采用了Spring SpringMVC Spring Data JPA的开发框架,工作流设计器采用了JsPlumb BootsStrap JQuery框架完成。本文详细给出了工作流引擎及流程设计器的设计与实现,在实现方面,重点讲述了工作流的流转算法。

关键词: 工作流;Petri网;流程设计器

Design and implementation of lightweight workflow engine

71113133 Ke Yang

Advisor Ling Zhou

ABSTRACT

In order to adapt to a rapidly developing market environment, modern enterprises have to reinvent their own business processes. However, a huge cost has to be paid for process reengineering in project codes. Therefore, enterprises hope that business process can be separated from project codes. In this paper, a lightweight workflow engine service, based on Petri net, has been developed, conforming to the specification of BPMN 2.0. In order to facilitate the design of process definitions, a process designer has been developed based on BPMN elements. In this way, a process can be designed by importing an XML file or dragging an element in a graphical page. At the same time, the mapping from BPMN to Petri net can be realized. The workflow engine also implements the functions like basic process operations, process rollbacks, parallel processes, branch processes. In order to realize permission control, a concept of process grouping is introduced. A development framework, combining Spring, Spring MVC, and Spring Data JPA, is developed and exploited. The workflow designer is developed in the framework of JsPlumb, BootStrap and JQuery. In this paper, the design and implementation of the workflow engine and process designer are elaborated. In the aspect of implementation, the workflow algorithm is emphasized.

Keyword: Work Flow; Petri net; Flow Designer

目 录

第一章 绪论 1

1.1引言 1

1.2工作流引擎研究现状 1

1.3本文主要研究内容 2

1.4专有名词介绍 2

第二章 工作流建模 4

2.1工作流概述 4

2.2需求分析 4

2.3工作流建模 4

2.4本章小结 5

第三章 工作流设计器 6

3.1概述 6

3.2 BPMN基本元素 6

3.3 BPMN元素映射到Petri网的方法 6

3.4 BPMN的XML表示 7

3.5绘制流程图实现 8

3.6将BPMN元素转换为Petri网 9

3.7 XML解析Petri网流程定义 10

3.8权限控制 11

3.9流程定义删除操作 12

3.10本章小结 12

第四章 工作流引擎服务 13

4.1概述 13

4.2流程建立 13

4.2.1流程校验 13

4.2.2流程启动 14

4.3 流程运行期控制 16

4.3.1 流程运转 16

4.3.2 流程回退 20

4.4 流程运行期交互 21

第五章 总结与展望 22

致 谢 23

参考文献 24

第一章 绪论

1.1引言

在瞬息万变的市场环境中,现代企业需要快速响应市场的需求,才能够更好的生存。为此,企业需要时刻调整自己的组织结构和再造自己的业务流程。在过去的生产环境中,企业选择将业务流程直接写在产品代码中,与产品逻辑糅合在一起,这使得企业每次在需要修改业务流程时,都需要大量的人力和时间来修改产品的原有代码,若原有产品开发人员离职,则企业不得不让新的开发人员学习产品的几乎全部代码以防止在开发人员再造业务流程时造成产品漏洞,使原有的系统出现漏洞并破坏其封闭性,这极大地提高了企业的运营成本。

针对上述情况,市场上出现了工作流技术。工作流技术通过对关键业务的实际开发需求的分析,提出了一个适用于关键业务开发的基于关系结构的服务,工作流技术可以通过图形化界面设计流程以及追踪流程的当前执行位置,并能够抽象出工作流对象。用户可以通过直接调用接口的方式来实现流程的控制而不必关心工作流的内部实现,可以方便地嵌入到面向流程的应用程序中。大大节省了企业的运营成本,现已被广泛运用在企业产品当中。

1.2工作流引擎研究现状

剩余内容已隐藏,请支付后下载全文,论文总字数:24686字

您需要先支付 80元 才能查看全部内容!立即支付

该课题毕业论文、开题报告、外文翻译、程序设计、图纸设计等资料可联系客服协助查找;