CN109656740A - A method of supporting timeout treatment task flow - Google Patents
A method of supporting timeout treatment task flow Download PDFInfo
- Publication number
- CN109656740A CN109656740A CN201811510381.2A CN201811510381A CN109656740A CN 109656740 A CN109656740 A CN 109656740A CN 201811510381 A CN201811510381 A CN 201811510381A CN 109656740 A CN109656740 A CN 109656740A
- Authority
- CN
- China
- Prior art keywords
- task
- flow
- task flow
- timeout
- rollback
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Withdrawn
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/0703—Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
- G06F11/0751—Error or fault detection not based on redundancy
- G06F11/0754—Error or fault detection not based on redundancy by exceeding limits
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/0703—Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
- G06F11/0793—Remedial or corrective actions
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45562—Creating, deleting, cloning virtual machine instances
Abstract
The present invention relates to cloud platform task flow processing technology field, especially a kind of method for supporting timeout treatment task flow.The method of the present invention includes following steps: 1: writing each step service code of process and configuration step time-out time;2: configuration task flow step template, including sequence of steps, whether simultaneously operating, whether steps necessary, rollback whether simultaneously operating;3: timing inquiry has been not carried out and overtime step, and calls the corresponding timeout logic code of overtime step;4: continuing the execution of task flow according to the feedback of timeout logic code.The present invention solves the problems, such as the task stream process of timeout mode;Under the situations such as the execution state for being not received by task step, flow of task can still be continued down.
Description
Technical field
The present invention relates to cloud platform task flow processing technology field, especially a kind of side for supporting timeout treatment task flow
Method.
Background technique
Cloud platform is mainly made of multiple components such as calculating, storage, network, monitoring, certification, and there are many operations (as created
Virtual machine, deletion virtual machine, security service etc.) it needs to be cooperated by multiple component interactions to complete;Existing processing method exists
Following problem:
A, be mingled in function service code too many non-functional code make code logic structure is complicated it is not convenient for safeguarding;
B, code coupling is too high, it is difficult to the division of labor and multiplexing;
C, operation appearance is abnormal is not easy to position;
D, since network temporarily obstructed or control terminal service, each Component service (calculating, storage, network etc.) are restarted
Etc. reasons, cause task step implementing result not receive or leak report.
Summary of the invention
Present invention solves the technical problem that being to provide a kind of method for supporting timeout treatment task flow;It solves above-mentioned existing
The problem of method.
The technical solution that the present invention solves above-mentioned technical problem is:
The method includes the following steps:
Step 1: writing each step service code of process and configuration step time-out time;
Step 2: configuration task flow step template, including sequence of steps, whether simultaneously operating, whether steps necessary, rollback
Whether simultaneously operating;
Step 3: timing inquiry has been not carried out and overtime step, and calls overtime step corresponding timeout logic generation
Code;
Step 4: continuing the execution of task flow according to the feedback of timeout logic code.
The step 1 specifically:
A. step base class BaseWorkflowCommand have process, rollback, timeout,
GetReqParamsClass, getResParamsClass abstract method and getTimeout step time-out time method;
B. specific each step rewrite process, rollback, timeout, getReqParamsClass,
GetResParamsClass method;
When c. creating the creation system disk step in virtual machine process, normal direction flow needs are write in process method and are held
Capable code logic, i.e. creation system disk code logic;Reverse flow range code logic is write in rollback method, that is, is deleted
The system disk created in process;In timeout method, according to what is created in the returned data of step inquiry process
System disk is available with the presence or absence of simultaneously state, exists and available then without any processing, is not present or state is unavailable, throw exception;
D. rewrite getReqParamsClass, getResParamsClass method setting steps command enter ginseng and
Join out;
E. the time-out time of the step is configured by getTimeout method.
Each step command that the step 2 is finished writing according to step 1, configures these in task flow step template
The sequence of step and each attribute of step;After configuring these good templates, when interface is called, task flow engine is by automatic band
The operating of dynamic whole flow process.
Creation system disk step in the step 3 creation virtual machine process specifically:
A. the data of step process method return are obtained according to getResParams method;
B. it whether there is according to the system disk created in step returned data acquisition process method and state be available, when
It is not present or throws when state is unavailable abnormal.
The step 4, the timeoutHandler method in BaseWorkflowCommand do not capture exception,
It then represents the step normal direction flow to run succeeded, then to task flow engine feedback, the task step runs succeeded, task flow
Engine will enter the next step of process;Exception is captured, then represents the step normal direction flow and executes failure, then to task flow engine
The feedback task step executes failure, and task flow engine then determines the stream of process according to whether the step is steps necessary
To, rollback process is then entered if it is steps necessary, be optional step if continue to walk the next step of normal direction flow.
The process is: (1) information such as task stream type to be executed, time started, required parameter, operation user
It is saved into task flow example table, all Step Informations of being executed in task flow template for task is saved into task flow example
In step table, and changes flow state and be changed in execution;(2) the step of executing in next step, is obtained according to flow state;(3) it is
It is no to have in next step, have and then enter (4), does not terminate process then;(4) it according to task step required parameter value source template, obtains
Flow instance corresponds to request data of the corresponding value of returned data of step as the task step, and executes step;(5) step
Whether implementing result succeeds, it is successful then enter (2), it is unsuccessful enter (6);It (6) whether is steps necessary, steps necessary enters
(7), inessential to enter (2);(7) flow state is changed in rollback, and enters (2).
It, can be in control terminal or various components service (calculating, storage, network etc.) because a variety of using method of the invention
Reason, which breaks down or is restarted etc., leads to that control terminal is not received by the execution state of task step or Component service goes to one
Partly break down in the case where causing execution status of task not feed back to control terminal, system provide remedial measure, allow flow of task according to
Can so it continue down.
Detailed description of the invention
The following further describes the present invention with reference to the drawings:
Fig. 1 is support timeout treatment task flow flow chart in the present invention;
Fig. 2 is support timeout treatment task flow frame module schematic diagram in the present invention.
Specific embodiment
As shown in Fig. 1-2, the method for the present invention includes:
Step 1: each step of task flow writes the service codes such as process, rollback, timeout, configures command
It is corresponding to enter to join class and return to class, and pass through the time-out time of getTimeout method configuration step.
Its step specifically:
F. step base class BaseWorkflowCommand have process, rollback, timeout,
The abstract methods such as getReqParamsClass, getResParamsClass and getTimeout step time-out time method;
G. specific each step rewrite process, rollback, timeout, getReqParamsClass,
The methods of getResParamsClass;
H. such as the creation system disk step in creation virtual machine process, normal direction flow needs are write in process method and are held
Capable code logic, i.e. creation system disk code logic;Reverse flow range code logic is write in rollback method, that is, is deleted
The system disk created in process;In timeout method, is then inquired in process and created according to the returned data of step
System disk with the presence or absence of and state it is available, exist and available then without any processing, be not present or state is unavailable, throw different
Often;
I. rewrite getReqParamsClass, getResParamsClass method setting steps command enter ginseng with
Join out;
J. the time-out time of the step is configured by getTimeout method.
Step 2: configuration task flow step template, including sequence of steps, whether simultaneously operating, whether steps necessary, rollback
Whether simultaneously operating etc..
The each step command finished writing according to step 1, configured in task flow step template the sequence of these steps with
And each attribute of step, such as whether simultaneously operating, whether steps necessary, rollback whether simultaneously operating etc..Configure these good moulds
After plate, when interface is called, task flow engine is by the operating of automatic traction whole flow process: (1) task stream type to be executed,
Into in task flow example table, what will be executed in task flow template appoints for time started, required parameter, operation user etc. information preservations
All Step Informations of business are saved into task flow case step table, and are changed flow state and be changed in execution;(2) according to process
State obtains the step of executing in next step;(3) whether have in next step, have and then enter (4), do not terminate process then;(4) basis
Task step required parameter value source template obtains flow instance and corresponds to the corresponding value of returned data of step as task step
Rapid request data, and execute step;(5) whether step implementing result succeeds, it is successful then enter (2), it is unsuccessful enter (6);
It (6) whether is steps necessary, steps necessary enters (7), inessential to enter (2);(7) flow state is changed in rollback, and is entered
(2)。
Step 3: timing inquiry has been not carried out and overtime step, and calls overtime step corresponding timeout logic generation
Code.
Such as create the creation system disk step in virtual machine process.
Its step specifically:
C. the data of step process method return are obtained according to getResParams method.
D. it whether there is according to the system disk created in step returned data acquisition process method and state be available, when
It is not present or throws when state is unavailable abnormal;
TimeoutHandler method in step 4:BaseWorkflowCommand does not capture exception, then represents
The step normal direction flow runs succeeded, then to task flow engine feedback, the task step runs succeeded, and task flow engine will
Into the next step of process;Exception is captured, then represents the step normal direction flow and executes failure, then to task flow engine
The feedback task step executes failure, and task flow engine then determines the stream of process according to whether the step is steps necessary
To, rollback process is then entered if it is steps necessary, be optional step if continue to walk the next step of normal direction flow.
Claims (6)
1. a kind of method for supporting timeout treatment task flow, it is characterised in that: the method includes the following steps:
Step 1: writing each step service code of process and configuration step time-out time;
Step 2: configuration task flow step template, including sequence of steps, whether simultaneously operating, whether steps necessary, rollback whether
Simultaneously operating;
Step 3: timing inquiry has been not carried out and overtime step, and calls the corresponding timeout logic code of overtime step;
Step 4: continuing the execution of task flow according to the feedback of timeout logic code.
2. according to the method described in claim 1, it is characterized by:
The step 1 specifically:
A. step base class BaseWorkflowCommand have process, rollback, timeout,
GetReqParamsClass, getResParamsClass abstract method and getTimeout step time-out time method;
B. specific each step rewrite process, rollback, timeout, getReqParamsClass,
GetResParamsClass method;
When c. creating the creation system disk step in virtual machine process, write what normal direction flow needed to be implemented in process method
Code logic, i.e. creation system disk code logic;Reverse flow range code logic is write in rollback method, that is, is deleted
The system disk created in process;In timeout method, according to what is created in the returned data of step inquiry process
System disk is available with the presence or absence of simultaneously state, exists and available then without any processing, is not present or state is unavailable, throw exception;
D. rewrite getReqParamsClass, getResParamsClass method setting steps command enters ginseng and out ginseng;
E. the time-out time of the step is configured by getTimeout method.
3. according to the method described in claim 2, it is characterized by:
Each step command that the step 2 is finished writing according to step 1, configures these steps in task flow step template
Sequence and step each attribute;After configuring these good templates, when interface is called, task flow engine is whole by automatic traction
The operating of a process.
4. according to the method described in claim 2, it is characterized by:
Creation system disk step in the step 3 creation virtual machine process specifically:
A. the data of step process method return are obtained according to getResParams method;
B. obtain that the system disk that creates in process method whether there is and state is available according to step returned data, when not depositing
Or state it is unavailable when throw it is abnormal.
5. according to the method described in claim 2, it is characterized by:
The step 4, the timeoutHandler method in BaseWorkflowCommand do not capture exception, then generation
The table step normal direction flow runs succeeded, then to task flow engine feedback, the task step runs succeeded, task flow engine
The next step of process will be entered;Exception is captured, then represents the step normal direction flow and executes failure, then to task flow engine
The feedback task step executes failure, and task flow engine then determines the stream of process according to whether the step is steps necessary
To, rollback process is then entered if it is steps necessary, be optional step if continue to walk the next step of normal direction flow.
6. according to the method described in claim 3, it is characterized by:
The process is: (1) information preservations such as task stream type to be executed, time started, required parameter, operation user
Into in task flow example table, all Step Informations of being executed in task flow template for task are saved into task flow case step
In table, and changes flow state and be changed in execution;(2) the step of executing in next step, is obtained according to flow state;(3) whether have
In next step, have and then enter (4), do not terminate process then;(4) according to task step required parameter value source template, process is obtained
Example corresponds to request data of the corresponding value of returned data of step as the task step, and executes step;(5) step executes
As a result whether succeed, it is successful then enter (2), it is unsuccessful enter (6);It (6) whether is steps necessary, steps necessary enters (7), non-
Necessity enters (2);(7) flow state is changed in rollback, and enters (2).
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811510381.2A CN109656740A (en) | 2018-12-11 | 2018-12-11 | A method of supporting timeout treatment task flow |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811510381.2A CN109656740A (en) | 2018-12-11 | 2018-12-11 | A method of supporting timeout treatment task flow |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109656740A true CN109656740A (en) | 2019-04-19 |
Family
ID=66114031
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811510381.2A Withdrawn CN109656740A (en) | 2018-12-11 | 2018-12-11 | A method of supporting timeout treatment task flow |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109656740A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110275768A (en) * | 2019-06-28 | 2019-09-24 | 北京字节跳动网络技术有限公司 | Data processing method, device and electronic equipment |
WO2021169127A1 (en) * | 2020-02-26 | 2021-09-02 | 平安科技(深圳)有限公司 | Virtual machine upgrade method, apparatus and device, and storage medium |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103294533A (en) * | 2012-10-30 | 2013-09-11 | 北京安天电子设备有限公司 | Task flow control method and task flow control system |
CN103414771A (en) * | 2013-08-05 | 2013-11-27 | 国云科技股份有限公司 | Monitoring method for long task operation between nodes in cloud computing environment |
CN105893117A (en) * | 2015-11-26 | 2016-08-24 | 乐视云计算有限公司 | Configuration system and method for task stream of cloud service |
CN106325992A (en) * | 2016-08-20 | 2017-01-11 | 国云科技股份有限公司 | Method for calculating progress of long tasks in distributed type environment |
CN108205440A (en) * | 2017-12-25 | 2018-06-26 | 国云科技股份有限公司 | A kind of task flow framework implementation method for supporting rollback |
US20180196696A1 (en) * | 2017-01-06 | 2018-07-12 | International Business Machines Corporation | Optimizing timeouts and polling intervals |
CN108459919A (en) * | 2018-03-29 | 2018-08-28 | 中信百信银行股份有限公司 | A kind of distributed transaction processing method and device |
-
2018
- 2018-12-11 CN CN201811510381.2A patent/CN109656740A/en not_active Withdrawn
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103294533A (en) * | 2012-10-30 | 2013-09-11 | 北京安天电子设备有限公司 | Task flow control method and task flow control system |
CN103414771A (en) * | 2013-08-05 | 2013-11-27 | 国云科技股份有限公司 | Monitoring method for long task operation between nodes in cloud computing environment |
CN105893117A (en) * | 2015-11-26 | 2016-08-24 | 乐视云计算有限公司 | Configuration system and method for task stream of cloud service |
CN106325992A (en) * | 2016-08-20 | 2017-01-11 | 国云科技股份有限公司 | Method for calculating progress of long tasks in distributed type environment |
US20180196696A1 (en) * | 2017-01-06 | 2018-07-12 | International Business Machines Corporation | Optimizing timeouts and polling intervals |
CN108205440A (en) * | 2017-12-25 | 2018-06-26 | 国云科技股份有限公司 | A kind of task flow framework implementation method for supporting rollback |
CN108459919A (en) * | 2018-03-29 | 2018-08-28 | 中信百信银行股份有限公司 | A kind of distributed transaction processing method and device |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110275768A (en) * | 2019-06-28 | 2019-09-24 | 北京字节跳动网络技术有限公司 | Data processing method, device and electronic equipment |
WO2021169127A1 (en) * | 2020-02-26 | 2021-09-02 | 平安科技(深圳)有限公司 | Virtual machine upgrade method, apparatus and device, and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9952852B2 (en) | Automated deployment and servicing of distributed applications | |
CN109542556B (en) | Method and system for interaction between process and form based on Activiti | |
CN101477543B (en) | System and method for automating ETL application | |
CN106681956A (en) | Method and device for operating large-scale computer cluster | |
CN108134690B (en) | Network service deployment process control method, device and system | |
CN106657167B (en) | Management server, server cluster, and management method | |
CN105608001A (en) | Test method and test platform based on background system service or interface | |
CN110019138B (en) | Automatic transfer table space migration method and system based on Zabbix | |
CN103870260A (en) | Method and system for service interface development | |
CN109032838B (en) | Automatic verification method for consistency of backup and recovery data of virtual machine | |
CN110806907B (en) | Containerized configurable database script execution management system and method | |
CN109656740A (en) | A method of supporting timeout treatment task flow | |
CN109067599A (en) | A kind of method and device for disposing cluster | |
CN111181775B (en) | Integrated operation and maintenance management alarm method based on automatic host asset discovery | |
CN106484452B (en) | unified configuration management method and device for software platform | |
CN114003569A (en) | Method and device for updating qcow2 mirror image file increment | |
CN106547861A (en) | A kind of method and device of the data base of intelligent management machine node | |
CN103026337B (en) | The extraction of dispensing assembly and reconstruct | |
CN108205440A (en) | A kind of task flow framework implementation method for supporting rollback | |
US9207928B2 (en) | Computer-readable medium, apparatus, and methods of automatic capability installation | |
CN110764835A (en) | File configuration method and device of application environment, computer equipment and storage medium | |
CN109947645A (en) | Automatic configuration tool method and system | |
CN110851516B (en) | Host operation control system and method | |
CN114443356A (en) | Container cluster processing method and system | |
CN104732341A (en) | Control method and control system for simulating service process and service process operation |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WW01 | Invention patent application withdrawn after publication | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20190419 |