Design and Implementation of Lightweight Workflow Engines

xiaoxiao2021-03-06  118

Chapter 1

1.1 Concept of lightweight workflow engine

The lightweight workflow engine refers to the completeness and complexity of the function of the workflow engine from sufficient, flexible, and low-cost design principles, just implementing the functional and characteristics of the workflow engine. The main consideration of the definition and interpretation of its data model is mainly considering the definition and interpretation of its data model, and the functionality of the task and the allocation and control of the task are not supported, such as a Built-IN) application development tool. Declats and integrity maintenance, perfect exception processing and long transaction control. The concept of lightweight workflow engine has opened up a new road to develop a developer of the development workflow management system. Workflow management technology itself is an abstract complex technology. It is committed to pursue a common model from enterprising a wide range of business, which describes the consistency of all business to achieve "4 Sea All available ". However, it is very difficult to work in this model, which is a very difficult job in this model. This is a very difficult job. And the concept of lightweight makes us realize that you can start from a general and simple business, and develop a information management system that adapts to their own business needs for enterprises and institutions. To improve work efficiency and ensure that it meets the increasing business needs in a long period of time.

1.2 Classification of the workflow management system and the side focus on this article

According to the characteristics of the workflow itself, the system modeling method, the underlying support technology used, and the implementation of the workflow process, etc., the workflow management system will be classified accordingly.

1.2.1 Documentation and the oriented process

The front side of the former is to distribute the documents, images, etc. of the electronic form, so that different people's processing and review are obtained. Existing file management and image management systems are such. In the process-oriented WFMS, the workflow is described as a sequence execution process. Information objects to be treated corresponding to each link. Data objects in each link can be distributed to other links in different ways. If the value of the data object can be used as a control condition, or other data objects, or the like. High-end WFMS is generally such systems.

1.2.2 Structured and Mi

Structured Workflow refers to repeatedly repeatedly in the actual operation, and strictly follows the business process of a fixed step. The various types of information needed to define such a workflow can be obtained by detailed analysis of the business process, thereby obtaining a complete process definition and reused in future applications. A large number of office procedures, such as document processing, approval, etc. That is the workflow for those repetitives that are not very strong or no repetitive, and the relevant parameters required for such processes (such as participants, etc.) cannot be determined in advance, but must postpone the process instance to run. OK, there may be some accidents in the middle of the execution process. This dynamic variable feature provides more complexity to the modeling and implementation of the process while providing higher flexibility.

1.2.3 Based on email and database-based database

The former uses email to complete the delivery of the message during the process instance, the distribution of information and the notification of the information. The low-end system is often used in this way, which allows for the full use of the information distribution function in the wide area environment, but the entire system will run in a loosely coupled mode. In a database-based WFMS, all materials are saved in some type of DBMS, and the execution of the process is actually queried and processing for these materials. The high-end large-scale system is generally generally this method.

1.2.4 Task Push and Target

The former refers to the execution of a link from the beginning of the process. After a activity instance is processed, subsequent activities will be created and activated, resulting until the entire workflow. This is the implementation method used by most process-oriented WFMs. In the WFMS that pulls the target, a business process is seen as a goal. Process instance is executed, the target will be decomposed to obtain a plurality of aspects of executable multiplexes associated with each other, where each of the links can also be further decomposed. After each link is executed, the entire process is completed. Target pull is a brand new execution method, which will have this feature. It should be noted that the above classification is only starting from different angles. In general, the latter features will bring better flexibility to WFMS, and will also become indispensable features that can support cross-institutional large-scale complex workflow management, WFMS for critical tasks. 1.2.5 Side of this article

The side focus of this article is not to fully implement all the functions of one of the workflow management systems, not to implement all the features of all kinds of workflow management systems, and the foregoing has said that this is a very difficult thing. So where is our side focus? It is the main feature of the four workflow management systems, which is a file-oriented, database-based, target-driven structured workflow management system, and to design and implement the core of the workflow management system - - Workflow engine. In general, most enterprise business is currently an application, document flow, notifications, etc. These businesses or needs to be viewed, or need to be approved, and the information of these services is basically in the form of files. Save on your computer, and some of these formatted materials are saved in the database, so the file and the database are an important feature of the lightweight workflow engine. The initiation and end of the business is a process task. The task can be decomposed into a link task, and the task is a purpose of purpose, and the purpose is to pull a link task in this process, so that the link task The promotion, eventually reached the purpose of the task. The process of these services is not random, but it has been strictly defined, and only the rules and process links that follow these processes can be completed. The lightweight workflow engine combines these, not pursuing the completeness and complexity of the workflow engine to meet the general business, quickly develop a workflow management system suitable for their business.

Chapter 2 Introduction to Workflow Management System Reference Model

Before you explain the workflow engine, let's take a look at the basic knowledge of workflow technology. As early as a few years ago, an international organization called "Workflow Management Alliance" (WFMC) is established in order to establish a standard standard of workflow management system. She proposed some specifications for the workflow management system, defining the structure of the workflow management system and its application programming interface between applications, management tools, and other workflow management systems, which is the workflow system reference model.

WFMC given the workflow reference model as shown below:

Interface 2

Interface 3

Interface 4

Interface 1

Interface 5

Process definition tool

Workflow API and exchange format

Workflow execution service

Workflow

(Workflow Engine)

Workflow

Management tool

Other workflow

Execute service

Workflow

Workflow customer application

Direct calls of workflow

Applications

Figure 2.1 Workflow reference model

As can be seen from the figure, the reference model contains five types of interfaces, namely:

(1) Interface 1: Process Definition Input Output Interface, is an interface between workflow services and workflow modeling, which includes communication establishment, workflow model operation, and workflow model object operation.

(2) Interface 2: Client function interface, this is an interface between workflow services and customer applications, which is the most important interface specification, which contemplates the functional operation of all client applications and workflow services. Including communication establishment, workflow definition operation (process model definition operation), process instance management function, process status management function, task item list / task item processing function, data processing, process monitoring, other management functions, applications activation. (3) Interface 3: Activate the application interface, which is an interface between the workflow engine and the direct call, including communication establishment, activity management function, data processing function.

⑷ Interface 4: Interoperable interface between workflow execution services, is an interoperable interface between workflow management systems, including connection establishment, a workflow model and an object of the object, control and status of process instances Description, the data is handled for activities.

⑸ Interface 5: System Management and Monitoring Interface, is interface between workflow services and workflow management tools, including resource control, role management, user management, process instance management, status management, audit management.

Five interfaces and corresponding API functions include all functions of the workflow management system. A complete workflow management system is based on a workflow engine, providing these five interfaces to external components (applications, or other workflow engines), providing all functions of its implementation.

Chapter III System Analysis and Design

After all preparations are completed, we start to perform system design and design, construct a lightweight workflow engine. The lightweight workflow engine does not completely implement the five interfaces included in the WFMC, especially interface 4, and has this interface in distributed workflow management systems. Since we start from a lightweight concept, we will no longer distinguish between the boundaries of each interface and their specific functions, with enough, flexible and low-cost design principles to design the workflow engine we understand. . We use the object-oriented method, first extract the objects included in the workflow model from many business needs, then analyze the logical relationship between the objects, then propose a system structure, then the module division, the database design, and final Complete the design of the class. The modeling tools used in us are Rose UML.

3.1 Design of Workflow Model

The design of the workflow model is an important part of the design of the workflow engine.

3.1.1 Objects of Workflow Models

Enterprise business process is a realization process of a business, we will be in detail from the general business and conduct detailed analysis of these businesses, and the result is to get a general business object, which abstract into a workflow model object.

3.1.1.1 Seeing business from a simple business example

A basic affairs of enterprises and institutions are currently in business trips. It is mainly to manage the management of other places for people in a certain work. We can list the related steps:

(1) Applicant needs a business trip, and he (she) has the right to travel;

(2) Applicant fills in the business trip table, indicating what is the business trip, where the business trip is applied, when will be returned, etc. and related to the business trip;

(3) Applicants need other illustrative purposes, can save more specific instructions in the form of documents;

⑷ Applicant confirmed the application to submit the application, waiting for the results of the application;

⑸⑸ According to the regulations, the application must first approve the applicant's previous level, then the application will hand over the leadership process in the form of a work item;

⑹ Treating the application for the application for the application, he (she) will first view all the information applied, including the application form and other documents related to it, and then approve it, the results of the approval are agreed. The sub-application will be handed over to the next level leadership; the results of the approval are not agreeable, the application is resected, notifying the applicant's application not adopted. All the leaders who need to approval are approved. The application is successfully completed, notifying the results of the applicant; Application for revision, re-submit the application;

⑻ ⑻ Application End.

This is a simple business example, analyzing the instance we can get some objects of the business:

(1) Applicant: He (she) belongs to a member of a department of the company, and has the right to start the business;

(2) Approval Leader: He (she) is also a member of a department of the company, and has the right to handle the business;

(3) Travel table: It is formatted by the business, and it is necessary

⑷ Details Specific Description: It is the information added by the business, you can don't

⑸ Applicant has filled in a good business test: it is an instantiation of a business trip, representing a specific application

⑹ Approval consent and disagree: They are the processing of this business, follow a certain business rule

⑺ Application: This is a process, not an action, take time and people's activities to complete

⑻ Approval: This is a activity, part of the process, and can be converted to another activity

⑼ Other Applications: Applicants should fill in the business trip to edit the instructions and save the corresponding external application and save it in a certain format. Approval leadership To view the differential descriptions, the corresponding external application will open the instructions. And displayed in a certain format.

From these business objects, use workflow technology, we can get some basic objects of the workflow model:

(1) User: As the applicant, approval leadership, they are users of the workflow management system, and they use the system's various functions and participate in business activities and promote the completion of the business.

(2) Role: Some people can apply for a business trip, and some people can apply for business trips, and these two different people can be used as two different roles. The role is a combination of a person or a number of people having a certain use system specific function.

(3) Workflow Application Information: Detail Application Form, Detailed Description of Traveling, these are relevant information about a specific business (here is business trip management), and we can process the service based on these business materials.

⑷ Activate application: These applications are activated when needed for other applications.

⑸ Process: The process of the entire business trip application is a process, which describes a business from the whole.

⑹ ⑹: Also known as the activity, it reflects the local conditions of the business process, and usually the business process consists of one one.

⑺ Process Instance: Instantiate the business process to this business process, get a process instance.

⑻ ⑻ An example: instantiate one of the processes to obtain an example of a link.

⑼ Business rules: The start and end of the business requires certain conditions, and these must follow the business rules in the process of processing the business, and only strictly follow the business rules, the business can be completed.

3.1.1.2 Specific analysis and description of workflow objects

Through a specific business, we can get some objects of the workflow model, then we analyze other general business, we will find their common, and summarize the public objects based on these services, these public The combination of objects is a general model, which is a workflow model. This model can describe each business, which is the ultimate result of the lightweight workflow engine. (1) User: Executivers and participants of the business, to each employee of enterprises, is an independent, entity with certain behavioral ability and certain technical capabilities;

(2) Role: The general title of personnel who can complete a feature is based on skills;

(3) The department: corresponding to the static structure of enterprises, decided by the actual department of enterprises, can be a traditional faculty-oriented, or now the popular process and customer;

⑷ Job: Prerequisites Administrative responsibility, representing management level relationships;

⑸ Working Group: An organizational structure of cross-sectoral division is dynamically formed by performing a certain task;

⑹ Process: Corresponding to a business process, a process of initiating, processing, and ending;

⑺ Process Instance: The specific application of a business process is the form of performance of business processes;

⑻ ⑻: Corresponding to a single business operation in the business process, the process is refinered according to business requirements;

⑼ ⑼ ⑼ 实: The specific application corresponding to a link is a form of expression of the circulation;

⑽ Workflow Define Principles: Describe the main information of a workflow model, from the whole to describe the workflow model;

⑾ Workflow Attachment Information: Describe an attachment information used in a workflow model, which is a workflow application information, or a business data. According to WFMC, this is not an object contained in the workflow model, but we format it, extract it into a model object, used to specify the workflow model in the specific application of applications. Format, we divide it into two categories:

● Table type: This is to save attachment information in the form of a table, which can define attachment information with a relational structure, and save it in the database, each record is an instance of an attachment;

● Document Type: Only saves attachment information in the form of file, it can be a Work document, or a text file, its instantiation is that a file with a corresponding business application flag is saved on the hard disk.

⑿ Workflow instance information: Describe information of a workflow model instantiated, as as information that starts a workflow, which records the business process as the end of time and personnel, until the end of the entire business;

⒀ Work Item Information: Describe a task assigned to a business application, which reflects the typical characteristics of participants and system interactions;

⒁ Business Rules: Describe the rules and principles that the business must comply with the process of operation, and it is also a rule that the business activity is proposed to another. We divide it into four types of rules, namely:

● Automated: It mainly describes some business rules that only view business information for participants, such as notices, document flows, and so on. This type of business does not require participants to approval or other artificial processing, only need to participate in people to see the content, the completion of the entire business process is fully automated.

● And aggregation: The completion of business activities is to take place to participate in the event. One person does not process it. The whole activity can only stop in the place, waiting for all personnel to process, when the last participant Execute the processing work, it can do it. ● Or aggregation: As long as there is a person who is involved in a business activity, the entire activity can be completed.

● Voting aggregation: Statistical participation of participating personnel of the participants, when meeting certain conditions can be completed.

⒂ Conversion Condition: Describe the process, the condition you need when the active status changes, is used for constraints during the business operation. For example, the completion of the process must wait for all activities to complete, and the completion of the activity must be done according to business rules.

⒃⒃ Activate application: Workflow management system requires support for other applications, such as editing and viewing text file information, etc.

⒄ Log Information: Describe all state changes in the workflow, events, and control flow related information, workflow instances, and start, end, hanging, and activation, etc., will be managed to manage it.

3.1.2 Logical relationship between objects

After finding the object of the workflow model, we start to analyze the business logic relationships between them.

3.1.2.1 Classification of objects and objects between individual categories

To this end, we must make a classification of workflow model objects, according to the work of workflow objects, we can divide the following categories:

(1) Organizational model

The organization model describes the organization of organizations, including objects, department, sector, position, role, working group, and their relationship can be represented by the following figure:

Set

Be responsible for

composition

composition

qualifications

composition

department

position

user

work group

Character

Figure 3.1 Tissue model structure

From the figure, you can see the relationship between them, the user is a basic unit, and the department is composed of the user. Each user corresponds to a position, responsible for the functions required by the position, users give a role with some qualifications, The working group is also composed of a user or consists of a role. These basic objects and their relationships have been able to meet the need for a lightweight workflow engine to organize the organization.

(2) Workflow definition model

The workflow definition model describes the definition information of the workflow model, including workflow definition principal information, process definition information, link definition information, workflow attachment information, business rules. The relationship between them is as follows:

Figure 3.2 Workflow Definition Model Structure

contain

contain

contain

contain

follow

contain

Workflow definition

Attachment information

Principal information

Business Rules

Link

Process

contain

The process is included in several links, while the link follows a certain business rule, plus the workflow master information and accessory information, and together constitute a workflow definition model.

(3) Workflow instance model

The workflow instance model describes the information when the workflow model is instantiated. Through this information we can know the various state changes and final results in the instance process, thereby obtaining a specific application of a business. It includes process instances, link instances, workflow instance information, work item information, and conversion conditions, and the relationship between them is shown below:

recording

recording

Refine

Refine

influences

influences

influences

influences

recording

recording

Conversion conditions

Oriental information

Process instance information

Work item information

Workflow instance information

Log information

Log information

Refine

Figure 3.3 Workflow instance model structure

Conversion conditions affect workflow instances, process instances, link instances, and work items, and by conversion conditions to determine their status transformation, workflow instance information à process instance information à link instance information à work item information, from top Refined by layers, not only knows the business operations from globally, but also from local understanding of the details of the business operation. And their state changes will be recorded in the log to track the operation of the workflow instance. ⑷ External support model

The external support model only includes only an object, which is an external application that needs to be activated. This is not part of the workflow model, but the external application required to provide interface deactivation provides support for workflow management systems. One of the functions of the model. With these external applications, our workflow management system has become more perfect.

3.1.2.2 Logical relationship between various models

Not only have certain logical relationships in each object in the model, but also there is a certain logical relationship between the various models, as shown below:

transfer

rely

use

Use roles and workgroups

User-defined

Workflow instance model

External support model

Workflow definition model

Organization model

Figure 3.4 relationship between model

User-defined workflow definition model of organizational model; Workflow definition model uses the role and working group of the organization model to specify the starting condition and task allocation condition of the workflow model, because the assignment of the workflow model starts and tasks must be sure The role or working group is completed; the workflow instance model relies on the workflow definition model while using all objects of the organization model, and the external support model is called to provide support.

3.1.3 Workflow instance, process instance, status conversion of work items

Workflow instances, process instances, link instances, and work items From different levels to describe the specific conditions of the service running process, different levels of users can see that users who create workflow instances can see workflow instances. Information and its status conversion, users involved in this workflow instance can see the work item information and its status of its status, and the system administrator can see all the information and its status conversion.

(1) Workflow instance status map

create

administrator

administrator

administrator

Running

(run)

Completed

(end)

normal circumstances

Suspended

(Hang)

Terminated

(termination)

Initial

(initialization)

Figure 3.5 Workflow instance status map

submit

(2) Process example status map

administrator

administrator

administrator

Running

(run)

Completed

(end)

normal circumstances

Suspended

(Hang)

Terminated

(termination)

Figure 3.6 Process instance status diagram

(3) an instance of the link

Processing

accept

carry out

Normal processing

not done

Abnormal processing

Fall back

Submit to the next link

Figure 3.5 Orientation example

⑷ Work item status conversion map

Wait for action

carry out

by

not done

Fail

No operation, timeout

Operate the next work item

Fall back

View

initialization

Not approved

Not viewed

Figure 3.5 Works status map

accept

3.1.4 Task Assignment

Task Assignment is an important feature of the workflow engine. When an instance is generated, the work that needs to be processed is assigned to a task item (work item) at a certain criterion (work item), and these users are one role or working group. We refine the roles and workgroups, you can get the following guidelines:

(1) Based on the department: This is to assign all the staff to a department to a certain department, and all the staff of the department participated in the task, so it will produce a work item for all the staff of the department;

(2) Based on position: This is to assign all the staff assigned to a position to a position. All the person who belong to the position is assigned to a work item; (3) based on departmental position: This is to assign the task to a department Everyone in a position, the person who is associated with the position of the department is assigned to a work item;

⑷ Based on everyone: This is to say that all people assigned to the business career, all of which are allocated to a work item;

⑸ Based on the Working Group: This is to assign the task to a particular working group of the enterprises industry, all of which are all assigned to a work item.

Based on sectors, based on the position, departmental position-based and all the four types based on all people are actually based on role, through these guidelines, we try to achieve strong adaptability to system and enterprises. And make the system have greater flexibility in the task assignment.

3.1.5 Meeting of Conversion Conditions

Workflow instances, process instances, states of process instances and work items have their own specific conditions, as follows:

(1) Conversion conditions for workflow instances

Workflow instances are initialized from the overall business operation, and the workflow instance is initialized and submitted to the workflow engine, which is processed by the workflow engine. At this time, it is based on the process. The state of the instance is constantly performing its own state change; when the administrator is suspended, it is suspended until the administrator reactivates it to make it in operation or terminate it is not normal end. When it is finished, it will end it.

(2) Conversion conditions of process instance

Process instances are also from the overall operation of the business, and the process instance starts its work when the workflow instance is initialized. During operation, it will change its own state according to the extent of each link, and when all of the link instances are finished, it will end properly; the administrator may hang it to make it hang, until the administrator is reactivated It makes it in operation or terminates it to make it abnormally.

(3) Conversion Condition

An instance of the link looks at the operation of the business from a certain aspect, and the link instance starts its work in the process when the process instance is run. The status of the subsequent example is determined by two aspects, one is the processing result of the work item, one is the provisions of the business rules.

● If the business rule is an automatic, regardless of the processing of the work item, the system is normal to complete the task item (give a specific user) after the system is completed;

● If the business rule is with aggregate, after all the task items are assigned, when all participants have processed the respective work items, the link is normal to complete, and during the processing, only one Work items are not normal, this link is not normal to complete in a normal end state; during processing, the work item has not been processed and there is no work item being abuts normal, then the process instance is still in the process;

● If the business rule is or aggregated, after the system is dispatched, as long as one work item is normal processing, the connection instance is normal to end the normal end state; if all the work items of all the association instances are not completed, Then the instance of this link is in a normal end state;

● If the business rule is a voting aggregation, after the system is assigned task, the extent of the statist work item is the normal completion of the normal completion of the work item when the normal completion of the work item is reached; when the work item is completed When the quantity does not reach the specified number, the link is not normally completed; when all work items have not been processed and the work items normally completed have not reached a specified number, the link instance is still in the process. ⑷ Condition of work items

Work items From more detailed aspects of business operation, the status of work items To see the participant's handling of work items and the provisions of business rules. We collect and aggregate, or aggregated and voted to aggregate these rules to manually intervene as artificial rules.

● If the business rule is an automatic type, the status of the work item that is associated with this rule is only the normal end state after normal processing, and of course, if the work item is not processed, it is in the process, which is not impact on the link instance and the like. ;

● If the business rule is artificial, there will be normal processing and abnormal processing. It is normal to process the work item to make the work item in a normal end state, and the work item is not regularly handled. Not normal end state.

3.2 System Structure

Based on the principle based on the lightweight workflow engine, we have made detailed analysis and detailed designs of the workflow model. Here we present a system structure, as shown below:

Workflow definer

Workflow

Parser

Instance Scheduling Center

Task Manager

Task dispatcher

Start controller

Workflow definition data

Workflow instance

data

Log

data

Workflow definition interface

Workflow instance interface

Organization definition

data

Organization definition interface

Organizational Defining

State converter

organization

Manager

Figure 3.6 Structure of Workflow Engine System

From the figure, you can know that the system provides three types of interfaces: an organization definition interface, a workflow definition interface, and a workflow instance interface. These three types of interfaces realize the main functions of the interface 1, interface II, interface three, and interface fifth; the system has an instance scheduling center, which is a very important part that controls the operation of workflow instances. The workflow parser parses the workflow model to assign the task item to the user who participates in the workflow instance, manages the information of each task item through the task manager, by starting control Control the start of the workflow and the startup information, control the status conversion of the workflow instance, process instance, link instance, and work items by state converter; organization definition arguer defines the organizational structure of enterprises; workflow defaults to define workflow models Information, and to obtain organizational definition information through organizational manager to provide organizational support for workflow models. Related information of each component processing is stored in the database.

3.3 Division of system modules

According to the different functional different we are divided into the following:

(1) User Management Module: Management of user information, including registered user information, logout user information, and query user information, etc .;

(2) Department management module: management of the structure information of enterprises, including increasing department information, deleting department information, query department information, etc.

(3) Job Management Module: Management of Enterprise Functions, including increasing job information, deleting job information, query job information, etc.

⑷ Role Management Module: Management of some skill information of enterprises, including new role information, deleting role information, query role information, etc.

⑸ Workflow Model Management Module: Management of Workflow Definition Model Information, including the definition of new workflow model information, delete old workflow model information, query workflow model information; ⑹ Workflow instance management module: for workflow instance The management of information, including starting a new workflow instance, query the workflow instance information, generate new link instance information in accordance with certain business rules, assign work items to the user, manage work item information, according to certain conversion conditions for workflow Examples, link instance conversion status, etc.

⑺ System Monitoring Module: Add the log, hang, activate the workflow instance for the status of the workflow instance, the link instance, and the like, to force the workflow instance, to make a reminder or warning for users who do not process their work items Information, see the completion of the completion of each workflow instance.

The division of the function module is well prepared for the implementation of the system.

3.4 Database Design

One of the characteristics of a lightweight workflow engine is to save the system, such as workflow model, information, workflow instance information, organizational model definition information, etc., are stored in a specific entity in the relational database. .

(1) Workflow definition master information table (WorkflowTable)

Static definition workflow main information, including the logo ID of this workflow (can be defined as "Workflow_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" form, X is automatically generated serial number), workflow name, workflow description, workflow type (workflow type has automatic workflow type Type, artificial and hybrid, automatic types do not require manual participation, automatic execution by the workflow engine, artificial needs, the hybrid type contains automatic and artificial), workflow creation date, workflow creator ID (Ie user ID), workflow creation a person name (ie, user name), workflow life cycle (each workflow instance has its lifecycle period, and died directly in this period), Currently, the number of workflow instances (record current workflow instance), workflow starter role (indicating which role can be initiated by this workflow, and users belonging to this role can initiate an instance corresponding to the workflow model). Important information about workflows also includes two aspects, one is the workflow attachment, because in the process of workflow, it will definitely bring some information. These information is the application form for business trips. For the official document, it is Word. Document forms of documentation may be a notice of notice, etc., etc .; one is a workflow process description, including a number of links (Activity), these links have a certain order, performing workflow order execution feature. Describe the workflow attachments and workflow flows from workflow definitions, is based on workflow accessories and workflow flow descriptions for different forms and quantities for different workflows, which is conducive to the expansion of workflow accessories and workflow flows. .

(2) WorkflowAtTachmentTable

Static defining the attachments required for workflow, including attachment ID (can be defined as "attachment_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" form, X is automatically generated serial number), workflow ID (which workflow belonging to), attachment type (table or file), attachment type Name (if the type is a table, the name of the table, if it is a Word document, the document name, if it is a text document, the file name), other information (if the type is a table, this field is somewhat Save all the information of all fields of the attachment table, including field name, field data type, data type length, field description). (3) Workflow Process Description Table (WorkflowProcesstable)

Static definition of workflow, consists of several links (Activity), one link is a record, including the workflow ID (the link to the workflow ID), the link ID (can be defined as "Activity_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" form, X is automatically generated Serial number, the link name (ie the name of the link), the link description (specific description of the link), the participant role ID (the user of the same permissions as a set, in the database, in the same role, the database, the specific operation, this item Identifies the role ID), the link task assignment rule, the last link ID (Save the ID of the previous link, can determine whether the beginning of the process is the beginning of the process, or the task of the link is not completed (approval, or no When completing within its lifecycle period, the important data item for rollback processing is completed. According to this data item, it can be rolled back to the previous link), the next link ID (Save the next link ID, can determine the link) Whether the end of the entire process, or the task of the link is completed, the next link can be started according to this data item, continue to advance forward).

⑷ Workflow instance launch description (WorkflowInstancestaTAble)

Dynamic Defining Workflow Instance Startup Information (In fact, this is also a workflow instance information table) The initiator must be prepared according to the workflow definition before generating a workflow instance, and the information of these preparations is filled in the table, then Delivery to the workflow engine. This description includes a workflow ID (the workflow ID), the workflow instance ID (identifies the workflow instance, can be defined as "WorkflowInStance_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" form, X is automatically generated serial number), workflow instance description, workflow instance Create a time, workflow instance creator ID (Gaoster ID), workflow instance creator name, current workflow status (identify the status of the current workflow instance, the initiator is not submitted to the workflow engine before being created For the "initialized" initialization status, the status should be set to the workflow type), the current state specifically description, the current operator ID (who is to be operated by the current workflow), the current operator name. Workflow instance completion flag (identifying the completion of the workflow instance), workflow instance completion time, current workflow status, and current operator ID and current workflow status specifically described three items during the workflow instance, you can dynamically Track the work of this workflow instance, and these three items plus the workflow completion flag and workflow completion time, you can know the completion of the workflow instance. ⑸ Workflow instance process description (WorkflowInstanceProcessingTable)

Dynamically describe the processing of workflow instances in units, and after the initiator creates a workflow instance, the workflow instance is operated based on the process defined by the workflow. Including the workflow instance ID, the workflow instance corresponds to the workflow is composed of a series of links, transitioned to another as a predefined process, and the current link is status (which identifies the link) In the state of the process, the final state represents the completion of the link), the current operator (corresponding is a role), the current state specifically described.

⑹ Work item description (WorkItemTable)

Dynamic Description The work of participants that have been participated in the workflow instance (corresponding to each user of the role of the processed link). Including work item ID (can be defined as "WorkItem-_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" form, X is automatically generated serial number), work item name, work item description, workflow instance ID (workflow instance to which the work item belongs), the link task Dispatched Rules (Inherited Task Dispatching Rules, used to determine the step task completion mode), the status of the current work item (different status according to different workflow types, according to these states can be displayed on the participant interface Work item list), perform actions (how do the executor performs how the work is performed, if the application is approved or approved by the approval, the execution time (record the time of execution), user ID (Signing this work item is who is.

⑺ User Description (UserTable)

This table describes the information of all users, including user IDs (can be defined as "user-_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" form, X is automatically generated serial number), user name, user password, user belongs, position, etc. Information, level is the user System authority, including ordinary staff, senior staff, and system administrators. ⑻ Log Information Description (LogTable)

Describe the user's work logging to facilitate tracking of various operations. Including the log ID (can be defined as "log-_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" form, X is automatically generated serial number), etc., one is the relevant work item ID, this is when the participant performs operational operations on the original work item item.

⑼ Role Information (Roletable)

Describe the information of the role, including the role ID (can be defined as "role__xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" form, X is automatically generated serial number), role name, department name, job name, role description. The role consists of a department and position.

⑽ Department information (DepartmentTable)

Describe the information of the department, including department ID (can be defined as "depatment_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" form, X is automatically generated serial number), department name, department other information.

⑾ position information (positionTable)

Describe the information of the position, including position ID (can be defined as "position_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" form, X is automatically generated serial number), position name, job other information.

In addition to these main tables, there are some additions to the database when defining a workflow model, such as a table for the workflow attachment type. In order to reduce network traffic and improve system running speed, we write some associated database to store procedures:

(1) Deleting a workflow model stored procedure: Delete a workflow model, you must delete its workflow definition principal information, and delete the corresponding attachment information, the tables, and link information;

(2) Creating an attachment type Table: Define the field information of the table in other information fields of the attachment information, and there is a certain format, then restore the form in a certain format in this field. Field information and create this form based on this information.

3.5 design

With object-oriented methods and UML modeling tools, according to system structural diagrams, modules and database design, we translate objects into classes and make classes. We divide the class of the entire system into three parts. First, the entity class, the second is the business class, the third is the interface class.

3.5.1 Design of entity

The object of the workflow model is a entity, and the physical class is divided into database access classes and value object classes. The database access class is a class that is accessed (insert, delete, updated, query) stored in the database, and the value object class is an entity information class exchanged between the client and the server side.

3.5.1.1 Database Access Class

(1) Database Connection Class: This class is the parent class of other database access classes, manages the connection to the database, responsible for the use of available databases from the database connection pool to other database access classes, after use, responsible for putting back the connection pool, class diagram is as follows Photo:

Description: The property has only one connection, which represents a connection of the database, the type is Connection, and the method has a constructor WorkflowDao () and a function closeConnection (). WorkflowDao () implements a useful connection from the database connection pool and assigns a value Connection, and CloseConnection () is responsible for placing the connection back to the database connection pool. (2) Workflow definition master information access class: The workflow of the corresponding database defines the main information table, which encapsulates various operations recorded for the table, which is inserted or deleted a workflow definition principal information, querying specific workflow definition information or All workflow definition information, class diagrams are shown below:

Description: Constructor WfDefineMainInFodao () calls the parent class constructor to find a available database connection from the database connection pool (other database access classes).

(3) Workflow Process Information Access Class: Workflow Process Description Table, which encapsulates various operations recorded for this table, and the process consists of several links, which is inserted or deleted a link information, query the same as one process. Information, etc., class diagrams are shown below:

Note: The FindWorkflowFirlstActivityInfo () function is responsible for finding the first link of the workflow model, findWorkflowNextActivityId () is responsible for finding the next link according to the current link ID.

⑷ Workflow Accessories Information Access Class: Corresponding Workflow Accessories Information Table, the class encapsulates various operations recorded in the table, which is inserted or deleted a workflow attachment information, queries an attachment information that belongs to a workflow model. The class diagram is as follows:

⑸ Workflow Accessories Type The Information Table of the Table: Corresponding to the workflow accessory type is a table information table, the class encapsulates the various operations recorded by the table, which is the specific information of the insert or query a workflow accessory type. The class diagram is as follows:

⑹ Workflow instance start information access class: Corresponding workflow instance launch information table, the class encapsulates the various operations of the table record, is inserting or querying a workflow start message, querying workflow instances belonging to a user Update some field information, class diagrams are as follows:

Description: selectFinishedWorkflowInstanceStartUpInfoVO () is responsible for querying and workflow information has been completed specific user-initiated, selectNotFinishedWorkflowInstanceStartUpInfoVO () is responsible for querying the workflow information and is not yet complete specific user-initiated, updateWFInstFinishedFields () is responsible for updating certain at the end of the workflow instance Field information, updatewfinstprocessingfields () is responsible for updating a specific field information in the workflow instance running project.

⑺ Workflow Instance Process Information Access Class: Corresponding Workflow Instance Process Meter, the class encapsulates the various operations recorded by the table, and each record is actually a link instance, which is inserted, deleted, or query a link instance information. Query all link information of the specified workflow instance, update some information fields, class diagrams are as follows:

Description: SetwfinstProcessingCurrentPerForNumField () is responsible for updating the number of users who have handled the work items corresponding to the link instance, updateWFINSTPROCESSINGFIELDS () is responsible for updating a particular field information during the Process Processing process.

⑻ Work Item Access Table: Corresponding work item table, this class encapsulates the various operations recorded by the table, is to insert or delete a work item information, query work item information, update work item information, class diagram as follows: SELECTFINISHEDWORKITEMVO () Responsible for querying the work item information that a particular user has handled, selectNotyetFinishedWorkItemvo () is responsible for the work item information that has not been processed, updateWorkItemFields () is responsible for updating the specific field information in the process of work items, isperformedinworkItemByuser () is responsible for judging the work Whether the item has been processed.

⑼ User Information Access Table: Corresponding to the user information table, the class encapsulates the various operations of the table record, which is inserted, deleted, or query one user information, query the user information corresponding to the specific role, the class diagram is as follows:

Description: SELECTCOUNTRS () is responsible for counting the number of users belonging to a role.

⑽ Role Information Access Class: Corresponding Role Information Table, this class encapsulates the various operations recorded, insert, delete, or query one role information, query all role information, class diagrams are as follows:

⑾ Department Information Access Class: Corresponding Department Information Table, the class encapsulates the various operations recorded in the table, is inserted, deleted, or query a department information, query all department information, class diagrams as follows:

⑿ Job Information Access Class: Corresponding position information table, the class encapsulates the various operations recorded in the table, which is inserted, deleted, or query a job information, query all position information, class diagrams as follows:

⒀ Log Information Access Class: Corresponding log information table, the class encapsulates the various operations recorded in the table, which is inserted, deleted a log information, query specific log information, class diagrams as follows:

3.5.1.2 Value Object Class

The value object class is actually a data structure for data exchange between the client and the server, and it is also used for the data transfer of the object instance. It has several properties, but very few methods, the corresponding database table after instantiation. recording.

(1) Workflow defines the primary information value object class: You can save a record information of the workflow master information table, the class diagrams are as follows:

(2) Workflow Process Information Value Object Class: You can save a record information of the workflow information table, the class diagrams are as follows:

(3) Workflow Accessories Information Value Object Class: You can save a record information of the workflow accessory information table, the class diagrams are as follows:

Description: setotherInfo () is responsible for saving the table field information of the workflow attachment type in OtherInfo in a certain format, and getotherinfo () is responsible for restoring the workflow accessory information from OtherInfo to the table field information.

⑷ Workflow Accessories Type Table Information Value Object Class: You can save a record information of the information table of the workflow attachment type as a table, the class diagrams are as follows:

Note: TABLENAME is the table name of the workflow attachment type, FieldValue is the value of each field value for a record that should be, saved with a variable length array vector.

⑸ Workflow instance Start information value object class: You can save a record information of the workflow instance launch information table, class diagrams are as follows:

⑹ Workflow Instance Process Information Value Object Class: You can save a record information of the workflow instance process information table, class diagrams are as follows:

⑺ Work Item Information Value Object Class: You can save a record information of the work item information table, the class diagrams are as follows:

⑻ User Information Value Object Class: You can save a record information of the user information table, the class diagram is as follows: ⑼ Role information value object class: You can save a record information of the role information table, the class diagrams are as follows:

⑽ Department Information Value Object Class: You can save a record information of the department information table, the class diagrams are as follows:

⑾ Job Information Value Object Class: You can save a record information of the job information table, the class diagrams are as follows:

⑿ Log Information Value Object Class: You can save a record information of the log information table, the class diagrams are as follows:

⒀ Information Collection Value Object Class: You can save a collection of information, you can use this class when you need to return multiple record information, class diagrams are as follows:

Explanation: Only one property is a variable length array that can be stored in a number of record information.

3.5.2 Design of Business Class

The business class is actually the boundary class, which linked to each entity class according to the needs of the system to implement various functions of the system. According to different implementation, we can be divided into user management classes, role management classes, department management classes, job management classes, workflow model management classes, workflow instance management classes, and system monitoring management classes.

(1) User Management Class: Responsible for users' registration, logout, testing legality, find user information, class diagrams are as follows:

(2) Role Management Class: Responsible for adding roles, deleting roles, looking for role information, class diagrams as follows:

(3) Division Management Class: Responsible for new addresses, delete the department, find department information, class diagrams are as follows:

⑷ Job Management Class: Responsible for adding positions, deleting positions, finding department information, class diagrams as follows:

⑸ Workflow Model Management Class: Responsible for the definition, parsing, class diagram of the workflow model, as follows:

⑹ Workflow instance management class: responsible for the creation of workflow instances, maintaining the status information of various instances, assigning tasks to users, user processing work items, etc., class diagrams are as follows:

Description: UploadAtTachmentToServer () is responsible for uploading the workflow accessory type to the documentation to the server-specific directory.

⑺ System Monitoring Management Class: is a comprehensive class, mainly by calling the functions of other management classes, is the process status of the workflow instance, the degree of completion, the need to control the instance, activate the instance according to certain conditions , End, see the work of each participating user, take certain measures in the event of a work error, accident, abnormal, etc. to ensure the completion of the entire instance. And all of this is saved in the log.

3.5.3 Design of Interface Class

Interface classes are classes that the workflow engine is provided to the external application, and the application system implements a certain application function by calling these classes. We take the design of the interface class, hidden system complexity, and functional calls, and make a simple and easy-to-understand function call interface for external application systems. Therefore, we design these classes to have only one business class instance, a class of a TodowHat () method, and each service class corresponds to an interface class. In these interface classes, the business class instance As a data member, the Todowhat () method has two parameters, Todocode, and Object (data exchange object), the work code indicates the identity of the function to be called, data exchange The object representation function calls the data to be processed (applied data). In essence, various methods of application data are processed according to different methods of the business class instance according to different work code. Chapter IV System Realization

The implementation of the system mainly includes a solution for key issues and a practice of workflow management applications. First, a key issue is proposed, then given the solution, and finally propose an application architecture to implement a simple workflow management application system based on a lightweight workflow engine with J2EE technology and database technology.

4.1 Solutions for Key Problems

When implementing a workflow engine, there are some key issues, such as launching a workflow instance, pushing the process of workflow instances, and the processing of attachments for documents, etc., are subject to focus.

4.1.1 Startup workflow instance

When the corresponding workflow model is created according to various business needs, the organizational model is created according to the structural organization, and the user can create a workflow instance and start it. The user submits the information of the workflow instance to the workflow engine, so how does the workflow engine work? The workflow engine has actually made a series of work, which is as follows:

(1) The workflow engine gets the workflow instance data created by the user, and records in the workflow instance to start the information table;

(2) Workflow engine parses the meaning of the workflow model of the workflow instance to obtain the necessary information to the workflow instance;

(3) The workflow engine finds the first link information of the workflow model corresponding to the workflow model according to these necessary information, and generates the first link example of the workflow instance, recorded in the workflow instance process description table;

⑷ The workflow engine begins to assign the task item to all users who participate in the instance of this link according to the task assignment principle;

⑸ Workflow Engine According to the participant role of the partition, find all users belonging to this role, generate a work item for each user, record in the work item information table, work item to inherit the service defined by the link Rule, complete the assignment of the task;

⑹ The workflow engine is based on the business rules defined by the link. If the link is automatically type, then the next link information will be found according to the link information, and perform the next link instance. Processing; if the link is not an automatic type, it is necessary to manually participate in processing, then the workflow engine suspends the processing of the workflow instance, waiting for the result of the user processing;

⑺⑺ Start the work of the workflow instance end.

4.1.2 Proprovation of workflow instances

(1) If the business rule defined by the previous link is automatic, the next link will be found according to the current link information;

(2) If the business rule defined by the previous link is automatically type, wait for the user to process the respective work items. When each user is processed, the workflow engine must determine whether the connection instance ends and ends. It is the provisions of the business rules and the results of the user.

1 If the business rule is with aggregation, when the result of the current user is not properly handled, the process is ended, and the workflow instance is also ending, notifying other users who have not processed, the link has ended, and recorded accordingly In the database table; when the result of the current user is processed, it is again determined whether all participating users have been processed, if so, the link is ended, notifying other users to end, and record in the corresponding database table , Then look for the next link, if not the processing result of the user waiting for other frequently processed. 2 If the business rule is or aggregated, when the result of the current user is normal processing, the instance of the link ends, and the workflow instance ends, notifying other participants, the user has not been processed, the example is over, recorded In the corresponding database table, then look for the next link; when the result of the current user is not normal, wait for the processing results of the user who have not processed.

3 If the business rule is a voting aggregation, when the result of the current use is normal processing, the counter is added to the counter normal processing result, and then determines whether the quantity of the statistics has reached the quantity, if so, the link instance is ended. And notify other users who haven't processed this connection instance, recorded in the database table, then look for the next link; when the current processing result is not normal, it is not statistics, waiting for the processing of other users who have not processed. result.

(3) After the current segment instance, the workflow engine will find the next link. If there is no next link, the workflow instance is ended, recorded in the database table, if there is also a link, the same generation of the link instance, perform task assignment , Waiting for the end of the example. The workflow engine is such a process of advanceing the workflow instance process, from an instance to the next instance link until the workflow instance ends.

4.1.3 Treatment of Accessories for Documents

For an attachment in the form of document, we use upload files to the server. After the user edits the document, uploaded to the specified file name to the specific directory in the server, when the user wants to view the document, the workflow engine will be based on the attachment. The information corresponding to the document is obtained, and the user is downloaded to the local user based on the file name, and the external application is called, such as Work2000, and Notepad opens to browse its content.

4.2 Realization of a simple workflow management system

Now, we use J2EE technology to develop workflow engines, and make a simple application system to demonstrate the feasibility of system design. We use JBuilder9.0 to develop tools and do a database management system with MS SQLServer2000.

4.2.1 System Application Framework

Workflow instance manager

Workflow model manager

Organizer

System monitor

Workflow engine

application server

database

Web interface

Document management system

Figure 4.1 System Application Framework

4.2.2 Application of J2EE Related Technology

J2EE provides a container platform for multi-layer web applications, using J2EE technology to develop workflow management systems into a multi-layer web application system, is the most suitable.

4.2.2.1 J2EE Core mode and class implementation

Mode is a reproducible solution for a particular problem, and the usage mode has a great advantage. Mode can weigh a solution that has been confirmed, providing a common vocabulary for communication, and the scope of the resolution. The J2EE core mode is a model applied on the J2EE platform. It has a specific mode in the representation layer, the business layer, and the integration layer, providing a good solution for the development of J2EE platforms. For the implementation of the class, we use the J2EE core model. The main model is the core model of the business layer is the ValueObject (value object) of the business layer and the DAO of the integrated layer (DataAccessObject, data access object). (1) Value Object: Based on multi-layer application architecture system, clients and server-side often have a large amount of data exchange, and the client calls are remote, not local, in order to mitigate network loads, improve applications, Use the value object package service data to exchange data between the client and the server. Therefore, we use all of the workflow objects to indicate the value object, and the workflow defines the main information value object class (WFDEFINEMAINFO). In these values ​​objects, all attributes and methods are declared as public, and few methods, many properties, these attributes are the properties of the corresponding workflow object, and corresponding to a field in the database.

(2) Data Access Object: System based on relational database technology, the database is frequently accessed, the database table is numerous, and many of the ways to operate, if these tables and tables are not intended to classify, Will only cause a reduction in module aggregation, and the consequences of the code confusing. We use data access objects to abstract and encapsulate access to the database, all of which involves database access using data access objects. All data for the workflow object is saved in the database, and we are encapsulated in the data access object for each object data, and the WFDEfineMainInfodao will be defined in the data access object.

4.2.2.2 JavaBean Technology and Class Implementation

JavaBean is a software component model based on Java technology, which is a portable software component module written in Java language. We implement all the classes of the system as a JavaBean, improve the reusability of classes, which is conducive to future features. In addition, JavaBean is applied to JSP, which can bring better scalability for JSP applications.

4.2.2.3 Implementation of JBoss Application Server and Workflow Engine

Application Server We use JBoss, this is a free product, which provides services such as Database Access (JDBC), Name Mechanism (JNDI), support database connection pool, instance connection pool, which provides our workflow engine implementation Support, bringing great convenience to system development.

(1) Support for database access: JBoss passes through the configuration of a specific database management system, and instantiates several connections to the database, put it into the database connection pool, and is supplied to the system. During the JBoss operation, these databases are effectively managed, and the workload of the workflow engine is reduced.

1 configuration method

MSSQL-DS.XML file:

MSSQLDS

/ * Data source name * /

JDBC: Microsoft: SQLServer: // localhost: 1433; DatabaseName = WorkflowDB

/ * Connect the URL, including the server

Address, Database Name * /

com.microsoft.jdbc.sqlserver.sqlserdriver / * SQLServer driver * /

Workflowuser

/* user name */

123456

/* user password */

2 calling method (using JNDI mechanism)

Part of code:

InitialContext CTX = New InitialContext (); // Initialization Context

DataSource DS = (Datasource) CTX.lookup ("java: / mssqlds");

/ / Find the data source that has been configured according to the data source name

Connection conn = ds.getConnection ();

// Call the method to get a connection to the database, and this connection has been initialized by JBoss, which is actually found on the database connection pool, and then through the connection, you can perform a variety of operations. After the operation is completed, it is not explicitly closed, and JBOSS will automatically recover the connection and re-put the connection into the connection pool.

(2) Support for object instantiation

When the system generates an object instance, JBoss is managing the instance, putting the instance into an instance pool, does not release it, when the system wants to generate the instance, no longer perform instances of this object Instead, JBoss finds this example from the instance pool and is provided to the system, which significantly improves the speed of the system.

(3) Support for threads

When different user login systems, and the use of all the features of the system, JBoss will assign a thread to each user to work, these threads are placed in the thread pool, and JBoss always manages this thread pool during operation. Improve the concurrency performance of the system.

4.2.2.4 Implementation of JSP / Servlet Technology and System Interface

JSP technology can easily establish a dynamic web page, providing a friendly user interface, and easy to call JavaBean, complete complex business features; servlet provides the function of requesting and response services in the web, the client provides service provided by the client All requests and responses are implemented through servlet. JSP finally resolved to servlet.

(1) JSP call javabean

Below is a JSP page partial code for creating a workflow definition master information:

... <% wfdefinemaininfo wfdefinemaininfo = new wfdefinemainInfo (); ... // Fill workflow define principal information value object WfDefineMainInfo instance WFManager .Todowhat (0, (object) wfdefinemaininfo; // Call the interface class method, 0 Calcodes Code Codes Codes Code%> (2) SERVLET Request and Response Services The following is the request to get form information (this is the workflow definition The content of the main information value object) section code:

<% String WorkflowName = Request.getParameter ("WorkflowName"); String WorkflowDesc = Request.GetParameter ("WorkflowDesc"); // Request is the request object, calling its method getParameter () You can get the form of the form ... // One one Get information%> The following is part of the response to the user's code:

<% Response.sendredirect ("DefineWorkflowModel-maininfo.jsp"); // Response is a response object, calling its method sendRedirect () sends a page redirection to the user. %> 4.2.3 Specific Coding Realization

The next job is the code work, as a development tool as a development tool, perform code control tool in JBulider9.0, performs code control, unit test, comprehensive test, and finally get a lightweight workflow The engine's simple workflow management system.

Chapter V Systemation

The lightweight workflow engine discussed herein, although there are many advantages, it starts from sufficient, flexible and low-cost design principles, and does not pursue the fullness and complexity of the workflow engine, there is some shortcomings:

(1) Does not support complex business: The lightweight workflow engine discussed in this paper is the design workflow model from the demand for general business. We only realize the single branch of the event, which is a follow-up activity of the workflow process is a follow-up activity. Complex business may have multiple branches after an activity, there are multiple follow-up activities, forming a tree structure. Therefore, the non-support for complex business is the biggest shortage of workflow engines discussed herein.

(2) Does not support complex organizational structure: The workflow engine discussed herein is to describe the organizational structure with functional institution model. It is mainly based on department and position, and task allocation is only distributed in accordance with different combination of departments and positions. Complex tissue structural models can define multiple roles, temporary working groups, and more. (3) There is no support for Built-in, for example, a visual workflow modeling tool, FORM design tool, which does not implement a certain interface in this paper.

⑷ Do not support all data types and integrity maintenance in defining application data, only support characters type and some simple data saving work.

⑸⑸ There is no perfect exception handling function. The capture and processing of abnormalities is not perfect, and the error message cannot be displayed to the user in time.

⑹ ⑹ There is no perfect transaction control function. Only simple transaction control is achieved without the control of complex transactions.

Chapter 6

This paper mainly explores the design and implementation of the lightweight workflow engine, first we must understand the relevant knowledge of workflow technology, then explain the reasons for the development of lightweight workflow engines, and then start from enterprises and institutions, abstract Workflow object, analyze the logical relationship between it, constitute a workflow model, followed by proposing a system structure, performing module division, design, design, and finally utilizing J2EE technology, use MS SQLServer2000 for Final Database, JBuilder9.0 Development tools, VSS makes version control, realize the development of workflow engines, and make a simple application system based on the workflow engine, ultimately implement a workflow management system. The normal operation of the management system fully reflects the value of the lightweight workflow engine in the development of enterprises and business services.

references

[1] Fan Yushun, "Foundation of Workflow Management Technology", Tsinghua University Press

[2] Deepak Alus is waiting, "J2EE core mode", machinery industry publishing house

[3] Wang Kehong is waiting, "Java Technical Tutorial (Intermediate)", Tsinghua University Press

[4] Wendy Boggs Waiting, "UML with Rational Rose From Getting Started", Electronic Industry Press

[5] Borland, "Borland JBuilder Practical Technology Manual, Electronic Industry Press

[6] He Qingfa is waiting, "The Lightweight Workflow Engine Based on Relationship Structure", the Research Institute of the Chinese Academy of Sciences

[7] Joseph L. Weber, "Java 2 Programming Detailed", Electronic Industry Press

转载请注明原文地址:https://www.9cbs.com/read-126945.html

New Post(0)