CN109829678A - A kind of rollback processing method, device and electronic equipment - Google Patents
A kind of rollback processing method, device and electronic equipment Download PDFInfo
- Publication number
- CN109829678A CN109829678A CN201711181632.2A CN201711181632A CN109829678A CN 109829678 A CN109829678 A CN 109829678A CN 201711181632 A CN201711181632 A CN 201711181632A CN 109829678 A CN109829678 A CN 109829678A
- Authority
- CN
- China
- Prior art keywords
- rollback
- task
- workflow
- execution
- rolling back
- 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.)
- Granted
Links
Landscapes
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
This application discloses a kind of rollback processing methods, comprising: obtains the rollback request initiated for workflow;According to the rollback mapping relations of preconfigured task and rollback task, determine that the workflow is at least one rollback of at least one corresponding rollback task of task and the rollback task of execution state and executes sequence;It terminates and executes the task for being in execution state;The corresponding rollback task of task for being in execution state is executed according to the rollback execution sequence.The rollback processing method by task to rollback task jump and the rollback process of the workflow is realized in the execution of rollback task, flexibility is higher, and the realization of rollback process is more convenient, time-consuming also shorter.
Description
Technical field
This application involves field of computer technology, and in particular to a kind of rollback processing method.The application is related to one kind simultaneously
Rollback processing unit and a kind of electronic equipment.
Background technique
In Workflow system, workflow (a part or whole part of business procedure under computer application environment from
Dynamicization) execution generally require to split into multiple tasks cooperation and complete, but in the implementation procedure of workflow task, because of outside
Intervene, the factors such as System self-test is abnormal, need to stop for currently performed workflow the execution of follow-up work under many occasions,
It is required that workflow can quickly and effectively self terminate the mechanism executed, and the rollback of rollback can also be carried out to the task that executed
Mechanism.
The rollback mechanism for workflow provided at present is realized in each task of workflow A as shown in Fig. 1
Meanwhile will realize corresponding rollback interface, workflow A initializes good each task when receiving execution request, and
The corresponding rolling back action of each task, initialization according to sequence from front to back successively execute task after completing, when receiving work
When making the instruction of stream A cancelled, the corresponding rollback behaviour of the task of execution is successively executed in the way of from back to front by backward
Make, the rollback implementing result of workflow A is obtained after the completion of executing.However, the rollback mechanism that the prior art provides, need to be directed to work
Each task of stream realizes corresponding rollback interface, it is ensured that the rollback side of each task of workflow is got in rollback process
The task amount of method, the exploitation configuration of these rolling back actions is larger, while also lacking flexibility, for the multiple similar of workflow
Task may realize multiple similar rolling back action;In addition, the rollback process of workflow is the side according to backward from back to front
Formula successively executes the corresponding rolling back action of the task of execution, and in the more situation of task of workflow, rollback process needs
Rollback implementing result could be obtained by executing more rolling back action, be taken a long time.
Summary of the invention
The application provides a kind of rollback processing method, is asked with solving shortage flexibility of the existing technology with what time-consuming
Topic.
The application is related to a kind of rollback processing unit and a kind of electronic equipment simultaneously.
The application provides a kind of rollback processing method, comprising:
Obtain the rollback request initiated for workflow;
According to the rollback mapping relations of preconfigured task and rollback task, determines that the workflow is in and execute
At least one rollback of at least one corresponding rollback task of the task of state and the rollback task executes sequence;
It terminates and executes the task for being in execution state;
The corresponding rollback task of task for being in execution state is executed according to the rollback execution sequence.
Optionally, before the rollback request step that the acquisition is initiated for workflow executes, following step is executed:
According to the task for initializing the workflow for the execution request of the workflow got in advance.
Optionally, the execution request for the workflow that the basis is got in advance initializes the workflow
After task step executes, following step is executed:
For the task of the workflow, perform the following operations:
Judge whether the task meets preset rollback condition, if so, it is corresponding to initialize the task
Rollback task, and the rollback mapping relations are written into the corresponding rollback task of task described after initialization and are worked as
In.
Optionally, the rollback condition, comprising: the execution time of task is more than or equal to preset time threshold.
Optionally, the execution request for the workflow that the basis is got in advance initializes the workflow
Task, comprising:
Initialize the task of the workflow executes sequence.
Optionally, the determination workflow is at least one corresponding rollback task of task of execution state
Before step executes, perform the following operations:
Judge that the workflow is in the task of execution state and whether is configured with corresponding rollback task, if so, holding
At least one corresponding rollback task step of task that the row determination workflow is in execution state.
Optionally, if described judge that the workflow is in the task of execution state and whether is configured with corresponding rollback
The judging result of task step is that corresponding rollback task is not configured in the task in execution state, executes the place
In the task of the state of execution, and performed the following operations after the task in execution state is finished:
Next execution after the workflow be in the task execution of execution state is judged according to execution sequence
Pending task whether be configured with corresponding rollback task, if so, performing the following operations:
Determine at least the one of at least one corresponding rollback task of the pending task and the rollback task
A second rollback executes sequence, terminates the execution of the task of the workflow, and execute sequence according to second rollback
Execute the corresponding rollback task of the pending task.
Optionally, the rollback task, comprising: the rollback link of at least one rolling back action composition.
Optionally, the corresponding rollback task of the initialization task, comprising: it is corresponding to configure the task
Rollback link in include rolling back action and the rollback link in include the rollback of rolling back action execute sequence.
Optionally, described to execute task corresponding time for being in execution state according to the rollback execution sequence
Rolling task is realized in the following way:
The first rolling back action for including in the corresponding rollback link of task in execution state is jumped to,
And all rolling back actions for including in the rollback link are successively executed according to the rollback execution sequence.
Optionally, the rolling back action is stored in preset data storage unit, and passes through the data storage cell
The rollback configuration interface of configuration accesses the rolling back action;
Also, the rolling back action for including in the corresponding rollback link of task to the workflow configures
When, matched by calling the rollback to configure interface and read from the data storage cell with the task of the workflow
Rolling back action, and the rolling back action is configured in conjunction with the service logic data of the task, and to described
The rollback execution sequence for the rolling back action for including in rollback link is configured, and the work of the configured workflow is appointed
It is engaged in the rolling back action write-in rollback mapping relations that corresponding rollback link includes in the middle.
Optionally, if the corresponding rolling back action of task of the workflow is not present in the data storage cell,
The corresponding rolling back action of the task is created, the rolling back action of creation is registered and is committed to the data storage is single
In member.
Optionally, the rolling back action stored in the data storage cell has configuration dimensional attribute, is calling institute
When stating the rolling back action that rollback configuration interface is read from the data storage cell and the task matches, according to institute
The matching dimensionality for stating workflow is matched from the consistent rolling back action of matching dimensionality for reading configuration dimension and the workflow
It sets;
Wherein, the configuration dimension includes at least one of following: type of service, business scope and work stream attribute.
Optionally, the rollback processing method is realized based on preset database management platform, and the data base administration is flat
Platform is deployed in cloud computing environment, for managing and maintaining the database realized in the cloud computing environment, the work
The mode for flowing task flow in a distributed manner is committed to the database management platform, and by submitting to the database management platform
The execution request and/or rollback of the workflow are requested, and are carried out by the workflow of the database management platform to submission
Business processing and/or rollback processing.
The application also provides a kind of rollback processing unit, comprising:
Rollback request unit, for obtaining the rollback request for being directed to workflow and initiating;
Rollback task determination unit, for the rollback mapping relations according to preconfigured task and rollback task,
Determine that the workflow is in task at least one corresponding rollback task and the rollback task of execution state
At least one rollback executes sequence;
Task terminates unit, executes the task for being in execution state for terminating;
Rollback task executing units are appointed for executing the work in execution state according to the rollback execution sequence
It is engaged in corresponding rollback task.
Optionally, the rollback processing unit is run based on preset database management platform, and the data base administration is flat
Platform is deployed in cloud computing environment, for managing and maintaining the database realized in the cloud computing environment, the work
The mode for flowing task flow in a distributed manner is committed to the database management platform, and by submitting to the database management platform
The execution request and/or rollback of the workflow are requested, and are carried out by the workflow of the database management platform to submission
Business processing and/or rollback processing.
The application also provides a kind of electronic equipment, comprising:
Memory and processor;
For the memory for storing computer executable instructions, the processor is executable for executing the computer
Instruction:
Obtain the rollback request initiated for workflow;
According to the rollback mapping relations of preconfigured task and rollback task, determines that the workflow is in and execute
At least one rollback of at least one corresponding rollback task of the task of state and the rollback task executes sequence;
It terminates and executes the task for being in execution state;
The corresponding rollback task of task for being in execution state is executed according to the rollback execution sequence.
The rollback processing method provided by the present application obtains the rollback request initiated for workflow;According to matching in advance
The rollback mapping relations of the task and rollback task set determine that the workflow is in the task correspondence of execution state
At least one rollback task and at least one rollback of the rollback task execute sequence;It terminates to be in described in executing and hold
The task of row state;The corresponding rollback of task for being in execution state is executed according to the rollback execution sequence
Task.
The rollback processing method, during realizing rollback according to the rollback request initiated for the workflow, root
According to the rollback mapping relations of preconfigured task and rollback task, determines and be in execution state for the workflow
The rollback of corresponding rollback task and the rollback task executes sequence when task carries out rollback, and described in the stopping
Corresponding rollback task is executed according to determining rollback execution sequence after the execution of the task of workflow, thus described in realizing
The rollback process of workflow.The rollback processing method, when realizing rollback in the workflow execution, with the workflow
Based on the corresponding rollback task of task and rollback execution sequence, jumping and returning by task to rollback task
The rollback process of the workflow is realized in the execution of rolling task, and flexibility is higher, and the realization of rollback process is more convenient, consumption
When it is also shorter.
Detailed description of the invention
Attached drawing 1 is a kind of schematic diagram for rollback mechanism that the prior art provides;
Attached drawing 2 is a kind of schematic diagram of rollback treatment process embodiment provided by the present application;
Attached drawing 3 is a kind of schematic diagram of rollback processing device embodiment provided by the present application;
Attached drawing 4 is the schematic diagram of a kind of electronic equipment embodiment provided by the present application.
Specific embodiment
Many details are explained in the following description in order to fully understand the application.But the application can be with
Much it is different from other modes described herein to implement, those skilled in the art can be without prejudice to the application intension the case where
Under do similar popularization, therefore the application is not limited by following public specific implementation.
The application provides a kind of rollback processing method, and the application also provides a kind of rollback processing unit and a kind of electronics
Equipment.It is described in detail one by one below in conjunction with the attached drawing of embodiment provided by the present application, and to each step of method
Suddenly it is illustrated.
A kind of rollback processing method embodiment provided by the present application is as follows:
Referring to attached drawing 2, it illustrates a kind of schematic diagrames of rollback treatment process embodiment provided by the present application.
Step 1, the rollback request initiated for workflow is obtained.
Workflow described in the embodiment of the present application, refer to a part or whole part of business procedure under computer application environment from
Dynamicization, a workflow can split into different tasks, these tasks obtained after fractionation are for realizing work
The corresponding function of stream.Workflow A as shown in Fig. 2 is split as n task: task 1 to work according to function
Task n.
In the specific implementation, it before this step obtains the rollback request initiated for the workflow, also needs to execute
For the initialization operation of the workflow, and for the initialization operation of the corresponding rollback task of the task.Its
In, the initialization operation of the workflow specifically includes and executes request for the workflow according to what is got in advance, just
In addition to this work of the beginningization workflow is appointed, further include to the workflow to the initialization operation of the workflow
The execution sequence of task is initialized.Workflow A as shown in Fig. 2, the n task of initial work stream A,
And the n task of initial work stream A executes sequence, executes sequence after initialization are as follows: from task 1 to work
Task n is successively sequentially executed.
The initialization operation of the corresponding rollback task of the task, specifically includes for the workflow all working
Task each of works as task, performs the following operations: judging whether the task meets preset rollback condition, if
It is to initialize the corresponding rollback task of the task, and the rollback task that the task after initialization is corresponding
It is written in the rollback mapping relations.It is default to refer to that the execution time of task is more than or equal to for the rollback condition
Time threshold.By the initialization operation of the corresponding rollback task of the task, for the major tasks of the workflow
Task realizes rollback definition, and the task more long than the workflow execution time as will be described is thought as major tasks, right
These major tasks tasks realize rollback definition, and implementation is relatively simple.Workflow A as shown in Fig. 2, the n of workflow A
In a task, the execution time of task 2 and task 3 is long, therefore appoints for task 2 and work
Rollback definition is realized in business 3.
In practical applications, any one task of the workflow, corresponding rollback process might not relate to
An and rolling back action, it is also possible to multiple rolling back action coordinateds be needed to realize rollback process jointly.In response to this, originally
Apply for rollback task described in embodiment, can also be the rollback link being made of at least one rolling back action.Appoint in the rollback
On the basis of rollback link of the business at least one rolling back action composition, correspondingly, the corresponding rollback task of the task
Initialization operation, comprising: configure the rolling back action for including in the corresponding rollback link of the task and the rollback
The rollback for the rolling back action for including in link executes sequence.
As described above, the rollback link that rollback task is made of at least one rolling back action, for the workflow
The rollback of the task can be achieved if there is multiple rolling back actions or a combination thereof for any one task, then right
For the task, multiple rolling back actions or a combination thereof according to rollback execution sequence composition one or more of rollback chains
Road can be used as the rollback task of the task.As it can be seen that any one task of the workflow, corresponding time
It rolls across journey not to be fixed and invariable, a task can also pass through any one rollback link in a plurality of rollback link
Realize rollback, and the rollback result of the corresponding all rollback links of the task is all the same, it is ensured that rollback result it is accurate
Property and uniqueness.
Workflow A as shown in Fig. 2, wherein the rollback task of task 2 are as follows: rolling back action 1 and 2 groups of rolling back action
At rollback link not only to initialize its corresponding rolling back action when the rollback task to task 2 initializes
1 and rolling back action 2, will also to rolling back action 1 and rolling back action 2 in rollback process execute sequence (rollback executes sequence) into
Row initialization.The rollback task of task 3 is the rollback link that rolling back action 3 is individually composed, and need to only be carried out to rolling back action 3
Initialization.
In addition to this, in practical applications, also it is not precluded under some special screnes, it is each when business need workflow
It, can be by the way that the numerical value of above-mentioned preset time threshold will be adjusted, by above-mentioned preset time when rollback may be implemented in a task
Threshold value is set as a lesser value, so that all working task of the workflow be made to be able to achieve rollback definition.
It, might not just because of above-mentioned implementation when the task for the workflow realizes that rollback defines
It is all working task realization rollback definition for the workflow, therefore, by the way that the rollback mapping relations are arranged, to tie up
Protect the corresponding rollback task corresponding relationship of the task of the workflow.Specifically, in the rollback mapping relations
It records the task that all realization rollbacks of the workflow define and the task that each realization rollback defines is corresponding
Rollback task.
For example, the rollback mapping table of following offers:
Workflow ID | Task ID | Rolling back action ID |
Workflow A | Task 2 | Rolling back action 1 |
Workflow A | Task 3 | Rolling back action 3 |
Workflow B | Task 3 | Rolling back action 1 |
Workflow B | Task 16 | Rolling back action 2 |
Workflow C | Task 8 | Rolling back action 3 |
Workflow C | Task 10 | Rolling back action 1 |
Attached drawing 2 is compareed, the task 2 and task 3 that record has workflow A realization rollback to define in upper table, simultaneously
Also record has the first rolling back action 1 in the corresponding rollback link of task 2 (rolling back action 1- > rolling back action 2), and
The rollback link that the corresponding rolling back action 3 of task 3 is individually composed.Similar, also record has workflow B and work in upper table
Stream C respectively realizes the task that rollback defines, and respectively realizes the corresponding rollback link of task that rollback defines.
It, can be using rolling back action as realization rollback definition when the task for the workflow realizes that rollback defines
The most basic unit of process, and the execution frame of these most basic rolling back actions is done one and is abstracted: for same time
Rolling operation, during realizing rollback definition for different workflows, the execution frame of the same rolling back action is identical
, difference is that the service logic data of the rolling back action of different workflow (i.e. different business) have differences.Based on this
One thought is, it can be achieved that the corresponding rolling back action of the task of workflow is shared, i.e., the execution frame of rolling back action is shared,
Only different service logic data need to be configured for the task of different working flow, so as to avoid different business is directed to
The workflow of type develops different rolling back actions respectively, and the task greatly reduced for the workflow is realized back
Cost of implementation when rolling definition.
Specifically, in practical applications, the rolling back action (i.e. the execution frame of rolling back action) can be stored in pre-
If in data storage cell, and the rollback configuration interface configured by the data storage cell is grasped to access the rollback
Make;When the rolling back action for including in the corresponding rollback link of task to the workflow configures, pass through tune
Interface is configured with the rollback, and the rollback behaviour to match with the task of the workflow is read from the data storage cell
Make, and the rolling back action is configured in conjunction with the service logic data of the task, and to the rollback link
The rollback execution sequence for the rolling back action for including in the middle is configured, and the task of the configured workflow is corresponding
The rolling back action for including in rollback link is written in the rollback mapping relations.
However, often will appear new type of service or business scope in practical application, it is being directed to these service class
When type or the workflow of business scope realize that rollback defines, task (the new business of a few thing stream can be inevitably encountered
Function), the work can be created in response to this in the data storage cell and there is no corresponding rolling back action
Make the corresponding rolling back action of task, the rolling back action of creation is registered and is committed in the data storage cell.
In addition, the rolling back action stored in the data storage cell also has configuration dimensional attribute, institute is being called
When stating the rolling back action that rollback configuration interface is read from the data storage cell and the task matches, according to institute
The matching dimensionality for stating workflow is matched from the consistent rolling back action of matching dimensionality for reading configuration dimension and the workflow
It sets;Wherein, the configuration dimension includes at least one of following: type of service, business scope and work stream attribute.
The above-mentioned initialization operation realized for the workflow, and it is corresponding for the task of the workflow
Rollback task initialization operation after, execute the task of the workflow on this basis, executing the work
During stream, if since business needs or other factors cancel the execution of the task of the workflow, and need
When the task for wanting workflow described in rollback to execute, in this step, described time initiated for the workflow is obtained
Rolling request.
Step 2, it according to the rollback mapping relations of preconfigured task and rollback task, determines at the workflow
It is executed at least one rollback of at least one corresponding rollback task of task and the rollback task of the state of execution
Sequentially.
For example, the task 1 of workflow B, corresponding rollback task include:
(1) the rollback link that rolling back action 1 and rolling back action 2 form, rollback execute sequence are as follows: rolling back action 1- > rollback
Operation 2;
(2) the rollback link that rolling back action 1, rolling back action 5 and rollback task 6 form, rollback execute sequence are as follows: rollback behaviour
Make 1- > rolling back action 5- > rolling back action 6.
In a kind of preferred embodiment provided by the embodiments of the present application, this step is according to preconfigured task and returns
The rollback mapping relations of rolling task determine that the workflow is in corresponding at least one rollback times of task of execution state
Before at least one rollback execution sequence of business and the rollback task, the judgement operation of rollback task is executed.The rollback is appointed
Business judgement operation is implemented as follows:
Judge that the workflow is currently at the task of execution state and whether is configured with corresponding rollback task, that is, sentences
Whether the task that the workflow of breaking is currently at execution state has realized that rollback defines, if so, executing this step, really
The fixed rollback mapping relations according to preconfigured task and rollback task determine that the workflow is in and execute shape
At least one rollback of at least one corresponding rollback task of the task of state and the rollback task executes sequence;
If it is not, showing that the workflow is currently at the task of execution state and rollback definition is not implemented, institute is executed
The task that workflow is currently at execution state is stated, next task configured with corresponding rollback task is waited,
The rollback process of the workflow is carried out based on next task configured with corresponding rollback task.
Specifically, appointing if the workflow is currently at the task of execution state and is not configured with corresponding rollback
Business, then wait next task configured with corresponding rollback task, is configured with corresponding rollback task based on next
Task carry out the rollback process of the workflow, specifically realize in the following way:
The task that the workflow is currently at execution state is executed, and is currently at execution shape in the workflow
The task of state performs the following operations after being finished: judging that the workflow is in execution state according to the execution sequence
Task execute after the pending task of next execution whether be configured with corresponding rollback task, if so, if so,
It performs the following operations: determining at least one corresponding rollback task of the pending task and the rollback task
At least one second rollback executes sequence, terminates the execution of the task of the workflow, and hold according to second rollback
Row sequence executes the corresponding rollback task of the pending task.
Workflow A as shown in Fig. 2, if task 1 carries out rollback when executing, since task 1 is not real
Existing rollback definition, cannot achieve the rollback process of workflow A, need to judge whether pending task 2 realizes that rollback defines, such as
The pending task 2 of fruit has realized that rollback defines, then after waiting task 1 to be finished, is based on pending task 2
Corresponding rollback link realizes the rollback process of workflow A.Assuming that pending task 2 is also not carried out rollback definition, then
It need to judge whether pending task 3 realizes that rollback defines, if pending task 3 has realized that rollback defines, etc.
After pending task 2 is finished, returning for workflow A is realized based on the corresponding rollback link of pending task 3
Roll across journey.
Step 3, it terminates and executes the task for being in execution state.
In this step, terminates and execute the task that the workflow is currently at execution state.Work as shown in Fig. 2
Make stream A, if task 2 carries out rollback when executing, on the basis of task 2 has realized rollback definition, terminates work
Stream A is currently at the execution of the task 2 of execution state.If task 3 carries out rollback when executing, in task 3
On the basis of having realized rollback definition, the execution that workflow A is currently at the task 3 of execution state is terminated.
Step 4, the corresponding rollback of the task in execution state is executed according to the rollback execution sequence to appoint
Business.
Above-mentioned steps 2 determine the work according to the rollback mapping relations of preconfigured task and rollback task
At least one rollback of stream at least one corresponding rollback task of task and the rollback task in execution state
Sequence is executed, and above-mentioned steps 3 have terminated the execution of the task of the workflow, on this basis, in this step, pressed
The corresponding rollback task of task for being in execution state is executed according to the rollback execution sequence.As described above, described
The rollback task of task is the rollback link of at least one rolling back action composition, it is preferred that this step is according to the rollback
Execution sequentially executes the corresponding rollback task of task in execution state, in particular to jumps to described be in and holds
The first rolling back action for including in the corresponding rollback link of the task of row state, and according to the rollback execution sequence from
First rolling back action starts successively to execute all rolling back actions for including in the rollback link.
Workflow A as shown in Fig. 2, wherein the corresponding rollback task of task 2 is rolling back action 1 and rolling back action
The rollback link of 2 compositions, rollback execution sequence is rolling back action 1- > rolling back action 2, if task 2 is returned when executing
Rolling, on the basis of the execution of above-mentioned termination task 2, jumps to first in the corresponding rollback link of task 2
Rolling back action: rolling back action 1 successively executes rolling back action 1 and rolling back action 2 since rolling back action 1.Task 3 is corresponding
Rollback task be the rollback link that is individually composed of rolling back action 3, if task 3 carries out rollback when executing, at above-mentioned end
Only on the basis of the execution of task 3, the rolling back action 3 in the corresponding rollback link of task 3 is jumped to, and execute
Rolling back action 3.
In the specific implementation, the rollback processing method provided by the present application, is also based on preset data base administration
Platform realizes that the database management platform is deployed in cloud computing environment, for managing and maintaining in the cloud computing ring
The database realized in border, for example, RDS (Relational Database Service) cloud data depositary management that Ali's cloud provides
Platform, for managing the relevant database of cloud computing environment that is optimised or being deployed to the offer of Ali's cloud, business side exists
During carrying out business processing using the database management platform, the business of the database management platform offer can be used
The rollback process of corresponding service or business function is realized in rollback service.Specifically, can be by business side's task flow in a distributed manner
Mode workflow to be processed is committed to the database management platform, by the database management platform submit needle
To the execution request of workflow perhaps rollback request requested by the database management platform according to the execution of submission or
The rollback request carries out business processing to the workflow, or carries out rollback processing to the workflow.
In conclusion the rollback processing method provided by the present application, is asked according to the rollback initiated for the workflow
During realistic existing rollback, according to the rollback mapping relations of preconfigured task and rollback task, determines and be directed to institute
State the rollback of corresponding rollback task and the rollback task when workflow is in the task progress rollback of execution state
It executes sequence, and executes according to determining rollback execution sequence after stopping the execution of task of the workflow corresponding
Rollback task, to realize the rollback process of the workflow.The rollback processing method, is realized in the workflow execution
When rollback, based on the corresponding rollback task of the task of the workflow and rollback execution sequence, pass through task
To rollback task jump and the rollback process of the workflow is realized in the execution of rollback task, flexibility is higher, rollback
The realization of journey is more convenient, time-consuming also shorter.
A kind of rollback processing device embodiment provided by the present application is as follows:
In the above-described embodiment, a kind of rollback processing method is provided, corresponding, present invention also provides one
Kind rollback processing unit, is illustrated with reference to the accompanying drawing.
Referring to attached drawing 3, it illustrates a kind of schematic diagrames of rollback processing device embodiment provided by the present application.
Since Installation practice is substantially similar to embodiment of the method, so describing fairly simple, relevant part please join
The corresponding explanation of the embodiment of the method for above-mentioned offer is provided.Installation practice described below is only schematical.
The application provides a kind of rollback processing unit, comprising:
Rollback request unit 301, for obtaining the rollback request for being directed to workflow and initiating;
Rollback task determination unit 302 is mapped for the rollback according to preconfigured task and rollback task and is closed
System determines that the workflow is at least one corresponding rollback task of task of execution state and the rollback is appointed
At least one rollback of business executes sequence;
Task terminates unit 303, executes the task for being in execution state for terminating;
Rollback task executing units 304, for executing the work for being in execution state according to the rollback execution sequence
Make the corresponding rollback task of task.
Optionally, the rollback processing unit, comprising:
Task initialization unit, for according to the execution request initialization for the workflow got in advance
The task of the workflow.
Optionally, the rollback processing unit, comprising:
Rollback condition judging unit, for judging whether the task meets preset rollback condition, if so, initially
Change the corresponding rollback task of the task, and the corresponding rollback task of task described after initialization is written
In the rollback mapping relations;Also, the rollback condition judging unit is run for the task of the workflow.
Optionally, the rollback condition, comprising: the execution time of task is more than or equal to preset time threshold.
Optionally, the task initialization unit, comprising:
Execution sequence initialization subelement, the task for initializing the workflow execute sequence.
Optionally, the rollback processing unit, comprising:
Rollback judging unit, for judge the workflow be in execution state task whether be configured with it is corresponding
Rollback task, if so, running the rollback task determination unit 302.
Optionally, if the judging result of rollback judging unit output is in the task of execution state not for described in
Corresponding rollback task is configured, the first execution unit and secondary rollback judging unit are run;
Wherein, first execution unit, for executing the task for being in execution state;
The secondary rollback judging unit, for judging that the workflow is in execution state according to the execution sequence
Whether the pending task of next execution is configured with corresponding rollback task after task executes, if so, running back
Rolling executes subelement;The rollback executes subelement, for determining at least one corresponding rollback of the pending task
At least one second rollback of task and the rollback task executes sequence, terminates holding for the task of the workflow
Row, and the corresponding rollback task of the pending task is executed according to the second rollback execution sequence.
Optionally, the rollback task, comprising: the rollback link of at least one rolling back action composition.
Optionally, the corresponding rollback task of the initialization task, comprising:
It configures in the rolling back action and the rollback link for including in the corresponding rollback link of the task and includes
The rollback of rolling back action execute sequence.
Optionally, the rollback task executing units 304, comprising:
Execution subelement is jumped, for jumping in the corresponding rollback link of task in execution state
The first rolling back action for including, and all rollbacks for including in the rollback link are successively executed according to the rollback execution sequence
Operation.
Optionally, the rolling back action is stored in preset data storage unit, and passes through the data storage cell
The rollback configuration interface of configuration accesses the rolling back action;
Also, the rolling back action for including in the corresponding rollback link of task to the workflow configures
When, matched by calling the rollback to configure interface and read from the data storage cell with the task of the workflow
Rolling back action, and the rolling back action is configured in conjunction with the service logic data of the task, and to described
The rollback execution sequence for the rolling back action for including in rollback link is configured, and the work of the configured workflow is appointed
It is engaged in the rolling back action write-in rollback mapping relations that corresponding rollback link includes in the middle.
Optionally, if the corresponding rolling back action of task of the workflow is not present in the data storage cell,
The corresponding rolling back action of the task is created, the rolling back action of creation is registered and is committed to the data storage is single
In member.
Optionally, the rolling back action stored in the data storage cell has configuration dimensional attribute, is calling institute
When stating the rolling back action that rollback configuration interface is read from the data storage cell and the task matches, according to institute
The matching dimensionality for stating workflow is matched from the consistent rolling back action of matching dimensionality for reading configuration dimension and the workflow
It sets;
Wherein, the configuration dimension includes at least one of following: type of service, business scope and work stream attribute.
Optionally, the rollback processing unit is run based on preset database management platform, and the data base administration is flat
Platform is deployed in cloud computing environment, for managing and maintaining the database realized in the cloud computing environment, the work
The mode for flowing task flow in a distributed manner is committed to the database management platform, and by submitting to the database management platform
The execution request and/or rollback of the workflow are requested, and are carried out by the workflow of the database management platform to submission
Business processing and/or rollback processing.
A kind of electronic equipment embodiment provided by the present application is as follows:
In the above-described embodiment, a kind of rollback processing method is provided, in addition, present invention also provides one kind for real
The electronic equipment of the existing rollback processing method, is illustrated with reference to the accompanying drawing.
Referring to attached drawing 4, it illustrates the schematic diagrames of a kind of electronic equipment provided in this embodiment.
The electronic equipment embodiment provided by the present application describes fairly simple, and relevant part refers to above-mentioned offer
The rollback processing method embodiment corresponding explanation.Embodiment described below is only schematical.
The application provides a kind of electronic equipment, comprising:
Memory 401 and processor 402;
The memory 401 is for storing computer executable instructions, and the processor 402 is for executing the computer
Executable instruction:
Obtain the rollback request initiated for workflow;
According to the rollback mapping relations of preconfigured task and rollback task, determines that the workflow is in and execute
At least one rollback of at least one corresponding rollback task of the task of state and the rollback task executes sequence;
It terminates and executes the task for being in execution state;
The corresponding rollback task of task for being in execution state is executed according to the rollback execution sequence.
Optionally, before the rollback request instruction that the acquisition is initiated for workflow executes, the processor 402 is also used to
Execute following computer executable instructions:
According to the task for initializing the workflow for the execution request of the workflow got in advance.
Optionally, the execution request for the workflow that the basis is got in advance initializes the workflow
After live task instruction executes, the processor 402 is also used to execute following computer executable instructions:
It for the task of the workflow, performs the following operations: it is preset to judge whether the task meets
Rollback condition, if so, initialize the corresponding rollback task of the task, and will after initialization the task and its
Corresponding rollback task is written in the rollback mapping relations.
Optionally, the rollback condition, comprising: the execution time of task is more than or equal to preset time threshold.
Optionally, the execution request for the workflow that the basis is got in advance initializes the workflow
Task, comprising:
Initialize the task of the workflow executes sequence.
Optionally, the determination workflow is at least one corresponding rollback task of task of execution state
Before instruction execution, the processor 402 is also used to execute following computer executable instructions:
Judge that the workflow is in the task of execution state and whether is configured with corresponding rollback task, if so, holding
At least one corresponding rollback assignment instructions of task that the row determination workflow is in execution state.
Optionally, if the judgement workflow be in next execution after the task execution of execution state to
Execute task whether be configured with corresponding rollback assignment instructions implementing result be it is no, the processor 402 is also used to hold
The following computer executable instructions of row:
The task for being in execution state is executed, and is finished in the task in execution state
After perform the following operations:
Next execution after the workflow be in the task execution of execution state is judged according to execution sequence
Pending task whether be configured with corresponding rollback task, if so, performing the following operations:
Determine at least the one of at least one corresponding rollback task of the pending task and the rollback task
A second rollback executes sequence, terminates the execution of the task of the workflow, and execute sequence according to second rollback
Execute the corresponding rollback task of the pending task.
Optionally, the rollback task, comprising: the rollback link of at least one rolling back action composition.
Optionally, the corresponding rollback task of the initialization task, comprising: it is corresponding to configure the task
Rollback link in include rolling back action and the rollback link in include the rollback of rolling back action execute sequence.
Optionally, described to execute task corresponding time for being in execution state according to the rollback execution sequence
Rolling task is realized in the following way:
The first rolling back action for including in the corresponding rollback link of task in execution state is jumped to,
And all rolling back actions for including in the rollback link are successively executed according to the rollback execution sequence.
Optionally, the rolling back action is stored in preset data storage unit, and passes through the data storage cell
The rollback configuration interface of configuration accesses the rolling back action;
Also, the rolling back action for including in the corresponding rollback link of task to the workflow configures
When, matched by calling the rollback to configure interface and read from the data storage cell with the task of the workflow
Rolling back action, and the rolling back action is configured in conjunction with the service logic data of the task, and to described
The rollback execution sequence for the rolling back action for including in rollback link is configured, and the work of the configured workflow is appointed
It is engaged in the rolling back action write-in rollback mapping relations that corresponding rollback link includes in the middle.
Optionally, if the corresponding rolling back action of task of the workflow is not present in the data storage cell,
The corresponding rolling back action of the task is created, the rolling back action of creation is registered and is committed to the data storage is single
In member.
Optionally, the rolling back action stored in the data storage cell has configuration dimensional attribute, is calling institute
When stating the rolling back action that rollback configuration interface is read from the data storage cell and the task matches, according to institute
The matching dimensionality for stating workflow is matched from the consistent rolling back action of matching dimensionality for reading configuration dimension and the workflow
It sets;
Wherein, the configuration dimension includes at least one of following: type of service, business scope and work stream attribute.
Optionally, the processor 402 is based on preset database management platform and executes the computer executable instructions,
The database management platform is deployed in cloud computing environment, is realized in the cloud computing environment for managing and maintaining
Database, the mode of workflow task flow in a distributed manner are committed to the database management platform, and by the number
The execution request and/or rollback request that the workflow is submitted according to depositary management platform, by the database management platform to submission
The workflow carry out business processing and/or rollback processing.
Although the application is disclosed as above with preferred embodiment, it is not for limiting the application, any this field skill
Art personnel are not departing from spirit and scope, can make possible variation and modification, therefore the guarantor of the application
Shield range should be subject to the range that the claim of this application defined.
In a typical configuration, calculating equipment includes one or more processors (CPU), input/output interface, net
Network 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 medium
Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method
Or 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), moves
State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable
Programmable 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 devices
Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates
Machine readable medium does not include non-temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
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 application
Form.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 code
The shape for the computer program product implemented on storage media (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.)
Formula.
Claims (17)
1. a kind of rollback processing method characterized by comprising
Obtain the rollback request initiated for workflow;
According to the rollback mapping relations of preconfigured task and rollback task, determine that the workflow is in execution state
At least one corresponding rollback task of task and at least one rollback of the rollback task execute sequence;
It terminates and executes the task for being in execution state;
The corresponding rollback task of task for being in execution state is executed according to the rollback execution sequence.
2. rollback processing method according to claim 1, which is characterized in that described to obtain the rollback initiated for workflow
Before request step executes, following step is executed:
According to the task for initializing the workflow for the execution request of the workflow got in advance.
3. rollback processing method according to claim 2, which is characterized in that the basis was got in advance is directed to described
After the task step that the execution request of workflow initializes the workflow executes, following step is executed:
For the task of the workflow, perform the following operations:
Judge whether the task meets preset rollback condition, if so, initializing the corresponding rollback of the task
Task, and the corresponding rollback task of task described after initialization is written in the rollback mapping relations.
4. rollback processing method according to claim 3, which is characterized in that the rollback condition, comprising:
The execution time of task is more than or equal to preset time threshold.
5. rollback processing method according to claim 2, which is characterized in that the basis was got in advance is directed to described
The execution request of workflow initializes the task of the workflow, comprising:
Initialize the task of the workflow executes sequence.
6. according to claim 1 to rollback processing method described in 5 any one, which is characterized in that the determination work
Before at least one corresponding rollback task step of task of the stream in execution state executes, perform the following operations:
Judge that the workflow is in the task of execution state and whether is configured with corresponding rollback task, if so, executing institute
State at least one the corresponding rollback task step of task for determining that the workflow is in execution state.
7. rollback processing method according to claim 6, which is characterized in that executed if the judgement workflow is in
The judging result whether task of state is configured with corresponding rollback task step is the work for being in execution state
Corresponding rollback task is not configured in task, executes the task for being in execution state, and be in execution state described
Task be finished after perform the following operations:
According to execution sequence judge next execution after the workflow be in the task execution of execution state to
Execute whether task is configured with corresponding rollback task, if so, performing the following operations:
Determine at least one corresponding rollback task of the pending task and the rollback task at least one
Two rollbacks execute sequence, terminate the execution of the task of the workflow, and execute according to the second rollback execution sequence
The corresponding rollback task of the pending task.
8. rollback processing method according to claim 3, which is characterized in that the rollback task, comprising:
The rollback link of at least one rolling back action composition.
9. rollback processing method according to claim 8, which is characterized in that the initialization task is corresponding
Rollback task, comprising:
Configure time for including in the rolling back action and the rollback link for including in the corresponding rollback link of the task
The rollback of rolling operation executes sequence.
10. rollback processing method according to claim 9, which is characterized in that described to be held according to the rollback execution sequence
The row corresponding rollback task of task for being in execution state, is realized in the following way:
The first rolling back action for including in the corresponding rollback link of task in execution state is jumped to, and is pressed
All rolling back actions for including in the rollback link are successively executed according to the rollback execution sequence.
11. rollback processing method according to claim 9, which is characterized in that the rolling back action is stored in preset data
In storage unit, and interface is configured by the rollback that the data storage cell configures and accesses the rolling back action;
Also, when the rolling back action for including in the corresponding rollback link of task to the workflow configures,
By calling the rollback to configure what interface matched from the task of data storage cell reading and the workflow
Rolling back action, and the rolling back action is configured in conjunction with the service logic data of the task, and to described time
The rollback execution sequence for the rolling back action for including in roller chain road is configured, by the task of the configured workflow
The rolling back action for including in corresponding rollback link is written in the rollback mapping relations.
12. rollback processing method according to claim 11, which is characterized in that if being not present in the data storage cell
The corresponding rolling back action of the task of the workflow creates the corresponding rolling back action of the task, by the institute of creation
Rolling back action is stated to register and be committed in the data storage cell.
13. rollback processing method according to claim 11, which is characterized in that the institute stored in the data storage cell
Stating rolling back action has configuration dimensional attribute, is calling the rollback configuration interface to read from the data storage cell and institute
When stating the rolling back action that task matches, according to the matching dimensionality of the workflow, dimension and the work are configured from reading
The consistent rolling back action of matching dimensionality for making to flow is configured;
Wherein, the configuration dimension includes at least one of following: type of service, business scope and work stream attribute.
14. according to claim 1 to rollback processing method described in 13 any one, which is characterized in that the rollback processing side
Method realizes that the database management platform is deployed in cloud computing environment, for managing based on preset database management platform
Manage and be maintained in the database realized in the cloud computing environment, the mode of workflow task flow in a distributed manner is committed to institute
State database management platform, and execution request from the workflow to the database management platform and/or rollback by submitting
Request carries out business processing by the workflow of the database management platform to submission and/or rollback is handled.
15. a kind of rollback processing unit characterized by comprising
Rollback request unit, for obtaining the rollback request for being directed to workflow and initiating;
Rollback task determination unit is determined for the rollback mapping relations according to preconfigured task and rollback task
At least one corresponding rollback task of task and the rollback task that the workflow is in execution state are at least
One rollback executes sequence;
Task terminates unit, executes the task for being in execution state for terminating;
Rollback task executing units, for executing the task pair for being in execution state according to the rollback execution sequence
The rollback task answered.
16. rollback processing unit according to claim 15, which is characterized in that the rollback processing unit is based on preset
Database management platform operation, the database management platform is deployed in cloud computing environment, for managing and maintaining in institute
State the database realized in cloud computing environment, the mode of workflow task flow in a distributed manner is committed to the data base administration
Platform, and execution request from the workflow to the database management platform and/or rollback by submitting are requested, by the number
Business processing is carried out according to the workflow of the depositary management platform to submission and/or rollback is handled.
17. a kind of electronic equipment characterized by comprising
Memory and processor;
The memory is for storing computer executable instructions, and for executing, the computer is executable to be referred to the processor
It enables:
Obtain the rollback request initiated for workflow;
According to the rollback mapping relations of preconfigured task and rollback task, determine that the workflow is in execution state
At least one corresponding rollback task of task and at least one rollback of the rollback task execute sequence;
It terminates and executes the task for being in execution state;
The corresponding rollback task of task for being in execution state is executed according to the rollback execution sequence.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711181632.2A CN109829678B (en) | 2017-11-23 | 2017-11-23 | Rollback processing method and device and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711181632.2A CN109829678B (en) | 2017-11-23 | 2017-11-23 | Rollback processing method and device and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109829678A true CN109829678A (en) | 2019-05-31 |
CN109829678B CN109829678B (en) | 2023-07-21 |
Family
ID=66859316
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711181632.2A Active CN109829678B (en) | 2017-11-23 | 2017-11-23 | Rollback processing method and device and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109829678B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110599341A (en) * | 2019-09-20 | 2019-12-20 | 中国银行股份有限公司 | Transaction calling method and system |
CN111178823A (en) * | 2019-11-28 | 2020-05-19 | 泰康保险集团股份有限公司 | Cancellation method and device for residence-related affairs |
CN114302438A (en) * | 2021-12-29 | 2022-04-08 | 中国电信股份有限公司 | Network element exception handling method, device, equipment and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101977127A (en) * | 2010-11-26 | 2011-02-16 | 迈普通信技术股份有限公司 | SNMP (Simple Network Management Protocol) based equipment configuration roll back method and SNMP network management equipment |
CN102111783A (en) * | 2009-12-28 | 2011-06-29 | 中兴通讯股份有限公司 | Primary subcommand rollback method and terminal |
CN102255761A (en) * | 2011-08-19 | 2011-11-23 | 迈普通信技术股份有限公司 | File-based configuration rollback system and configuration rollback method |
CN103699681A (en) * | 2013-12-31 | 2014-04-02 | 华为技术有限公司 | Data rollback processing method and data rollback processing device |
CN105703941A (en) * | 2015-12-31 | 2016-06-22 | 山石网科通信技术有限公司 | Method and device for processing configuration transaction |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101807272A (en) * | 2010-03-24 | 2010-08-18 | 上海普元信息技术有限责任公司 | System structure and method for realizing integrities of process affairs and business affairs in workflow system |
CN105989164B (en) * | 2015-03-04 | 2019-08-09 | 阿里巴巴集团控股有限公司 | Rollback processing method and processing device |
CN106845741A (en) * | 2015-12-03 | 2017-06-13 | 北大方正集团有限公司 | The customization device and customization method of workflow |
-
2017
- 2017-11-23 CN CN201711181632.2A patent/CN109829678B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102111783A (en) * | 2009-12-28 | 2011-06-29 | 中兴通讯股份有限公司 | Primary subcommand rollback method and terminal |
CN101977127A (en) * | 2010-11-26 | 2011-02-16 | 迈普通信技术股份有限公司 | SNMP (Simple Network Management Protocol) based equipment configuration roll back method and SNMP network management equipment |
CN102255761A (en) * | 2011-08-19 | 2011-11-23 | 迈普通信技术股份有限公司 | File-based configuration rollback system and configuration rollback method |
CN103699681A (en) * | 2013-12-31 | 2014-04-02 | 华为技术有限公司 | Data rollback processing method and data rollback processing device |
CN105703941A (en) * | 2015-12-31 | 2016-06-22 | 山石网科通信技术有限公司 | Method and device for processing configuration transaction |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110599341A (en) * | 2019-09-20 | 2019-12-20 | 中国银行股份有限公司 | Transaction calling method and system |
CN111178823A (en) * | 2019-11-28 | 2020-05-19 | 泰康保险集团股份有限公司 | Cancellation method and device for residence-related affairs |
CN111178823B (en) * | 2019-11-28 | 2023-06-16 | 泰康保险集团股份有限公司 | Method and device for canceling residence related transaction |
CN114302438A (en) * | 2021-12-29 | 2022-04-08 | 中国电信股份有限公司 | Network element exception handling method, device, equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN109829678B (en) | 2023-07-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10958789B2 (en) | Techniques for case allocation | |
US10146665B2 (en) | Systems and methods for providing dynamic and real time simulations of matching resources to requests | |
CN109829678A (en) | A kind of rollback processing method, device and electronic equipment | |
CN109934708A (en) | A kind of more policy-simulative method of commerce in local and system and device | |
CN110263580A (en) | Data processing method, device and block chain node based on block chain | |
US8316375B2 (en) | Load-balancing of processes based on inertia | |
CN106648839A (en) | Method and device for processing data | |
CN109634714A (en) | A kind of method and device of intelligent scheduling | |
US20130013244A1 (en) | Pattern based test prioritization using weight factors | |
JP2013089236A (en) | System and method for parallel edge division in and/or graph search | |
CN104809098A (en) | Method and device for determining statistical model parameter based on expectation-maximization algorithm | |
CN104407848B (en) | A kind of data processing method and device | |
CN117763024A (en) | Data fragment extraction method and device | |
US10503696B1 (en) | Maintaining stable record identifiers in the presence of updated data records | |
US8667491B2 (en) | Method and apparatus for executing a transition workflow between swim lanes of a workflow | |
CN106484879A (en) | A kind of polymerization of the Map end data based on MapReduce | |
CN102063308A (en) | Method for controlling processing flow of seismic prospecting data | |
RU182966U1 (en) | AUTOMATED PROJECT RISK ASSESSMENT SYSTEM | |
US20230367594A1 (en) | System and method for processing instructions associated with one or more data transfers | |
US20240061705A1 (en) | System and method for executing data processing tasks | |
CN106897149A (en) | Process the method and system of big data | |
US20120310690A1 (en) | Erp transaction recording to tables system and method | |
CN117745215A (en) | Low-code platform-oriented flow state circulation method, device and program product | |
US10535008B1 (en) | Parallel time series analysis | |
CA3172372A1 (en) | System and method for executing data processing tasks |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |