Embodiment
Below in conjunction with wherein preferred embodiments the present invention program is described in detail.
In the scheme of the embodiment of the invention, be to define each flow tasks node in other words by preestablishing, set the definition data of each flow tasks node respectively, and generate workflow diagram based on each flow tasks node, visioning procedure example on the basis of the workflow diagram that generates.Because workflow diagram has comprised a plurality of flow tasks nodes, it is the set that the definition data of workflow diagram are actually the flow definition data that comprised a plurality of flow tasks nodes, therefore, in following example explanation, the definition data of free flow journey task node with the flow definition data illustrate the definition data of workflow diagram or flow instance or flow instance workflow diagram with workflow flow definition data.
The schematic flow sheet of workflow engine framework method embodiment based on the Interactive Dynamic process flow diagram of the present invention has been shown among Fig. 1.
As shown in Figure 1, the method in the present embodiment comprises step:
Step S101: receive the flow instance processing instruction;
Step S102: obtain work process flow definition data, the first kind flow process business datum corresponding with above-mentioned flow instance from workflow database according to above-mentioned flow instance processing instruction, and according to each default flow tasks node and the corresponding relation of flow definition data, described work process flow definition data, described first kind flow process business datum are converted to the flow instance workflow diagram and show;
Step S103: receive business operating instructions;
Step S104: use based on the flow process business datum after the described business operating instructions processing first kind flow process business datum in the described workflow database is upgraded.
According to the scheme in the present embodiment, it is when receiving the flow instance processing instruction, obtain the work process flow definition data corresponding with this flow instance from workflow database, first kind flow process business datum, and with these work process flow definition data, first kind flow process business datum is converted to the flow instance workflow diagram and shows, thereby be convenient in time check this flow instance workflow diagram and corresponding first kind flow process business datum, but also use based on the flow process business datum after the business operating instructions processing first kind flow process business datum in the workflow database upgraded.That is to say, the flow tasks node is corresponding mutually with the flow definition data, when flow for displaying example workflow diagram, realized the demonstration of the first kind flow process business datum of this flow instance simultaneously, and the flow tasks node that can pass through corresponding steps in this flow instance workflow diagram is carried out the operation to each process step, need not to reopen corresponding forms pages at each step, need not to carry out repeatedly page jump, directly on the flow instance workflow diagram that shows, just can realize to first kind flow process business datum check and to the relevant treatment of flow process business datum, realized the interactive processing at workflow diagram, convenient and swift, improved the treatment effeciency of workflow.
Wherein, above-mentioned first kind flow process business datum refers to need be shown to the flow process business datum that the user checks simultaneously when flow for displaying example workflow diagram, generally speaking, first kind flow process business datum can refer to whether each process step the information relevant with state such as has handled.Certainly, based on actual needs, also can be the information that is set to other types.
Because therefore the corresponding relation of the flow tasks node in the above-mentioned workflow diagram and corresponding flow definition data, in the present invention program, need preestablish the flow definition data of flow tasks node and each flow tasks node correspondence.
When concrete setting process task node and corresponding flow definition data, the concrete manifestation form of each flow tasks node can be set according to actual needs, for example can be based on shape, size, the difference of pattern etc. is distinguished, also can be to adopt identical shape, pattern, square frame etc. for example, and in square frame, distinguished with different word contents, also can be with different numberings or other information uniqueness mark as this flow tasks node, concrete implementation can adopt various possible modes to carry out, as long as can be distinguished each flow tasks node, will not be exhaustive at this.
After the flow definition data that configure each flow tasks node and each flow tasks node, each flow tasks node and corresponding flow definition data can be stored.Because each flow tasks node is to concern one to one with corresponding flow definition data, therefore, when setting up workflow, can directly edit the flow process task node, generates workflow diagram and gets final product.
Accordingly, in the present invention program's a concrete example, can also comprise step:
Step S1001: receive the workflow diagram edit instruction, according to the front and back annexation of definite corresponding each the flow tasks node of this workflow diagram edit instruction and each flow tasks node, according to the front and back annexation generation workflow diagram of each flow tasks node, each flow tasks node.After generating workflow diagram, can create a concrete flow instance based on this workflow diagram, generate above-mentioned flow instance workflow diagram.
The workflow diagram edit instruction here, can be comprise drag, various possible edit instructions such as connection.In concrete example, the above-mentioned flow tasks node that configures can be arranged or place for the user and select by certain mode therein.When needs are set up new workflow diagram, can be by dragging needed flow tasks node, and the mode of setting up the front and back annexation between each flow tasks node generates, and correspondingly, above-mentioned workflow diagram edit instruction can be to drag instruction, link order etc.
The workflow diagram of above-mentioned generation can be preserved and issue, in order to can create relevant concrete flow instance based on this workflow diagram.Accordingly, after above-mentioned steps S100, can also comprise step:
S1002: receive the workflow diagram issuing command, identify each the flow tasks node in the described workflow diagram, the front and back annexation of each flow tasks node, and according to the corresponding relation of each default flow tasks node and flow definition data, the front and back annexation generation work process flow definition data of each flow tasks node, these work process flow definition data are stored in the described workflow database.
Thereby, the workflow diagram that generates, can issue, and after issuing, be based on the corresponding relation of each default flow tasks node and flow definition data, the front and back annexation between each flow tasks node, generate work process flow definition data and be stored in the workflow database, be convenient to the storage of information and read.And when storing, can adopt any possible data layout to store, for example XML form etc.Concrete storage mode can be set according to actual needs.
After the workflow diagram of creating is issued and stored, just can create concrete flow instance based on this workflow diagram.When the visioning procedure example, based on selected workflow diagram (may create a plurality of different workflow diagrams in the same Workflow system), can generate corresponding flow instance workflow diagram, after the flow instance establishment was finished, the follow-up processing procedure at this flow instance was just carried out based on the flow definition logic of selected workflow diagram.
Because workflow diagram is to store with the form of work process flow definition data in workflow database, therefore, when the visioning procedure example, the flow instance workflow diagram of creating also is that first work process flow definition data with flow instance are stored in workflow database.If when the visioning procedure example, just need show this flow instance workflow diagram, perhaps when the flow operations that this flow instance workflow diagram is correlated with, then need to read correspondingly work process flow definition data from workflow database, and be converted into concrete flow instance workflow diagram and show.
Accordingly, under the situation that when the visioning procedure example, just need show this flow instance workflow diagram, above-mentioned flow instance processing instruction can refer to arrange based on system the instruction of automatic generation, under the situation about opening in the concrete process at flow instance operation, this flow instance processing instruction can refer to the instruction of sending based on certain option.
On the other hand, when receiving the flow instance processing instruction, can also obtain the second class flow process business datum above-mentioned from database, and when showing above-mentioned flow instance workflow diagram, this second class flow process business datum be shown.Correspondingly, when receiving business operating instructions, can also upgrade the second class flow process business datum in the database with the flow process business datum after handling based on this business operating instructions.
Wherein, this second class flow process business datum can refer to need not just be shown to the flow process business datum that the user checks when flow for displaying example workflow diagram.Generally speaking, the business datum that this second class flow process business datum can have nothing to do with the state of flow instance or each process step, for example handler's information, processing time and other related service data etc.Certainly, based on actual needs, also can be the information that is set to other types.
Wherein, above-mentioned in order to store the database of the second class flow process business datum, because the difference of different Considerations can be done different settings.
In application scenes, may need not the memory location of various different types of data is distinguished, that is to say, the related procedure definition data of workflow diagram, the work process flow definition data of flow instance, first kind flow process business datum, the second class flow process business datum can be stored in same database, at this moment, above-mentioned database refers to above-mentioned workflow database.
In other application scenarioss, based on Considerations such as the significance level of data type, different types of data or sources, may need the second class flow process business datum is separately deposited, at this moment, above-mentioned database refers to be different from the database of above-mentioned workflow database, for example can be the Service Database of the special storage second class flow process business datum.
Below be that example is elaborated with a concrete processing procedure.
When carrying out concrete processing, as mentioned above, need preestablish the flow definition data of flow tasks node and each flow tasks node correspondence earlier.Each flow tasks size of node, shape, pattern, literal expression mode can be determined based on actual needs, as long as can distinguish variant flow tasks node.After the flow definition data that configure each flow tasks node and each flow tasks node correspondence, with each flow tasks node with and corresponding flow definition data corresponding stored.That is to say that each flow tasks node is corresponding with flow definition data separately respectively.
After configuring each flow tasks node and corresponding flow definition data thereof,, can directly carry out based on the flow tasks node, and need not to redefine flow definition data etc. when setting up workflow diagram follow-up.Certainly, based on the needs in the actual application, also can set up new flow tasks node and corresponding flow definition data, or existing flow tasks node and corresponding flow definition data thereof are made amendment etc., will not give unnecessary details in detail at this.
When needs were set up workflow, the above-mentioned flow tasks node that configures can be to arrange in some way or place, for example in the mode of icon, in mode of tabulation etc., concrete arrangement modes of emplacement is not limit, and selects for the user.The user can select to apply to flow tasks node in its workflow diagram to be set up by mode such as drag, choose.Be example to drag, from user level, can send the workflow diagram edit instruction by the mode that drags, here specifically can called after flow tasks node selection instruction, so that needed flow tasks node is dragged to the work process flow editing interface.Concerning the present invention program, after receiving flow tasks node selection instruction, selected flow tasks node is presented in the editing pictures of dynamically interactive type flow process animation, handle for the user.
After having selected needed flow tasks node, can be by dragging the front and back order between each flow tasks node, the line that perhaps connects between each flow tasks node is determined front and back annexation between each flow tasks node with this, to form a complete workflow diagram.
Select to finish at each flow tasks node, after the front and back annexation between each flow tasks node determines to finish, formed a complete workflow diagram, and this workflow diagram can have been issued.The user can be by clicking the workflow diagram editing interface issue button, control, options or in other way, send the workflow diagram issuing command.
The present invention program is after receiving the workflow diagram issuing command, identify each flow tasks node in the workflow diagram and the front and back annexation between each flow tasks node, and according to each default flow tasks node and the corresponding relation of flow definition data, the front and back annexation between each flow tasks node, generate work process flow definition data, and these work process flow definition data are stored in the workflow database, so that can create concrete flow instance based on this workflow diagram in the follow-up work process.
When creating concrete flow instance, based on selected workflow diagram, can send flow instance and create instruction, create in the instruction at this flow instance, can comprise the identification information of the workflow diagram of creating to some extent, be based on which workflow diagram visioning procedure example to show.After receiving flow instance establishment instruction, generate corresponding flow instance workflow diagram.Under the situation about just this flow instance workflow diagram being shown need not be at the visioning procedure example time, the work process flow definition data relevant with this flow instance workflow diagram only exist in the workflow database.Under the situation that when the visioning procedure example, just need show this flow instance workflow diagram, perhaps when carrying out concrete flow operations, need from workflow database, read out the work process flow corresponding with this flow instance definition data, and these work process flow definition data are converted to concrete flow instance workflow diagram show.
Opening this workflow diagram with time in the concrete flow operations process is example, when the flow instance processing instruction, at this moment, this flow instance processing instruction specifically can be a flow instance workflow diagram OPEN, obtain the work process flow definition data corresponding with this flow instance according to this flow instance processing instruction from workflow database, first kind flow process business datum, according to each default flow tasks node and the corresponding relation of flow definition data, with described work process flow definition data, described first kind flow process business datum is converted to the flow instance workflow diagram and shows.That is to say, based on each default flow tasks node and the corresponding relation of flow definition data, corresponding flow tasks node can be resolved, is converted into to relevant flow definition data in the work process flow definition data of flow instance, owing to the annexation between each flow tasks node has been resolved to corresponding data content during issue as the part of work process flow definition data, therefore, based on the parsing to work process flow definition data, can know the front and back annexation between each flow tasks node at an easy rate.
When opening the flow instance workflow diagram, for the flow instance that passes through some processing procedure, this flow instance has had relevant flow process business datum above-mentioned.Therefore, except obtaining above-mentioned first kind flow process business datum, make things convenient for the user to understand up-to-date flow processing progress.On the other hand, can also obtain the above-mentioned second class flow process business datum from database, based on concrete actual needs, can do different settings.
After the flow instance workflow diagram is shown, can operate based on the workflow processing that this flow instance workflow diagram is correlated with.In these workflow processing operations, mainly be based on the flow tasks node and carry out.Be example with certain flow tasks node wherein, can send the edit instruction at this flow tasks node, after receiving this edit instruction, under situation about the second class flow process business datum of this flow tasks node correspondence not being shown as yet, can obtain the second class flow process business datum corresponding with above-mentioned flow instance workflow diagram from database, this second class flow process business datum is shown.Based on the second class flow process business datum, can be so that the user understand the concrete service data information of certain process step, concrete handler, processing time or other relevant information for example.
Wherein, this edit instruction can be set at detecting and think when the user clicks this flow tasks node and receive this edit instruction, so that just can in time check and handle when the user clicks this flow tasks node.Also can be to be set at when detecting the user and clicked this flow tasks node and selected corresponding option, just think to have received edit instruction, to avoid also will carrying out relevant treatment when the user is overdue to hit the flow tasks node, cause the waste of handling resource.The processing mode of concrete reception edit instruction can be set based on actual needs, will not give unnecessary details in detail at this.
Based on the flow instance workflow diagram that shows, the user can carry out business operation at the process step of each the flow tasks node correspondence in this flow instance workflow diagram, the present invention program receives the corresponding service operational order, and uses based on the flow process business datum after this business operating instructions processing the first kind flow process business datum of workflow database, the second class flow process business datum in the database are upgraded.Wherein, flow process business datum after the handling based on business operating instructions here, can refer to through the status data relevant with the flow tasks node after the particular procedure, the particular procedure here can be for example sign for, transmission, rollback, fetch, the flow process business datum relevant with the state of current pending flow tasks node place process step such as calcellation, such flow process business datum, set-up mode can be used for the first kind flow process business datum of workflow database is upgraded as described above.On the other hand, flow process business datum after the handling based on business operating instructions here, it can also be the business datum that comprises other types, for example handler's name, processing time and other any possible information of each flow tasks node place process step etc., such flow process business datum, set-up mode can be used for the second class flow process business datum of database is upgraded as described above.Certainly, need to do different settings based on practical application.
Above-mentioned the flow process business datum is upgraded after, based on the flow process business datum after upgrading, each flow tasks node in the flow instance workflow diagram can be carried out mark in a particular manner, the Word message in the flow tasks node of the FB(flow block) of different colours, different colours or directly " handle " etc. at certain ad-hoc location mark of flow tasks node for example, so which process step that can open-and-shutly know in this flow instance workflow diagram is to handle, be convenient to carrying out smoothly of workflow processing.In the case, flow tasks node current or next step the process step correspondence that need carry out can also be highlighted, to remind relevant treatment people this process step be handled.In addition, can also be according to the processing time of flow instance workflow diagram, the historical node path of playing flow is convenient to checking of the processing progress to whole workflow diagram, historical processing path.
The workflow engine framework method based on the Interactive Dynamic process flow diagram according to the invention described above, based on the corresponding relation between flow tasks node and the flow definition data, can directly carry out the operation of work process flow correlation step based on the flow tasks node, realize direct flow operations based on the dynamically interactive type process flow diagram, need not to carry out the operation of forms pages formula, the whole operation process can directly be carried out at process flow diagram, and is short and sweet, and the treatment effeciency height.
According to the workflow engine framework method based on the Interactive Dynamic process flow diagram of the invention described above, the present invention also provides a kind of workflow engine architecture system based on the Interactive Dynamic process flow diagram.The structural representation of system embodiment of the present invention has been shown among Fig. 2.
As shown in Figure 2, the system in the present embodiment includes:
Flow process business module 201, be used for receiving the flow instance processing instruction, obtain the work process flow definition data corresponding with flow instance from workflow database, first kind flow process business datum, according to each default flow tasks node and the corresponding relation of flow definition data, with described work process flow definition data, described first kind flow process business datum is converted to the flow instance workflow diagram and shows, and the reception business operating instructions, use based on the flow process business datum after this business operating instructions processing the first kind flow process business datum in the described workflow database is upgraded.
In concrete example, as shown in Figure 2, should flow definition module 202 can also be included based on workflow engine architecture system of Interactive Dynamic process flow diagram therein, on this basis, flow engine module 203 can also be included.
Wherein, this flow definition module 202, be used for receiving definition of work flow figure edit instruction, determine the front and back annexation of corresponding each flow tasks node and each flow tasks node according to this definition of work flow figure edit instruction, and according to the front and back annexation of each flow tasks node, each flow tasks node, generate workflow diagram, and when receiving the workflow diagram issuing command, described workflow diagram is issued;
This flow engine module 203, be used for receiving the above-mentioned workflow diagram of flow definition module 202 issues, identify each the flow tasks node in the described workflow diagram, the front and back annexation of each flow tasks node, and according to the corresponding relation of each default flow tasks node and flow definition data, the front and back annexation generation work process flow definition data of each flow tasks node, these work process flow definition data are stored in the described workflow database.
In a concrete example, above-mentioned flow engine module 203, can also be used for receiving the above-mentioned flow instance processing instruction that flow process business module 201 sends, and obtain the work process flow corresponding with described flow instance definition data, first kind flow process business datum according to above-mentioned flow instance processing instruction from workflow database, also use the flow process business datum after handling based on described business operating instructions that the first kind flow process business datum in the described workflow database is upgraded.
Accordingly, as shown in Figure 2, in this concrete example, above-mentioned flow engine module 203 specifically can include:
Flow process analytics engine 2031, be used for receiving the described workflow diagram of described flow definition module issue, identify each the flow tasks node in the described workflow diagram, the front and back annexation of each flow tasks node, and generate work process flow definition data according to the corresponding relation of each default flow tasks node and flow definition data, the front and back annexation of each flow tasks node;
Flow data engine 2032, the work process flow definition data that are used for obtaining after 2031 parsings of flow process analytics engine are stored in workflow database, receive the flow instance processing instruction that flow process business module 201 sends, obtain the work process flow definition data corresponding with described flow instance according to this flow instance processing instruction from workflow database, first kind flow process business datum, with these work process flow definition data, first kind flow process business datum returns to flow process business module 201, and with the flow process business datum that flow operations engine 2033 sends first kind flow process business datum corresponding in the workflow database is upgraded;
Flow operations engine 2033 be used for to receive the flow process business datum after the handling based on described business operating instructions that flow process business module 201 sends, and this flow process business datum is sent out 2032 to described flow data engine send.
In practical work process, also may relate to the modification to the flow definition data of flow process task node.At this moment, can send instruction by flow definition module 202, this instruction is sent to flow data engine 2032 through flow process analytics engine 2031, obtain relevant flow definition data by flow data engine 2032 from workflow database, by flow process analytics engine 2031 according to default flow tasks node and the corresponding relation of flow definition data, these flow definition data are resolved to return to flow definition module 202 behind the concrete flow tasks node and show, be convenient to this flow tasks node is changed.Perhaps also can be directly the flow definition data to be returned to flow definition module 202 by flow process analytics engine 2031, by flow definition module 202 according to default flow tasks node and the corresponding relation of flow definition data, show after the flow definition data are converted to the flow tasks node, be convenient to this flow tasks node or corresponding flow definition data are changed.Based on the needs of reality, can do different settings.
Therein in concrete example, above-mentioned flow process business module 201, when receiving the flow instance processing instruction, can also obtain the second class flow process business datum from database, and this second class flow process business datum shown when showing above-mentioned flow instance workflow diagram, can also when receive above-mentioned business operating instructions, also use based on the flow process business datum after this business operating instructions processing the second class flow process business datum in the above-mentioned database is upgraded
As shown in Figure 2, in this concrete example, above-mentioned flow process business module 201 specifically can include:
Animation interactive unit 2011, be used for receiving the flow instance processing instruction, with this flow instance processing instruction to flow data interface unit 2012, business datum interface unit 2014 sends, according to each default flow tasks node and the corresponding relation of flow definition data, the work process flow that flow data interface unit 2012 is obtained defines data, first kind flow process business datum is converted to the flow instance workflow diagram and shows, the second class flow process business datum that the business datum interface unit is obtained shows, and the reception business operating instructions, the flow process business datum after will handling based on this business operating instructions is to flow operations interface unit 2013, business datum interface unit 2014 sends;
Flow data interface unit 2012, be used for obtaining work process flow definition data, the first kind flow process business datum corresponding with described flow instance according to described flow instance processing instruction from workflow database, and work process flow that will this described flow instance correspondence defines data, first kind flow process business datum returns to described animation interactive unit 2011;
Flow operations interface unit 2013 is used based on the flow process business datum after the described business operating instructions processing first kind flow process business datum of described workflow database is upgraded;
Business datum interface unit 2014 is used for obtaining the second class flow process business datum corresponding with described flow instance according to described flow instance processing instruction from database, and this second class flow process business datum is returned to described animation interactive unit 2011.
With similar in the invention described above method, in order to store the database of the second class flow process business datum, can refer to above-mentioned workflow database, also can refer to independently Service Database.In exemplary illustration shown in Figure 2, be to be that example describes with workflow database, Service Database, this explanation is not in order to constitute restriction to the present invention program.
The specific implementation of each module in the system of the present invention, unit etc., can with the invention described above method in identical, will not give unnecessary details in detail at this.
The above embodiment has only expressed several embodiment of the present invention, and it describes comparatively concrete and detailed, but can not therefore be interpreted as the restriction to claim of the present invention.Should be pointed out that for the person of ordinary skill of the art without departing from the inventive concept of the premise, can also make some distortion and improvement, these all belong to protection scope of the present invention.Therefore, the protection domain of patent of the present invention should be as the criterion with claims.