• 论文 •    

可自管理的分布式工作流引擎的设计与实现

辛  鹏,王少锋   

  1. 清华大学 软件学院,北京  100084
  • 出版日期:2005-11-15 发布日期:2005-11-25

Design and implementation of self-managed distributed workflow engine

XIN Peng, WANG Shao-feng   

  1. Sch. of Software, Tsinghua Univ., Beijing  100084, China
  • Online:2005-11-15 Published:2005-11-25

摘要: 针对当前企业和政府对分布式工作流应用的需求,给出了一个基于Java管理扩展框架和观察者模式的可自管理的分布式工作流引擎的设计与实现。在该实现中,以观察者模式为主控引擎与各个执行引擎进行分布式协作。利用Java管理扩展框架通知模型和Java管理扩展框架时间服务实现观察者模式的异步特性。主控引擎充当目标对象,所有的执行引擎充当观察者并关注主控引擎的状态改变。主控引擎的调度机采用轮转法为所有的实例活动动态分配执行引擎。执行引擎通过在启动时自动注册到主控引擎,关闭时自动从主控引擎注销,实现了整个系统的可自管理性,而以工作流命名空间的形式对工作流相关数据的封装和企业级Java bean容器提供的良好的事务特性,保证了整个系统的可靠性。

关键词: Java管理扩展框架, 观察者模式, 分布式工作流引擎

Abstract: To deal with application requirements on distributed workflow engine from enterprises and government, a design and implementation of Self-Managed Distributed Workflow Engine based on Java Management Extensions (JMX ) and Observer Pattern was presented. Communications between the central engine and the executive engines were realized by the Observer Pattern. The asynchronous characteristics were implemented by making use of JMX Notification Model and JMX Timer Service. The central engine acted as the object, and all the executive engines acted as the observers to observe the state changes of the central engine. Adopting the Round-Robin algorithm, the scheduler assigned an executive engine for each activity. The executive engine registered with the central engine during the start time, and logout from the central engine during the close time therefore the self-managed workflow system was implemented. The encapsulation of workflow relevant data by the Workflow Namespace object and the good transaction provided by the Enterprise Java Bean (EJB) container ensured the reliability of the workflow system.

Key words: Java management extensions, observer pattern, distributed workflow engine

中图分类号: