Summary of the invention
To solve the deficiencies in the prior art, the embodiment of the invention provides a kind of workflow schedule methods, this method comprises:
S1, the procedure information according to workflow inquire the completion status of 0 grade of production procedure in 0 grade of process, wherein describedProcedure information includes the movable ID, example ID and the work for relying on 0 grade of production procedure, 1 grade of production procedure of 0 grade of process, 0 grade of production procedureDynamic ID, example ID;
S2, according to the completion status, judge whether 0 grade of production procedure is completed;
If 0 grade of production procedure is completed, corresponding feedback record is generated;
S3, according to the feedback record, obtain the production result of 0 grade of production procedure;
S4, when the production result is successfully, according to 0 grade of flow instance ID and activity ID, judge to rely on described 01 grade of production procedure of grade process production procedure whether there is;
S5, if it exists is then that each 1 grade of production procedure creates a thread, generates multiple 1 grade of production threads;
S6, the multiple 1 grade of production thread is delivered separately to simultaneously for the production result of 0 grade of production procedure as parameterMultiple 1 grade of production threads are submitted to thread pool management to execute;
S7, when 1 grade of production procedure carries out, according to the completion feelings for 0 grade of production procedure that 1 grade of production procedure relies onCondition judges whether to establish dependence.
Preferably, judge whether 0 grade of production procedure is completed to include:
If 0 grade of production procedure does not complete, 0 grade of production procedure is waited to complete, and the S3- that repeats the above stepsS7。
Preferably, according to the feedback record, after obtaining the production result of 0 grade of production procedure, the method is also wrappedIt includes:
When the production result is failure, 0 grade of production procedure is dispatched to the production procedure that malfunctions.
Preferably, judging that 1 grade of production procedure for relying on 0 grade of production procedure whether there is includes:
If dependence is not present, terminate current 0 grade of production procedure.
Preferably, according to 1 grade of production procedure rely on 0 grade of production procedure performance, judge whether establish according toBad relationship includes:
If 0 grade of production procedure has been completed, 1 grade of production procedure is carried out, does not need to establish dependency information.
If 0 grade of production procedure does not complete, by the example ID of 0 grade of process, ID and 1 grade of life of 0 grade of production procedureThe ID for producing process is saved in database and establishes dependence between ID and 1 grade of production procedure of the production procedure at 0 grade.
Workflow schedule method provided in an embodiment of the present invention has the advantages that
By the control to process dependence, to guarantee the timing of the concurrent production process of automated data under complex sceneProperty and processing data integrality, be able to solve the scheduling of workflow in some complex scenes with relation of interdependence and askTopic, the automated production process suitable for every field.
Specific embodiment
Specific introduce is made to the present invention below in conjunction with the drawings and specific embodiments.
As shown in Figure 1, the nested process of three layers of entire data process application are completed, respectively main flow, 0 grade of process and1 grade of process.Wherein, main flow can decomposite a plurality of types of 0 grade of process, and each type of 0 grade of process can decomposite it is moreA 1 grade of production procedure is made the product data that data final production goes out to meet user demand for user by three layer data processesWith.
Under normal conditions in creation data, each lower layer's sub-process only needs to produce the data of current data type i.e.Can, but since there may be data dependences between different types of partial data.For example, being needed when producing 1 grade of process of B2 typeThe production that just pass through B2_Cn categorical data dependent on 0 grade of process of B1 type, just needs solution same type process by no means at this timeBetween logical relation with meet data production needs.
Referring to Fig. 2, workflow schedule method provided in an embodiment of the present invention the following steps are included:
S1, the procedure information according to workflow inquire the completion status of 0 grade of production procedure in 0 grade of process, wherein describedProcedure information includes the movable ID, example ID and the work for relying on 0 grade of production procedure, 1 grade of production procedure of 0 grade of process, 0 grade of production procedureDynamic ID, example ID.
S2, according to completion status, judge whether 0 grade of production procedure is completed, comprising:
If 0 grade of production procedure is completed, corresponding feedback record is generated.
S3, according to feedback record, obtain the production result of 0 grade of production procedure.
S4, when producing result be successfully, according to 0 grade of flow instance ID and activity ID, judge that 0 grade of process of dependence produces and flow1 grade of production procedure of journey whether there is.
S5, if it exists is then that each 1 grade of production procedure creates a thread, generates multiple 1 grade of production threads.
S6, multiple 1 grade of production thread are delivered separately to using the production result of 0 grade of production procedure as parameter and by multiple 1Grade production thread submits to thread pool management execution.
S7, when 1 grade of production procedure carries out, according to the performance for 0 grade of production procedure that 1 grade of production procedure relies on, sentenceIt is disconnected whether to establish dependence.
Optionally, judge whether 0 grade of production procedure is completed to include:
If 0 grade of production procedure does not complete, 0 grade of production procedure is waited to complete, and the S3- that repeats the above stepsS7。
Optionally, according to feedback record, after obtaining the production result of 0 grade of production procedure, this method further include:
When producing result is failure, 0 grade of production procedure is dispatched to the production procedure that malfunctions.
Optionally, judging that 1 grade of production procedure for relying on 0 grade of production procedure whether there is includes:
If dependence is not present, terminate current 0 grade of production procedure.
Optionally, the performance of the 0 grade of production procedure relied on according to 1 grade of production procedure judges whether to establish to rely on and closeSystem includes:
If 0 grade of production procedure has been completed, 1 grade of production procedure is carried out, does not need to establish dependency information.
If 0 grade of production procedure does not complete, ID and 1 grade of production of the example ID of 0 grade of process, 0 grade of production procedure is flowedThe ID of journey is saved in database and establishes dependence between ID and 1 grade of production procedure of the production procedure at 0 grade.
Workflow schedule method provided in an embodiment of the present invention, by the control to process dependence, to guarantee complexityThe integrality of the timing of the concurrent production process of automated data and processing data under scene, is able to solve in some complex scenesThe scheduling problem of process with relation of interdependence, the automated production process suitable for every field.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, there is no the portion being described in detail in some embodimentPoint, reference can be made to the related descriptions of other embodiments.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description,The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
Algorithm and display are not inherently related to any particular computer, virtual system, or other device provided herein.Various general-purpose systems can also be used together with teachings based herein.As described above, it constructs required by this kind of systemStructure be obvious.In addition, the present invention is also not directed to any particular programming language.It should be understood that can use variousProgramming language realizes summary of the invention described herein, and the description done above to language-specific is to disclose this hairBright preferred forms.
In addition, memory may include the non-volatile memory in computer-readable medium, random access memory(RAM) and/or the forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM), memory includes extremelyA few storage chip.
It should be understood by those skilled in the art that, embodiments herein can provide as method, system or computer programProduct.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the applicationApply the form of example.Moreover, it wherein includes the computer of computer usable program code that the application, which can be used in one or more,The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) producesThe form of product.
The application is referring to method, the process of equipment (system) and computer program product according to the embodiment of the present applicationFigure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructionsThe combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programsInstruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produceA raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for realThe device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spyDetermine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram orThe function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that countingSeries of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer orThe instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram oneThe step of function of being specified in a box or multiple boxes.
In a typical configuration, calculating equipment includes one or more processors (CPU), input/output interface, netNetwork interface and memory.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/Or the forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable JieThe example of matter.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any methodOr technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data.The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), movesState random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasableProgrammable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM),Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devicesOr any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculatesMachine readable medium does not include temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludabilityIt include so that the process, method, commodity or the equipment that include a series of elements not only include those elements, but also to wrapInclude other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic wantElement.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including elementThere is also other identical elements in process, method, commodity or equipment.
It will be understood by those skilled in the art that embodiments herein can provide as method, system or computer program product.Therefore, complete hardware embodiment, complete software embodiment or embodiment combining software and hardware aspects can be used in the applicationForm.It is deposited moreover, the application can be used to can be used in the computer that one or more wherein includes computer usable program codeThe shape for the computer program product implemented on storage media (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.)Formula.
The above is only embodiments herein, are not intended to limit this application.To those skilled in the art,Various changes and changes are possible in this application.It is all within the spirit and principles of the present application made by any modification, equivalent replacement,Improve etc., it should be included within the scope of the claims of this application.