当前位置:
文档之家› 基于Web技术的工作流图形化建模工具的设计与实现
基于Web技术的工作流图形化建模工具的设计与实现
Abstract
Against the limitations of traditional form and VCbased graphical modelling tools, the architecture of webbased workflow graph-
ical modelling tool was proposed according to the interface I of workflow reference model which was brought forward by Workflow Management Coalition. This architecture included the application layer, business logic layer, data access layer and data layer. The icons and correlative properties of the elements in business logic layer were given. The invoking methods of interface components on application layer for the model base, resources base, organisation base and form base were realised by JavaScript, and the visualised process definition models were stored with which was alXML files eventually. This modelling tool can facilitate the process designers to define process and set process access control, ready applied to the standard training system of resident physicians, and its feasibility and practicability were certified. Keywords Workflow reference model Architecture Graphical modelling tool Access control XML file
1. 1
准
[ 4, 5]
体系结构
建模工具遵循 WFMC 提出的工作流参考模型接口 1 的标 , 结合 Web 技术实现了 B / S 结构, 客户机只需支持 Web
浏览器就可以方便地参与工作流建模, 最大限度地降低对硬件 环境的依赖, 实现数据在网络环境下无障碍地传递和共享 。 建 模工具体系结构如图 1 所示, 分为以下四层:
0
引
言
使用系统提供的相关图元和界面来进行逻辑模型的创建, 从而 实现矢量图形的绘制, 逻辑模型最终以 XML 文件存储。
工作流管理系统是企业业务流程管理自动化的软件实现, 它能够提高工作效率和工作质量 。工作流建模是将实际的业务 过程描述成计算机可处理的形式化表示, 是工作流管理系统的 重要功能之一, 没有过程模型定义创建出来的模型, 工作流管理 [ 1] 一个功能强大的、 便 系统就没有执行和调度的实体 。 因此, 捷的、 界面友好的过程建模工具对于工作流管理系统来说尤为 重要。 常见的过程建模工具有传统表单和图形化两种 。从实现技 表单式建模工具实现起来比较简单, 但是其建立过程不 术上看, 够直观和灵活, 对于建模人员来说, 无法随时从流程的全局考 尤其是对于功能复杂的流程 。 图形化建模工具的实现技术 虑, 比较复杂, 通常都是用 VC 等语言开发的桌面应用程序, 或是将 原来的 桌 面 应 用 程 序 制 作 成 AcitveX 等 插 件 嵌 入 到 浏 览 器 , 这些需要本地安装或是嵌入浏览器的程序会带来软件升 级和维护不便等问题。 中 基于 Web 技术的图形化建模工具能弥补这些不足 。 其采 用 B / S 结构, 是不需要安装任何软件就能让建模人员在浏览器 上绘制流程模型的一种工具, 即建模人员就像在纸上画图一样,
[ 2]
1
建模工具设计
工作流图形化建模工具能使用户以自然的方式创建工作模
型, 并为工作模型实例化提供必要的参数属性 。 在图形化的工 通过节点属性窗口, 可以方便地定义活动的基本属 作流模型中, 性, 系统还提供事务处理、 时间管理、 权限管理、 事件 / 动作处理 增加了工作流模型的柔性 。为了便于互操作, 整个 等高级特性, 而且能与工作流联盟的过程定义标准兼容 级特性, 工作流模型使用 XML 格式定义, 不仅能很好地描述过程建模高 [ 3] 。
图2
JavaScript 界面组件 UML 图
Component Panel
基本组件, 用来封装 HTML 文档元素。
面板元素, 图形化编辑区的基础, 对编辑区的所有 操作都在该面板元素上实现 。 ScrollPanel 卷轴面板元素, 继承了 Panel, 实现面板根据内 容大小, 自动显示或隐藏横纵滚动条 。 Frame 框架元素, 控制整个图形化编辑区的布局和样式 。 按钮元素, 实现了对所有按钮模式的设置以及按 。 Button OrganizeBase、 Re钮事件 的 监 听 可 以 调 用 ModelBase、 Button sourceBase 和 FormBase 中的内容, 实现按钮节点的不同功能 。 按钮模式, 设置按钮共性。 Button 是 ButtonModel 的具体实现。 ButtonModel ModelBase 点分配任务。 OrganizeBase 配管理者。 ResourceBase FormBase 模型库。按钮元素调用流程模型, 为子流程节 组织库。按钮元素调用组织模型, 为节点分
DESIGN AND IMPLEMENTATION OF WEBBASED WORKFLOW GRAPHICAL MODELLING TOOL
Shao Hong Wang Jun Cui Wencheng Zhang Wenjun
( School of Information Science and Engineering, Shenyang University of Technology, Shenyang 110178 , Liaoning, China)
资源库。按钮元素调用资源模型, 为节点实 例化设置相应资源, 以便工作流任务向前推进 。 表单库。按钮元素调用图形化表单, 为节点提 供可操作对象。 ActionListener ListenerProxy MouseListener 按钮元素事件监听接口 。 HTML 元素事件的监听代理。 鼠标监听接口, 鼠标对面板内图元的具体
第 27 卷第 2 期 2010 年 2 月
计算机应用与软件 Computer Applications and Software
Vol. 27 No. 2 Feb. 2010
基于 Web 技术的工作流图形化建模工具的设计与实现
邵 虹 王 军 崔文成 张文军
( 沈阳工业大学信息科学与工程学院 辽宁 沈阳 110178 )
1. 4
流程文件格式
工作流模型最终生成 XML 格式的流程文件, 它记录了建模
人员在浏览器中所设置的图元及其相应属性, 该文件是创建工 作流引擎能够执行的过程模型时真正需要的数据 。 XML 数据定义格式如下:
162
< workflow > < wfproperties > < sysid > < / sysid > < name > < / name > < desc > < / desc > < / wfproperties > < transitions > < transition > < tranid > < / tranid > < srctransition > < / srctransition > < objtransition > < / objtransition > < trantype > < / trantype > < precondition > < / precondition > < / transition > < / transitions > < activities > < activitie > < activitieid > < / activitieid > < activitiename > < / activitiename > < activitiedesc > < / activitiedesc > < xCoordinate > < / xCoordinate > < yCoordinate > < / yCoordinate > < width > < / width > < height > < / height > < activitietrigger > < / activitietrigger > < activitietype > < / activitietype > < activitietask > < / activitietask > < variable > < / variable > < rolelist > < / rolelist > < userlist > < / userlist > < / activitie > < / activities > < / workflow > < wsassignuser > < / wsassignuser >