Summary of the invention
The technical problem to be solved by the present invention is to how provide a kind of workflow processing method, device and workflow to draw
It holds up, to solve the problems, such as existing workflow development larger workload.
For this purpose, in a first aspect, the present invention proposes a kind of workflow processing method, which comprises
When detecting operation system starting, process parameter's table in storage unit is obtained, and according to the process parameter
Table product process object, so that cache unit caches the flow object, it include the operation system in process parameter's table
Preset process parameter's information;
When detecting workflow-initiating, from the flow object in the cache unit, obtain and the workflow pair
The flow object answered, and after handling the flow object, update the traffic table and process recording in the storage unit
Table;The process recording table is stored in the storage unit for recording the table of workflow;
When detecting workflow inquiry, from the flow object in the cache unit, obtain and the workflow pair
The flow object answered, according to the process recording table in the flow object and the storage unit, assembled flow chart is simultaneously shown
Assembled flow chart.
Optionally, described when detecting workflow-initiating, from the flow object in the cache unit, acquisition and institute
State the corresponding flow object of workflow, and after handling the flow object, update the traffic table in the storage unit with
And process recording table, comprising:
When detecting workflow-initiating, the process encoding and business record for obtaining the workflow are identified;
From the flow object that the cache unit caches, flow object corresponding with the process encoding is obtained;
From the traffic table in the storage unit, business information corresponding with business record mark is obtained;
Check whether the flow object matches with the business information, if it does not match, sending miscue information;
If it does, then increasing process recording in the process recording table in the storage unit, and update the traffic table.
Optionally, described when detecting workflow inquiry, from the flow object in the cache unit, acquisition and institute
The corresponding flow object of workflow is stated, according to the process recording table in the flow object and the storage unit, assembly is simultaneously
Flow for displaying figure, comprising:
When detecting workflow inquiry, the process encoding and business record for obtaining the workflow are identified;
From the flow object that the cache unit caches, flow object corresponding with the process encoding is obtained;
From the traffic table in the storage unit, business information corresponding with business record mark is obtained;
By the process recording table in the flow object, the business information and the storage unit, assembly is simultaneously shown
Show flow chart.
Second aspect, the present invention also propose that a kind of workflow engine, the workflow engine include:
Generation unit, for detect operation system starting when, obtain storage unit in process parameter's table, and according to
Process parameter's table product process object includes in process parameter's table so that cache unit caches the flow object
The preset process parameter's information of operation system;
Processing unit, for when detecting workflow-initiating, from the flow object in the cache unit, obtain with
The corresponding flow object of the workflow, and after handling the flow object, update the traffic table in the storage unit
And process recording table;The process recording table is stored in the storage unit for recording the table of workflow;
Query unit, for when detecting workflow inquiry, from the flow object in the cache unit, obtain with
The corresponding flow object of the workflow, it is assembled according to the process recording table in the flow object and the storage unit
Flow chart simultaneously shows assembled flow chart.
Optionally, the processing unit, comprising:
First obtains subelement, for when detecting workflow-initiating, obtaining the process encoding and industry of the workflow
Business record identification;
Second obtains subelement, for obtaining and the process encoding from the flow object that the cache unit caches
Corresponding flow object;
Third obtains subelement, for obtaining and identifying with the business record from the traffic table in the storage unit
Corresponding business information;
Subelement is handled, for checking whether the flow object matches with the business information, if it does not match, hair
Send miscue information;If it does, then increasing process recording in the process recording table in the storage unit, and update institute
State traffic table.
Optionally, the query unit, comprising:
4th obtains subelement, for when detecting workflow inquiry, obtaining the process encoding and industry of the workflow
Business record identification;
5th obtains subelement, for obtaining and the process encoding from the flow object that the cache unit caches
Corresponding flow object;
6th obtains subelement, for obtaining and identifying with the business record from the traffic table in the storage unit
Corresponding business information;
Subelement is shown, for passing through the process in the flow object, the business information and the storage unit
Record sheet, assembled and flow for displaying figure.
The third aspect, the present invention also propose a kind of Workflow processing apparatus, and described device includes: workflow engine, caching
Unit and storage unit;
The cache unit, the flow object generated for caching the workflow engine;
The storage unit is used for Stored Procedure parameter list, traffic table and process recording table.
Optionally, process parameter's table in the storage unit includes the preset process parameter's information of operation system, described
Process parameter's information includes: flow template information, flow status indication and/or Role Information;
The flow template information includes: process encoding, process name, associated business table name, associated traffic table master
The currently processed people's column name of key column name, traffic table, traffic table current state column name and/or associated process recording table name;
The flow status indication include: affiliated process encoding, state encoding, Status Name, corresponding role coding and/or
Next step state encoding set;
The Role Information includes: role's coding and role's title, the role encode in associated services system user and
Permission is controlled for permission.
Optionally, the corresponding relationship of the flow template information, flow status indication and Role Information are as follows:
One flow template corresponds to N number of flow state, and N is positive integer;
One Role Information corresponds to N number of flow state.
Optionally, the process recording table include: process recording mark, business record mark, operator, the operating time,
Current state coding, next step state encoding, currently processed people and/or next step processing people.
Compared with the prior art, workflow processing method of the invention, device and workflow engine pass through a small amount of ginseng of definition
Several modes fast implements the purpose of flow definition, passes through the Row control based on state, i.e. flow state association role, role
Associated permissions and personnel to simply clearly define workflow, while providing workflow processing and process recording inspection
The functions such as rope.More importantly can satisfy most of process of client by the parameter information of flexible high configurable degree
Demand, and process function can be extended by way of spreading parameter information.Simple clear, the high extension of core code, High Availabitity.Gram
The problem of having taken the larger workload that work on hand stream is defined, developed, disposing, improves workflow development efficiency, improves simultaneously
The productionization extent of Web application system.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention
In attached drawing, technical solution in the embodiment of the present invention is explicitly described, it is clear that described embodiment is the present invention
A part of the embodiment, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art are not having
Every other embodiment obtained under the premise of creative work is made, shall fall within the protection scope of the present invention.
As shown in Figure 1, the present embodiment discloses a kind of workflow processing method, the method be can comprise the following steps that
101, when detecting operation system starting, process parameter's table in storage unit is obtained, and according to the process
Parameter list product process object, so that cache unit caches the flow object, it include the business in process parameter's table
Process parameter's information of systemic presupposition;
Wherein, process parameter's information includes: flow template information, flow status indication and Role Information;
Flow template information includes at least: process encoding, process name, pass for recording the relevant parameter information of process
The business table name of connection, associated traffic table primary key column name, the currently processed people's column name of traffic table, traffic table current state column name and
Associated process recording table name;
Flow status indication includes at least: affiliated process encoding, state for recording the relevant parameter information of flow state
Coding, Status Name, corresponding role's coding and next step state encoding set;
Role Information is used for the relevant parameter information of record traffic system actor, includes at least: role's coding and role name
Claim, role encodes user and permission in associated services system, controls for permission.
The corresponding relationship of flow template information, flow status indication and Role Information are as follows:
One flow template corresponds to N number of flow state, and N is positive integer;
One Role Information corresponds to N number of flow state.
102, it when detecting workflow-initiating, from the flow object in the cache unit, obtains and the work
Corresponding flow object is flowed, and after handling the flow object, updates the traffic table and process in the storage unit
Record sheet;
Wherein, traffic table includes: business information, process current state and processing people;
Process recording table is used to record the information of workflow, includes at least: process recording identifies, business record identifies,
Operator, operating time, current state coding, next step state encoding, currently processed people and next step processing people.Wherein,
Next step state encoding refers to variable more which state of current state, passes through the reducible beam workflow of next step state encoding
Rule can construct flow chart.
103, it when detecting workflow inquiry, from the flow object in the cache unit, obtains and the work
Corresponding flow object is flowed, according to the process recording table in the flow object and the storage unit, assembly simultaneously shows stream
Cheng Tu.
Wherein, step 102 may also include unshowned sub-step in following figure 1:
1021, when detecting workflow-initiating, the process encoding and business record for obtaining the workflow are identified;
1022, from the flow object that the cache unit caches, flow object corresponding with the process encoding is obtained;
1023, from the traffic table in the storage unit, business information corresponding with business record mark is obtained;
1024, check whether the flow object matches with the business information, if it does not match, sending miscue
Information;If it does, then increasing process recording in the process recording table in the storage unit, and update the traffic table.
Wherein, step 103 may also include unshowned sub-step in following figure 1:
1031, when detecting workflow inquiry, the process encoding and business record for obtaining the workflow are identified;
1032, from the flow object that the cache unit caches, flow object corresponding with the process encoding is obtained;
1033, from the traffic table in the storage unit, business information corresponding with business record mark is obtained;
1034, assembled according to the process recording table in the flow object, the business information and the storage unit
And flow for displaying figure.
In a particular application, the also expansible other configurations information of flow template information, such as participation information count (business system
Another functional module of system, i.e. Information Statistics module) state encoding etc..
In a particular application, the also expansible other configurations information of flow status indication, such as the menu of state relation, i.e. industry
Business system checks the navigation menu (click menu and only show the business record in the state for being associated with the menu) of business information.
Above-described embodiment stores customized Workflow messages using configurationization parameter, provides process easy to use
Circulation processing and process recording search function, so overcoming asking for the larger workload that work on hand stream is defined, developed, disposing
Topic, improves workflow development efficiency.
Above-described embodiment can fast implement the purpose of flow definition by way of defining a small amount of parameter, by being based on shape
The Row control of state, i.e. flow state association role, role association permission and personnel, to simply clearly define workflow
Journey, while providing the functions such as workflow processing and process recording retrieval.More importantly by flexible high configurable
The parameter information of degree can satisfy most of process demand of client, and process function can be extended by way of spreading parameter information
Energy.Simple clear, the high extension of core code, High Availabitity.The present embodiment extends nucleus module, increases process and submits the page logical
With module, process recording checks page general module, so that a set of code can be used in detailed programs, only by configuring stream
The functions such as workflow circulation can be realized in the mode of journey defined parameters, process recording and progress are checked, so overcoming existing work
The problem of making the larger workload of stream definition, exploitation, deployment, improves workflow development efficiency, while improving Web application system
Productionization extent.
As shown in Fig. 2, the present embodiment discloses a kind of workflow engine, the workflow engine may include with lower unit: raw
At unit 21, processing unit 22 and query unit 23;
Generation unit 21, for obtaining process parameter's table in storage unit, and root when detecting operation system starting
It is wrapped in process parameter's table according to process parameter's table product process object so that cache unit caches the flow object
Containing the preset process parameter's information of the operation system;
Processing unit 22, for from the flow object in the cache unit, obtaining when detecting workflow-initiating
Flow object corresponding with the workflow, and after handling the flow object, update the business in the storage unit
Table and process recording table;
Query unit 23, for from the flow object in the cache unit, obtaining when detecting workflow inquiry
Flow object corresponding with the workflow is spelled according to the process recording table in the flow object and the storage unit
Fill simultaneously flow for displaying figure.
As shown in figure 3, processing unit 22 may also include following subelement:
First obtains subelement 221, for when detecting workflow-initiating, obtain the process encoding of the workflow with
Business record mark;
Second obtains subelement 222, for obtaining and compiling with the process from the flow object that the cache unit caches
The corresponding flow object of code;
Third obtains subelement 223, for obtaining and the business record mark from the traffic table in the storage unit
Know corresponding business information;
Subelement 224 is handled, for checking whether the flow object matches with the business information, if mismatched,
Then send miscue information;If it does, then increasing process recording in the process recording table in the storage unit, and more
The new traffic table.
As shown in figure 4, query unit 23 may also include following subelement:
4th obtains subelement 231, for when detecting workflow inquiry, obtain the process encoding of the workflow with
Business record mark;
5th obtains subelement 232, for obtaining and compiling with the process from the flow object that the cache unit caches
The corresponding flow object of code;
6th obtains subelement 233, for obtaining and the business record mark from the traffic table in the storage unit
Know corresponding business information;
Subelement 234 is shown, for according to the stream in the flow object, the business information and the storage unit
Journey record sheet, assembled and flow for displaying figure.
Process described in 1 embodiment of workflow engine earlier figures of the present embodiment, the present embodiment are no longer described in detail.
As shown in figure 5, the present embodiment discloses a kind of Workflow processing apparatus, described device includes described in Fig. 2 embodiment
Workflow engine 51, cache unit 52 and storage unit 53;
The workflow engine 51 includes generation unit 21, processing unit 22 and query unit 23;
The cache unit 52, the flow object generated for caching the workflow engine;
The storage unit 53 is used for Stored Procedure parameter list, traffic table and process recording table.
As shown in fig. 6, the present embodiment discloses the workflow of Workflow processing apparatus embodiment in Fig. 5, including following step
It is rapid:
601, workflow engine 51 obtains process parameter's table in storage unit 53 when detecting operation system starting;
602, workflow engine 51 is according to process parameter's table product process object, so that cache unit 52 caches process pair
As;It include the preset process parameter's information of operation system in process parameter's table
603, workflow engine 51 is when detecting workflow-initiating, from the flow object in cache unit 52, obtains
Flow object corresponding with workflow;
604, workflow engine 51 updates storage the traffic table and process note in unit 53 after process flow object
Record table;
605, workflow engine 51 is when detecting workflow inquiry, from the flow object in cache unit 52, obtains
Flow object corresponding with workflow;
606, workflow engine 51 simultaneously shows stream according to the process recording table in flow object and storage unit 53, assembly
Cheng Tu.
Workflow engine 51 reads procedure information in process parameter list in step 601, is successively read flow template record, stream
Journey state recording.Specifically: all flow template information are obtained first, are then obtained according to the process encoding in flow template information
Take corresponding flow status indication.
Workflow engine 51 generates a flow object to every flow template record in step 602, by process encoding, stream
Attribute of the relevant informations such as journey title as the object, and flow status indication is also used as to the attribute of the object.
Step 601 and 602 is known as initialization procedure.
Step 603 and 604 is known as workflow process.
Workflow engine 51 obtains flow object according to process encoding in step 603.
Step 604 specifically includes following sub-step:
6041, it is identified according to business record and obtains information relevant to process in traffic table, including is currently processed people, current
State etc..
6042, according to process relevant information in flow object, traffic table, flow operations validity check is carried out, including is adjusted
Whether correct with people currently processed in method parameter, whether current state is correct, and whether NextState is in current state object
In next step state encoding set, other special verifications (controlled by operating parameter and which kind of special verification enabled).Verification failure
Miscue is then returned to, verification continues after passing through.
6043, a flow processing record is increased newly.
6044, traffic table data, including currently processed people, current state, other business information are updated.
Step 605 and 606 is known as process recording retrieving.
Workflow engine 51 obtains flow object according to process encoding in step 605.
Step 606 specifically includes following sub-step:
6061, it is identified according to business record and obtains information relevant to process in traffic table, including is currently processed people, current
State etc..
6062, process encoding in flow state parameter and next step shape (are passed through according to flow object assembly flow chart information
State code set can construct flow chart), Returning process figure information and operation note information.
Fig. 7 shows the list web page effect of the work process flow record generated by the acquired data of process recording retrieval
Fruit figure.
As can be seen that the present invention realizes following technical effect from above embodiments:
1, high configurable degree can meet most of operation flow of client by modifying a small amount of process configuration parameter
Demand;
2, nucleus module is simple, expansible, special verification, the specially treated for process, need to only develop corresponding function
Module does corresponding reference and switch in workflow, does corresponding control by operating parameter;
3, version branch is controlled, the personalized process demand of disparity items leads to too small amount of process configuration information only to control
System, and body code then guarantee it is only a set of.
In this way, being converted between same application system disparity items by a large amount of procedure configuration files and business processing code
A small amount of process parameter's difference, farthest releases and exploits natural resources, or even can carry out process configuration by implementation personnel, together
When also reduce the difference of Item version, to reduce project cost.
It should be noted that herein " first " to " the 6th " is only used to distinguish different entities, do not represent between entity
Relationship or sequence.
Obviously, those skilled in the art should be understood that each module of the above invention or each step can be with general
Computing device realize that they can be concentrated on a single computing device, or be distributed in multiple computing devices and formed
Network on, optionally, they can be realized with the program code that computing device can perform, it is thus possible to which they are stored
Be performed by computing device in the storage device, perhaps they are fabricated to each integrated circuit modules or by they
In multiple modules or step be fabricated to single integrated circuit module to realize.In this way, the present invention is not limited to any specific
Hardware and software combines.
Although the embodiments of the invention are described in conjunction with the attached drawings, but those skilled in the art can not depart from this hair
Various modifications and variations are made in the case where bright spirit and scope, such modifications and variations are each fallen within by appended claims
Within limited range.