Summary of the invention
The technical problem to be solved be how to provide a kind of workflow processing method,
Device and workflow engine, the problem bigger to solve existing workflow development workload.
For this purpose it is proposed, first aspect, the present invention proposes a kind of workflow processing method, described
Method includes:
When detecting that operation system starts, obtain the process parameter's table in memory element, and root
According to described process parameter's table product process object, so that buffer unit caches described flow object,
Described process parameter's table comprises process parameter's information that described operation system is preset;
When workflow-initiating being detected, in the flow object from described buffer unit, obtain
The flow object corresponding with described workflow, and after processing described flow object, update institute
State the traffic table in memory element and process recording table;Described process recording table is described storage
The table for recording workflow of storage in unit;
When workflow inquiry being detected, in the flow object from described buffer unit, obtain
The flow object corresponding with described workflow, according to described flow object and described memory element
In process recording table, assembled flow chart also shows the flow chart of assembly.
Optionally, described when workflow-initiating being detected, from described buffer unit stream
In journey object, obtain the flow object corresponding with described workflow, and processing described flow process
After object, update the traffic table in described memory element and process recording table, including:
When workflow-initiating being detected, obtain process encoding and the business record of described workflow
Mark;
From the flow object that described buffer unit caches, obtain corresponding with described process encoding
Flow object;
In traffic table from described memory element, obtain corresponding with described business record mark
Business information;
Check whether described flow object mates with described business information, if it does not match, send out
Send miscue information;If it does, then process recording table in described memory element increases
Add process recording, and update described traffic table.
Optionally, described when workflow inquiry being detected, from described buffer unit flow process
In object, obtain the flow object corresponding with described workflow, according to described flow object and
Process recording table in described memory element, assembled and flow for displaying figure, including:
When workflow inquiry being detected, obtain process encoding and the business record of described workflow
Mark;
From the flow object that described buffer unit caches, obtain corresponding with described process encoding
Flow object;
In traffic table from described memory element, obtain corresponding with described business record mark
Business information;
Remembered by the flow process in described flow object, described business information and described memory element
Record table, assembled and flow for displaying figure.
Second aspect, the present invention also proposes a kind of workflow engine, and described workflow engine includes:
Signal generating unit, for when detecting that operation system starts, obtains the stream in memory element
Journey parameter list, and according to described process parameter's table product process object, so that buffer unit caching
Described flow object, comprises the process parameter that described operation system is preset in described process parameter's table
Information;
Processing unit, for the stream when workflow-initiating being detected, from described buffer unit
In journey object, obtain the flow object corresponding with described workflow, and processing described flow process pair
As afterwards, update the traffic table in described memory element and process recording table;Described flow process is remembered
Record table is the table for recording workflow of storage in described memory element;
Query unit, for the stream when workflow inquiry being detected, from described buffer unit
In journey object, obtain the flow object corresponding with described workflow, according to described flow object with
And the process recording table in described memory element, assembled flow chart also shows the flow chart of assembly.
Optionally, described processing unit, including:
First obtains subelement, for when workflow-initiating being detected, obtains described workflow
Process encoding and business record identify;
Second obtains subelement, for from the flow object that described buffer unit caches, obtains
The flow object corresponding with described process encoding;
3rd obtains subelement, in the traffic table from described memory element, obtains and institute
State the business information that business record mark is corresponding;
Process subelement, be used for checking whether described flow object mates with described business information,
If it does not match, send miscue information;If it does, then in described memory element
Process recording table in increase process recording, and update described traffic table.
Optionally, described query unit, including:
4th obtains subelement, for when workflow inquiry being detected, obtains described workflow
Process encoding and business record identify;
5th obtains subelement, for from the flow object that described buffer unit caches, obtains
The flow object corresponding with described process encoding;
6th obtains subelement, in the traffic table from described memory element, obtains and institute
State the business information that business record mark is corresponding;
Display subelement, for by described flow object, described business information and described in deposit
Process recording table in storage unit, assembled and flow for displaying figure.
The third aspect, the present invention also proposes a kind of Workflow processing apparatus, and described device includes:
Workflow engine, buffer unit and memory element;
Described buffer unit, for caching the flow object that described workflow engine generates;
Described memory element, for Stored Procedure parameter list, traffic table and process recording table.
Optionally, the process parameter's table in described memory element includes the flow process that operation system is preset
Parameter information, described process parameter's information includes: flow template information, flow status indication and
/ or Role Information;
Described flow template information includes: process encoding, process name, the business table name of association,
The traffic table primary key column name of association, the currently processed people of traffic table arrange name, traffic table current state row
Name and/or the process recording table name of association;
Described flow status indication includes: affiliated process encoding, state encoding, Status Name,
Corresponding role's coding and/or next step state encoding set;
Described Role Information includes: role's coding and role's title, described role encodes association industry
User and authority in business system, for control of authority.
Optionally, described flow template information, flow status indication and the correspondence of Role Information
Relation is:
One corresponding N number of described flow state of described flow template, N is positive integer;
One corresponding N number of described flow state of described Role Information.
Optionally, described process recording table includes: process recording identifies, business record identifies,
Operator, operating time, current state coding, next step state encoding, currently processed people
And/or next step processes people.
Compared to prior art, the workflow processing method of the present invention, device and workflow are drawn
Hold up the purpose quickly realizing flow definition by the way of defining a small amount of parameter, by based on shape
The Row control of state, i.e. flow state association role, role association authority and personnel, thus
Simply define workflow clearly, provide workflow simultaneously and process and process recording inspection
The functions such as rope.What is more important, the parameter information by the highest configurable degree is permissible
Meet most of flow process demand of client, and can by the way of spreading parameter information extended flow
Cheng Gongneng.Core code extension simply clear, high, High Availabitity.Overcome work on hand stream
The problem that the workload define, develop, disposed is bigger, improves workflow development efficiency,
Improve the productionization extent of Web application system simultaneously.
Detailed description of the invention
For making the purpose of the embodiment of the present invention, technical scheme and advantage clearer, below will
In conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clearly
Chu ground describe, it is clear that described embodiment be a part of embodiment of the present invention rather than
Whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art are not having
Have and make the every other embodiment obtained under creative work premise, broadly fall into the present invention
The scope of protection.
As it is shown in figure 1, the open a kind of workflow processing method of the present embodiment, described method can
Comprise the following steps:
101, when detecting that operation system starts, the process parameter's table in memory element is obtained,
And according to described process parameter's table product process object, so that buffer unit caches described flow process pair
As, described process parameter's table comprises process parameter's information that described operation system is preset;
Wherein, process parameter's information includes: flow template information, flow status indication and angle
Color information;
Flow template information, for recording the parameter information that flow process is relevant, at least includes: flow process is compiled
Code, process name, the business table name of association, the traffic table primary key column name of association, traffic table are worked as
Pre-treatment people arranges name, traffic table current state row name and the process recording table name of association;
Flow status indication, for recording the parameter information that flow state is relevant, at least includes: institute
Belong to process encoding, state encoding, Status Name, corresponding role's coding and next step state to compile
Code set;
The parameter information that Role Information is correlated with for record traffic system actor, at least includes: angle
Color coding and role's title, role encodes user and authority in associated services system, for authority
Control.
The corresponding relation of flow template information, flow status indication and Role Information is:
One corresponding N number of flow state of flow template, N is positive integer;
One corresponding N number of flow state of Role Information.
102, when workflow-initiating being detected, in the flow object from described buffer unit,
Obtain the flow object corresponding with described workflow, and after processing described flow object, more
Traffic table in new described memory element and process recording table;
Wherein, traffic table includes: business information, flow process current state and process people;
Process recording table, for recording the information of workflow, at least includes: process recording mark,
Business record mark, operator, the operating time, current state coding, next step state encoding,
Currently processed people and next step process people.Wherein, next step state encoding refers to current state
Variable more which state, by next step state encoding reducible bundle workflow rule, can
Construct flow chart.
103, when workflow inquiry being detected, in the flow object from described buffer unit,
Obtain the flow object corresponding with described workflow, according to described flow object and described storage
Process recording table in unit, assembled and flow for displaying figure.
Wherein, step 102 may also include the sub-step not shown in figure 1 below:
1021, when workflow-initiating being detected, process encoding and the industry of described workflow is obtained
Business record identification;
1022, from the flow object that described buffer unit caches, obtain and described process encoding
Corresponding flow object;
1023, in the traffic table from described memory element, obtain and identify with described business record
Corresponding business information;
1024, check whether described flow object mates with described business information, if do not mated,
Then send miscue information;If it does, then the process recording table in described memory element
Middle increase process recording, and update described traffic table.
Wherein, step 103 may also include the sub-step not shown in figure 1 below:
1031, when workflow inquiry being detected, process encoding and the industry of described workflow is obtained
Business record identification;
1032, from the flow object that described buffer unit caches, obtain and described process encoding
Corresponding flow object;
1033, in the traffic table from described memory element, obtain and identify with described business record
Corresponding business information;
1034, according in described flow object, described business information and described memory element
Process recording table, assembled and flow for displaying figure.
In a particular application, flow template information other configuration informations the most expansible, such as participate in
The state of Information Statistics (another functional module of operation system, i.e. Information Statistics module) is compiled
Code etc..
In a particular application, flow status indication other configuration informations the most expansible, such as state
The menu of association, i.e. operation system check that the navigation menu of business information (is clicked on menu only to show
It is in the business record of the state associating this menu).
Above-described embodiment uses configurationization parameter to store self-defined Workflow messages, it is provided that
Workflow easy to use processes and process recording search function, so overcoming work on hand
The problem that stream defines, develops, the workload disposed is bigger, improves workflow development efficiency.
Above-described embodiment can quickly realize flow definition by the way of defining a small amount of parameter
Purpose, by Row control based on state, i.e. flow state association role, role association is weighed
Limit and personnel, thus simply define workflow clearly, provide workflow simultaneously and process
And the function such as process recording retrieval.What is more important, by the ginseng of the highest configurable degree
Number information can meet most of flow process demand of client, and can be by the side of spreading parameter information
Formula extension flow process function.Core code extension simply clear, high, High Availabitity.The present embodiment expands
Having opened up nucleus module, added flow process and submit page general module to, process recording checks that the page leads to
By module so that in detailed programs, a set of code can be used, only defined by configuration flow
The functions such as the mode of parameter can realize workflow circulation, process recording and progress are checked, so
Overcome the problem that work on hand stream defines, develops, the workload disposed is bigger, improve work
Make stream development efficiency, improve the productionization extent of Web application system simultaneously.
As in figure 2 it is shown, the open a kind of workflow engine of the present embodiment, described workflow engine can
Including with lower unit: signal generating unit 21, processing unit 22 and query unit 23;
Signal generating unit 21, for when detecting that operation system starts, obtains in memory element
Process parameter's table, and according to described process parameter's table product process object, so that buffer unit delays
Deposit described flow object, described process parameter's table comprises the flow process ginseng that described operation system is preset
Number information;
Processing unit 22, for when detecting workflow-initiating, from described buffer unit
In flow object, obtain the flow object corresponding with described workflow, and processing described flow process
After object, update the traffic table in described memory element and process recording table;
Query unit 23, for when detecting workflow inquiry, from described buffer unit
In flow object, obtain the flow object corresponding with described workflow, according to described flow object
And the process recording table in described memory element, assembled and flow for displaying figure.
As it is shown on figure 3, processing unit 22 may also include following subelement:
First obtains subelement 221, for when workflow-initiating being detected, obtains described work
The process encoding making to flow identifies with business record;
Second obtains subelement 222, is used for from the flow object that described buffer unit caches,
Obtain the flow object corresponding with described process encoding;
3rd obtains subelement 223, in the traffic table from described memory element, obtains
The business information corresponding with described business record mark;
Process subelement 224, be used for checking that whether described flow object and described business information
Join, if it does not match, send miscue information;If it does, then it is single in described storage
Process recording table in unit increases process recording, and updates described traffic table.
As shown in Figure 4, query unit 23 may also include following subelement:
4th obtains subelement 231, for when workflow inquiry being detected, obtains described work
The process encoding making to flow identifies with business record;
5th obtains subelement 232, is used for from the flow object that described buffer unit caches,
Obtain the flow object corresponding with described process encoding;
6th obtains subelement 233, in the traffic table from described memory element, obtains
The business information corresponding with described business record mark;
Display subelement 234, for according to described flow object, described business information and institute
State the process recording table in memory element, assembled and flow for displaying figure.
The flow process described in workflow engine earlier figures 1 embodiment of the present embodiment, the present embodiment
No longer describe in detail.
As it is shown in figure 5, the open a kind of Workflow processing apparatus of the present embodiment, described device includes
Workflow engine 51, buffer unit 52 and memory element 53 described in Fig. 2 embodiment;
Described workflow engine 51 includes signal generating unit 21, processing unit 22 and query unit 23;
Described buffer unit 52, for caching the flow object that described workflow engine generates;
Described memory element 53, for Stored Procedure parameter list, traffic table and process recording table.
As shown in Figure 6, the workflow of Workflow processing apparatus embodiment in the open Fig. 5 of the present embodiment
Journey, comprises the following steps:
601, workflow engine 51 is when detecting that operation system starts, and obtains memory element 53
In process parameter's table;
602, workflow engine 51 is according to process parameter's table product process object, so that caching is single
Unit 52 caching flow object;Process parameter's table comprises process parameter's information that operation system is preset
603, workflow engine 51 is when workflow-initiating being detected, from buffer unit 52
In flow object, obtain the flow object corresponding with workflow;
604, workflow engine 51 is after handling process object, updates in memory element 53
Traffic table and process recording table;
605, workflow engine 51 is when workflow inquiry being detected, from buffer unit 52
In flow object, obtain the flow object corresponding with workflow;
606, workflow engine 51 is according to the process recording in flow object and memory element 53
Table, assembled and flow for displaying figure.
Procedure information during workflow engine 51 reads flow process parameter list in step 601, is successively read
Flow template record, flow state record.Particularly as follows: first obtain all flow template information,
Then corresponding flow status indication is obtained according to the process encoding in flow template information.
In step 602, workflow engine 51 generates a flow process pair to every flow template record
As, using the relevant information such as process encoding, process name as the attribute of this object, and by flow process
Status information also serves as the attribute of this object.
Step 601 and 602 is referred to as initialization procedure.
Step 603 and 604 is referred to as workflow process.
In step 603, workflow engine 51 obtains flow object according to process encoding.
Step 604 specifically includes following sub-step:
6041, information relevant to flow process in traffic table is obtained according to business record mark, including
Currently processed people, current state etc..
6042, according to flow process relevant information in flow object, traffic table, carrying out flow operations has
The verification of effect property, the most correct including people currently processed in call method parameter, whether current state
Correctly, NextState whether in next step state encoding set of current state object, other
Special verification (controls to enable which kind of special verification by operating parameter).Verify and the most then return
Miscue, verification is by rear continuation.
6043, a newly-increased flow processing record.
6044, traffic table data are updated, including currently processed people, current state, other business
Information.
Step 605 and 606 is referred to as process recording retrieving.
In step 605, workflow engine 51 obtains flow object according to process encoding.
Step 606 specifically includes following sub-step:
6061, information relevant to flow process in traffic table is obtained according to business record mark, including
Currently processed people, current state etc..
6062, according to flow object assembly flow chart information (by flow process in flow state parameter
Coding and next step state encoding set can construct flow chart), Returning process figure information and behaviour
Note down information.
Fig. 7 show by process recording retrieve acquired in data genaration work process flow remember
The list web page design sketch of record.
It can be seen that present invention achieves following technique effect from above example:
1, high configurable degree, i.e. disclosure satisfy that client by revising a small amount of flow process configuration parameter
Most of operation flow demand;
2, nucleus module is simple, expansible, for special verification, the special handling of flow process,
Only need to develop corresponding functional module, do in workflow and quote accordingly and switch, pass through
Operating parameter does corresponding control;
3, controlling version branch, the personalized flow process demand of disparity items only leads to too small amount of stream
Journey configuration information controls, and body code then ensures the most a set of.
So, between same application system disparity items, by a large amount of procedure configuration files and industry
Business processes code and is converted into a small amount of process parameter's difference, farthest releases exploitation money
Source, even can be carried out flow process configuration by enforcement personnel, also reduce Item version simultaneously
Difference, thus reduce project cost.
It should be noted that " first " to " the 6th " herein is only used for distinguishing difference
Entity, does not represent relation or the order of inter-entity.
Obviously, those skilled in the art should be understood that the above-mentioned present invention each module or
Each step can realize with general calculating device, and they can concentrate on single calculating
On device, or it is distributed on the network that multiple calculating device is formed, alternatively, they
Can realize with calculating the executable program code of device, it is thus possible to they are stored
Performed by calculating device in the storage device, or it is integrated that they are fabricated to respectively
Circuit module, or the multiple modules in them or step are fabricated to single integrated circuit mould
Block realizes.So, the present invention is not restricted to the combination of any specific hardware and software.
Although be described in conjunction with the accompanying embodiments of the present invention, but those skilled in the art
Various modifications and variations can be made without departing from the spirit and scope of the present invention,
Within the scope of such amendment and modification each fall within and are defined by the appended claims.