| With the trend of Business Process Automation, workflow technology has become a researchable hot spot recent years, which has been widely used in E-Commerce, office automation and other fields. Workflow engine is the core component of Workflow Management System. It is the key to Enterprise Application Integration.Owing to the poor presentation about interoperability and integration of the current workflow applications, combining WFMC workflow technology standards, this paper presents a lightweight workflow engine development methodology to ensure the availability of the workflow engine and convenience. This article contains the following researches:1. The analysis of the workflow process model. Basing on the analysis of XPDL design principles, a method parsing process model described in XPDL is proposed and implemented. In this method, the syntax correctness of the model can be verified with XPDL Schema.2. The accomplishment about the work list supporting a variety of data formats. The work list as a workflow instance data storage structure, by using the common operation methods, achieves a series of data management functions, such as process instance data access and transformation, message analysis and dispatch, command parsing and call, report filtering and combination.3. The design and implement of a parallel architecture about the execution module of workflow engine. With separation of functions by the module, and association with interpretation when executing, this architecture maximizes the isolation effect between the enterprise application and workflow system, and improves deployment capability and scalability.4. The design and implement the merging and executing algorithms of Petri net combined with workflow patterns. According to process model, the workflow patterns will be matched automatically, and the execution module could call the corresponding merging methods to make the process model map to a Petri net model for simulation and operation.5. The implement of the binding and occuring algorithm of colored Petri net. Based on facility of the expression evaluation and custom-design variables, the arcs expression in colored Petri net are extended to bind variables, so make sure Petri net model could fire transition with expressions which contain custom variables. This feature allows the engine to support more realistic description of the process model in transformation and simulation.6. The approach for external application integration. To a process of logistics distribution, for example, the results of analyzing logic and data relationships will be transformed into XPDL process models. Through the transformations and execution of process model and calls among the specific application of logistics activities, the engine can complete the simulation in case of logistics distribution process.This article uses the Ruby scripting language for workflow engine development. Combined with Behavior-Driven Development approach, the functions of the engine were analyzed and architecture was designed. Based on the basic function implements of the engine, an iterative approach was used to extend the engine's capabilities, so as to make engine as a flexible, convenient and operable workflow system component. |