CN111080250A - Flow backspacing compensation method and device, storage medium and electronic equipment - Google Patents

Flow backspacing compensation method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN111080250A
CN111080250A CN201911261657.2A CN201911261657A CN111080250A CN 111080250 A CN111080250 A CN 111080250A CN 201911261657 A CN201911261657 A CN 201911261657A CN 111080250 A CN111080250 A CN 111080250A
Authority
CN
China
Prior art keywords
flow node
node
flow
backed
asynchronous message
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
Application number
CN201911261657.2A
Other languages
Chinese (zh)
Other versions
CN111080250B (en
Inventor
袁天明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Neusoft Corp
Original Assignee
Neusoft Corp
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Neusoft Corp filed Critical Neusoft Corp
Priority to CN201911261657.2A priority Critical patent/CN111080250B/en
Publication of CN111080250A publication Critical patent/CN111080250A/en
Application granted granted Critical
Publication of CN111080250B publication Critical patent/CN111080250B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/10Office automation; Time management
    • G06Q10/103Workflow collaboration or project management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/12Accounting

Abstract

The disclosure relates to a flow rollback compensation method, a flow rollback compensation device, a storage medium and an electronic device, wherein the method comprises the following steps: determining a flow node to be rolled back when the flow operation is refuted; if it is determined that the flow node to be backed up needs to be automatically compensated, updating the state of a suspended asynchronous message corresponding to the flow node to be backed up to an operating state, wherein the asynchronous message comprises an application identifier of an application program corresponding to the flow node to be backed up, the application program is acquired when the flow node to be backed up performs business operation, and the application program comprises a compensation subprogram for compensating the flow node to be backed up; and compensating the flow node to be backed off according to the asynchronous message. Therefore, repeated analysis of the flow nodes can be avoided, and the efficiency of flow rollback compensation is improved. The method can effectively reduce the expenses of program resources and storage resources, reduce the reading and writing frequency of the database, and improve the simplicity and the easiness of the process rollback compensation.

Description

Flow backspacing compensation method and device, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of process processing, and in particular, to a method and an apparatus for compensating for process rollback, a storage medium, and an electronic device.
Background
During the process of running the flow, the flow may need to be rolled back due to manual operation or an emergency (e.g., network interruption) or the like. During the rollback process, compensation operation may be performed for some flow nodes. In the prior art, when compensating a flow node, a flow engine is generally required to analyze the flow node, so as to create a compensation application program, and thus compensate the flow node based on the compensation application program.
Disclosure of Invention
The purpose of the present disclosure is to provide a flow rollback compensation method, apparatus, storage medium, and electronic device that reduce the overhead of program resources and storage resources.
In order to achieve the above object, according to a first aspect of the present disclosure, there is provided a flow backoff compensation method, including:
determining a flow node to be rolled back when the flow operation is refuted;
if it is determined that the flow node to be backed up needs to be automatically compensated, updating the state of a suspended asynchronous message corresponding to the flow node to be backed up to an operating state, wherein the asynchronous message comprises an application identifier of an application program corresponding to the flow node to be backed up, the application program is acquired when the flow node to be backed up performs business operation, and the application program comprises a compensation subprogram for compensating the flow node to be backed up;
and compensating the flow node to be backed off according to the asynchronous message.
Optionally, the method further comprises:
analyzing a flow node to be executed during flow operation to obtain an application identifier corresponding to the flow node to be executed;
acquiring an application program corresponding to the flow node to be executed according to the application identifier;
if the type of the application program corresponding to the flow node to be executed is an automatic compensation type and the operation mode of the application program corresponding to the flow node to be executed is asynchronous processing, establishing an asynchronous message corresponding to the flow node to be executed;
and if the flow node to be executed is successfully executed, setting the state of the asynchronous message corresponding to the flow node to be executed as a suspended state.
Optionally, the asynchronous message corresponding to the flow node to be backed off further includes a node identifier of the flow node to be backed off;
the compensating the flow node to be backed off according to the asynchronous message comprises the following steps:
and sending the asynchronous message to an application program processor, and executing the compensation subprogram by the application program processor according to the process node information corresponding to the node identifier in the asynchronous message.
Optionally, the method further comprises:
after the flow node to be backed off is compensated according to the asynchronous message, determining the next flow node to be backed off according to the flow operation information;
determining the next flow node to be backed off as a new flow node to be backed off, and if the flow node to be backed off is determined to need to be automatically compensated, updating the state of the suspended asynchronous message corresponding to the flow node to be backed off into an operating state; and compensating the flow node to be rolled back according to the asynchronous message.
Optionally, the method further comprises:
and after the flow node to be backed off is compensated, deleting the asynchronous message corresponding to the flow node to be backed off.
According to a second aspect of the present disclosure, there is provided a flow backoff compensating apparatus, the apparatus comprising:
the first determining module is used for determining a flow node to be rolled back when the flow operation is rejected;
an updating module, configured to update a state of a suspended asynchronous message corresponding to the flow node to be backed up to an operating state when it is determined that the flow node to be backed up needs to perform automatic compensation, where the asynchronous message includes an application identifier of an application program corresponding to the flow node to be backed up, the application program is acquired when the flow node to be backed up performs service operation, and the application program includes a compensation subprogram for compensating the flow node to be backed up;
and the compensation module is used for compensating the flow node to be rolled back according to the asynchronous message.
Optionally, the apparatus further comprises:
the analysis module is used for analyzing the flow node to be executed during the process running so as to obtain an application identifier corresponding to the flow node to be executed;
the acquisition module is used for acquiring the application program corresponding to the flow node to be executed according to the application identifier;
the creation module is used for creating an asynchronous message corresponding to the flow node to be executed under the condition that the type of the application program corresponding to the flow node to be executed is an automatic compensation type and the operation mode of the application program corresponding to the flow node to be executed is asynchronous processing;
and the setting module is used for setting the state of the asynchronous message corresponding to the flow node to be executed as a suspended state under the condition that the flow node to be executed is successfully executed.
Optionally, the asynchronous message corresponding to the flow node to be backed off further includes a node identifier of the flow node to be backed off;
the compensation module includes:
and sending the asynchronous message to an application program processor, and executing the compensation subprogram by the application program processor according to the process node information corresponding to the node identifier in the asynchronous message.
Optionally, the apparatus further comprises:
a second determining module, configured to determine a next flow node to be backed up according to the flow operation information after the flow node to be backed up is compensated according to the asynchronous message, determine the next flow node to be backed up as a new flow node to be backed up, and trigger the updating module to update a state of the suspended asynchronous message corresponding to the flow node to be backed up to an operation state when it is determined that the flow node to be backed up needs to be automatically compensated; and the compensation module compensates the flow node to be rolled back according to the asynchronous message.
Optionally, the apparatus further comprises:
and the deleting module is used for deleting the asynchronous message corresponding to the flow node to be backed after compensating the flow node to be backed.
According to a third aspect of the present disclosure, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of any of the methods of the first aspect described above.
According to a fourth aspect of the present disclosure, there is provided an electronic device comprising:
a memory having a computer program stored thereon;
a processor for executing the computer program in the memory to implement the steps of the method of any of the first aspects above.
In the technical scheme, when the process operation is rejected, a process node to be rolled back is determined; and when determining that the flow node to be backed off needs to be automatically compensated, updating the state of the suspended asynchronous message corresponding to the flow node to be backed off into an operating state, so as to compensate the flow node to be backed off according to the asynchronous message. According to the technical scheme, the application program is acquired when the process node performs business operation and comprises the compensation subprogram for compensating the back process node, so that when the process node is compensated, the compensation can be performed based on the application program and the asynchronous message of the process node during the business operation, the repeated analysis of the process node is avoided, and the efficiency of the process back compensation is improved. In addition, the application program and asynchronous messages do not need to be created again, the expenses of program resources and storage resources can be effectively reduced, the reading and writing frequency of the database is reduced, and the simplicity and the easiness of the process rollback compensation are improved.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows.
Drawings
The accompanying drawings, which are included to provide a further understanding of the disclosure and are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description serve to explain the disclosure without limiting the disclosure. In the drawings:
fig. 1 is a flowchart of a flow backoff compensation method provided according to an embodiment of the present disclosure;
fig. 2 is a block diagram of a flow backoff compensating apparatus provided in accordance with an embodiment of the present disclosure;
FIG. 3 is a block diagram illustrating an electronic device in accordance with an exemplary embodiment;
FIG. 4 is a block diagram illustrating an electronic device in accordance with an example embodiment.
Detailed Description
The following detailed description of specific embodiments of the present disclosure is provided in connection with the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating the present disclosure, are given by way of illustration and explanation only, not limitation.
The applicant finds that, during the process running, the process node needs to be analyzed, and a service application and a program message need to be created to realize the service operation corresponding to the process node. When the procedure operation is rejected, when the executed node is compensated, the procedure node also needs to be analyzed, and an application program and a message for compensation are created, so that the overhead of program resources and storage resources is large. Based on this, the present disclosure provides a flow rollback compensation method, which can effectively reduce the overhead of program resources and storage resources.
Fig. 1 is a flowchart illustrating a method for compensating for a flow backoff according to an embodiment of the present disclosure, where as shown in fig. 1, the method includes:
in S11, when the procedure operation is rejected, a procedure node to be rolled back is determined.
The process may be a process running in a single local system, or a process running in a distributed system, and the process is run through cooperation of multiple systems. For example, the rejections of the process operation may be that when the process operates to a certain node, the current state of the process cannot meet the approval condition of the task of the node, and the task cannot pass, then the rejections of the process operation occur. For example, the user submits the leave approval, and the leave approval is rejected when the supervisor conducts the approval, and the leave approval is returned to the user node, and the process is rejected at this time. In another example, the process execution rejections may be performed when the process is executed to a certain node and the node task is not successfully executed due to network or system interruption during the execution of the node task. For example, in the payment process of the user, the user submits a payment request and completes payment deduction, and when the payment is performed, because the network is interrupted and the payment fails, the user returns to the user node, and the user needs to be compensated, and the process operation is refuted.
For example, when the flow node to be rolled back is determined when the process operation is rolled back, the flow node to be rolled back may be determined according to the completion time of the flow node, and the flow node with the latest completion time is determined as the flow node to be rolled back.
In S12, if it is determined that the process node to be rolled back needs to be automatically compensated, updating a state of a suspended asynchronous message corresponding to the process node to be rolled back to an operating state, where the asynchronous message includes an application identifier of an application program corresponding to the process node to be rolled back, the application program is acquired when the process node to be rolled back performs a business operation, and the application program includes a compensation subprogram for compensating the process node to be rolled back.
The automatic compensation of the process node is compensation that can be realized only by executing the logic of the compensation subprogram, for example, automatic refund when payment fails in the payment process.
For example, a compensation identifier may be preset for a process node that needs to be automatically compensated in a process, and the identifier information is used to indicate that the process node needs to be automatically compensated, so that whether the process node needs to be automatically compensated may be determined by detecting whether the process node to be rolled back is provided with the compensation identifier.
In S13, the back-off process node is compensated according to the asynchronous message.
For example, the application program includes a compensation subprogram for compensating the flow node to be rolled back, and the compensation subprogram in the application program corresponding to the application identifier included in the asynchronous message may be directly executed based on the service data of the flow, so as to compensate the flow node. The method for acquiring the service data of the process may be the prior art, and is not described herein again.
In the technical scheme, when the process operation is rejected, a process node to be rolled back is determined; and when determining that the flow node to be backed off needs to be automatically compensated, updating the state of the suspended asynchronous message corresponding to the flow node to be backed off into an operating state, so as to compensate the flow node to be backed off according to the asynchronous message. According to the technical scheme, the application program is acquired when the process node performs business operation and comprises the compensation subprogram for compensating the back process node, so that when the process node is compensated, the compensation can be performed based on the application program and the asynchronous message of the process node during the business operation, the repeated analysis of the process node is avoided, and the efficiency of the process back compensation is improved. In addition, the application program and asynchronous messages do not need to be created again, the expenses of program resources and storage resources can be effectively reduced, the reading and writing frequency of the database is reduced, and the simplicity and the easiness of the process rollback compensation are improved.
Optionally, the method further comprises:
and analyzing the flow node to be executed during flow operation to obtain the application identifier corresponding to the flow node to be executed.
And acquiring the application program corresponding to the flow node to be executed according to the application identifier.
In an exemplary embodiment, during process setting, an application program of an automatic compensation type is set for a process node that needs automatic compensation, where the application program includes both the service subprogram for executing normal service of the process node and the compensation subprogram for compensating the process node, and associates an application identifier of the application program with the process node. In the prior art, a plurality of global extension attributes are generally required to be created to execute the compensation application program. This can result in multiple extended attributes for nodes in the process that need automatic compensation. In the above technical solution, by associating the application program with the process node, it is not necessary to create a plurality of extended attributes, and the storage resource occupation corresponding to the extended attributes can also be effectively reduced, thereby further reducing the overhead of the storage resource.
In this embodiment, during the process running, the process node may be analyzed, so that the application identifier corresponding to the process node may be obtained, and the application program corresponding to the application identifier may be obtained according to the application identifier.
If the type of the application program corresponding to the flow node to be executed is an automatic compensation type and the operation mode of the application program corresponding to the flow node to be executed is asynchronous processing, establishing an asynchronous message corresponding to the flow node to be executed;
and if the flow node to be executed is successfully executed, setting the state of the asynchronous message corresponding to the flow node to be executed as a suspended state.
The type and the operation mode of the application program can be preset. For example, an application program corresponding to a flow node may be set by a flow designer, and when the corresponding application program is set, the type and the operation mode of the application program are set.
In this embodiment, if the type of the application program corresponding to the flow node is an automatic compensation type, it indicates that the flow node needs to perform automatic compensation when the flow operation is refuted. Therefore, after the flow node to be executed is successfully executed, the state of the asynchronous message corresponding to the flow node to be executed may be set to the suspended state. Setting and updating of the state of an asynchronous message may be accomplished, for example, by associating a state identification for the message. For example, when the asynchronous message is generated, the state identifier may default to a null value or a running state, and after the flow node to be executed is successfully executed, the state identifier of the asynchronous message is set to a suspended state. For another example, the state flag may also be represented by a binary number, such as 1 for the run state and 0 for the suspend state. By the technical scheme, when the flow node is compensated, the asynchronous message does not need to be generated again, so that the reading and writing frequency of the database can be effectively reduced, and the resource overhead of creating the message is reduced.
Optionally, if the operation mode of the application program corresponding to the flow node to be executed is synchronous processing, the service operation of the flow node to be executed may be directly executed. If the type of the application program corresponding to the flow node to be executed is not the automatic compensation type and the operation mode of the application program is asynchronous processing, an asynchronous message corresponding to the flow node to be executed is created, and the asynchronous message can be directly deleted after the flow node to be executed is successfully executed.
Optionally, the asynchronous message corresponding to the flow node to be backed off further includes a node identifier of the flow node to be backed off;
compensating the flow node to be backed according to the asynchronous message, comprising:
and sending the asynchronous message to an application program processor, and executing the compensation subprogram by the application program processor according to the process node information corresponding to the node identifier in the asynchronous message.
Wherein, the application processor can carry out unified scheduling processing on the asynchronous messages. When the application processor schedules the asynchronous message, the corresponding application program can be obtained based on the application identifier in the asynchronous message, so as to determine a compensation subprogram in the application program; and acquiring the process node information of the process node corresponding to the node identification from the process instance based on the node identification in the asynchronous message. Therefore, the application processor can execute the compensation subroutine according to the flow node information, thereby compensating the flow node. For example, the corresponding process node is acquired as a deduction node according to the node identifier, the process node information is a user account balance, and the service data, such as the deduction amount, can be acquired by executing the compensation subprogram, so that the deduction amount is compensated to the user balance to complete compensation of the deduction node.
Therefore, in the above technical solution, the asynchronous message is sent to the application processor, so that the application processor schedules the asynchronous message, on one hand, uniform processing of the asynchronous message is facilitated, and on the other hand, the compensation service can be processed separately, so as to improve efficiency and throughput of process processing and reduce pressure of a process engine.
Optionally, the method further comprises:
and after the flow node to be backed off is compensated, deleting the asynchronous message corresponding to the flow node to be backed off.
After the flow node to be backed off is compensated, the asynchronous message is not needed to be used in the subsequent processing process of the flow, and the asynchronous message corresponding to the flow node to be backed off can be deleted at the moment, so that the occupation of storage resources can be further reduced, and the storage space is saved.
Optionally, the method further comprises:
after the flow node to be backed off is compensated according to the asynchronous message, determining the next flow node to be backed off according to the flow operation information; the previous process node of the process node to be reversed in the process of process operation can be used as the next process node to be reversed according to the process operation information, so that the completed process node is traversed reversely to perform process reversion compensation.
Determining the next flow node to be backed off as a new flow node to be backed off, and if the flow node to be backed off is determined to need to be automatically compensated, updating the state of the suspended asynchronous message corresponding to the flow node to be backed off into an operating state; and compensating the flow node to be rolled back according to the asynchronous message.
The specific implementation of the above compensation has been described in detail above, and is not described herein again.
By the technical scheme, the completed process nodes in the process can be reversely traversed according to the process running information, and each process node needing automatic compensation in the process is compensated in the reverse traversing process, so that the data consistency in the process running is ensured.
The present disclosure also provides a process rollback compensation apparatus, as shown in fig. 2, where the apparatus 10 includes:
a first determining module 100, configured to determine a flow node to be rolled back when a flow operation is rejected;
an updating module 200, configured to update a state of a suspended asynchronous message corresponding to the to-be-backed flow node to an operating state under a condition that it is determined that the to-be-backed flow node needs to perform automatic compensation, where the asynchronous message includes an application identifier of an application program corresponding to the to-be-backed flow node, the application program is acquired when the to-be-backed flow node performs service operation, and the application program includes a compensation subprogram for compensating the to-be-backed flow node;
a compensation module 300, configured to compensate the flow node to be rolled back according to the asynchronous message.
Optionally, the apparatus further comprises:
the analysis module is used for analyzing the flow node to be executed during the process running so as to obtain an application identifier corresponding to the flow node to be executed;
the acquisition module is used for acquiring the application program corresponding to the flow node to be executed according to the application identifier;
the creation module is used for creating an asynchronous message corresponding to the flow node to be executed under the condition that the type of the application program corresponding to the flow node to be executed is an automatic compensation type and the operation mode of the application program corresponding to the flow node to be executed is asynchronous processing;
and the setting module is used for setting the state of the asynchronous message corresponding to the flow node to be executed as a suspended state under the condition that the flow node to be executed is successfully executed.
Optionally, the asynchronous message corresponding to the flow node to be backed off further includes a node identifier of the flow node to be backed off;
the compensation module includes:
and sending the asynchronous message to an application program processor, and executing the compensation subprogram by the application program processor according to the process node information corresponding to the node identifier in the asynchronous message.
Optionally, the apparatus further comprises:
a second determining module, configured to determine a next flow node to be backed up according to the flow operation information after the flow node to be backed up is compensated according to the asynchronous message, determine the next flow node to be backed up as a new flow node to be backed up, and trigger the updating module to update a state of the suspended asynchronous message corresponding to the flow node to be backed up to an operation state when it is determined that the flow node to be backed up needs to be automatically compensated; and the compensation module compensates the flow node to be rolled back according to the asynchronous message.
Optionally, the apparatus further comprises:
and the deleting module is used for deleting the asynchronous message corresponding to the flow node to be backed after compensating the flow node to be backed.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 3 is a block diagram illustrating an electronic device 700 according to an example embodiment. As shown in fig. 3, the electronic device 700 may include: a processor 701 and a memory 702. The electronic device 700 may also include one or more of a multimedia component 703, an input/output (I/O) interface 704, and a communication component 705.
The processor 701 is configured to control the overall operation of the electronic device 700, so as to complete all or part of the steps in the above-mentioned process backoff compensation method. The memory 702 is used to store various types of data to support operation at the electronic device 700, such as instructions for any application or method operating on the electronic device 700 and application-related data, such as contact data, transmitted and received messages, pictures, audio, video, and the like. The Memory 702 may be implemented by any type of volatile or non-volatile Memory device or combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic Memory, flash Memory, magnetic disk, or optical disk. The multimedia components 703 may include screen and audio components. Wherein the screen may be, for example, a touch screen and the audio component is used for outputting and/or inputting audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may further be stored in the memory 702 or transmitted through the communication component 705. The audio assembly also includes at least one speaker for outputting audio signals. The I/O interface 704 provides an interface between the processor 701 and other interface modules, such as a keyboard, mouse, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 705 is used for wired or wireless communication between the electronic device 700 and other devices. Wireless communication, such as Wi-Fi, bluetooth, Near Field Communication (NFC), 2G, 3G, 4G, NB-IOT, eMTC, or other 5G, etc., or a combination of one or more of them, which is not limited herein. The corresponding communication component 705 may thus include: Wi-Fi module, Bluetooth module, NFC module, etc.
In an exemplary embodiment, the electronic Device 700 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components for executing the above-mentioned process backoff compensation method.
In another exemplary embodiment, a computer readable storage medium comprising program instructions which, when executed by a processor, implement the steps of the flow back compensation method described above is also provided. For example, the computer readable storage medium may be the memory 702 comprising program instructions executable by the processor 701 of the electronic device 700 to perform the flow back compensation method described above.
Fig. 4 is a block diagram illustrating an electronic device 1900 according to an example embodiment. For example, the electronic device 1900 may be provided as a server. Referring to fig. 4, an electronic device 1900 includes a processor 1922, which may be one or more in number, and a memory 1932 for storing computer programs executable by the processor 1922. The computer program stored in memory 1932 may include one or more modules that each correspond to a set of instructions. Further, the processor 1922 may be configured to execute the computer program to perform the above-described flow back compensation method.
Additionally, electronic device 1900 may also include a power component 1926 and a communication component 1950, the power component 1926 may be configured to perform power management of the electronic device 1900, and the communication component 1950 may be configured to enable communication, e.g., wired or wireless communication, of the electronic device 1900. In addition, the electronic device 1900 may also include input/output (I/O) interfaces 1958. The electronic device 1900 may operate based on an operating system, such as Windows Server, Mac OS XTM, UnixTM, Linux, etc., stored in memory 1932.
In another exemplary embodiment, a computer readable storage medium comprising program instructions which, when executed by a processor, implement the steps of the flow back compensation method described above is also provided. For example, the computer readable storage medium may be the memory 1932 described above that includes program instructions that are executable by the processor 1922 of the electronic device 1900 to perform the flow back compensation method described above.
In another exemplary embodiment, a computer program product is also provided, which comprises a computer program executable by a programmable apparatus, the computer program having code portions for performing the above-described flow back compensation method when executed by the programmable apparatus.
The preferred embodiments of the present disclosure are described in detail with reference to the accompanying drawings, however, the present disclosure is not limited to the specific details of the above embodiments, and various simple modifications may be made to the technical solution of the present disclosure within the technical idea of the present disclosure, and these simple modifications all belong to the protection scope of the present disclosure.
It should be noted that the various features described in the above embodiments may be combined in any suitable manner without departing from the scope of the invention. In order to avoid unnecessary repetition, various possible combinations will not be separately described in this disclosure.
In addition, any combination of various embodiments of the present disclosure may be made, and the same should be considered as the disclosure of the present disclosure, as long as it does not depart from the spirit of the present disclosure.

Claims (10)

1. A method for compensating for process rollback, the method comprising:
determining a flow node to be rolled back when the flow operation is refuted;
if it is determined that the flow node to be backed up needs to be automatically compensated, updating the state of a suspended asynchronous message corresponding to the flow node to be backed up to an operating state, wherein the asynchronous message comprises an application identifier of an application program corresponding to the flow node to be backed up, the application program is acquired when the flow node to be backed up performs business operation, and the application program comprises a compensation subprogram for compensating the flow node to be backed up;
and compensating the flow node to be backed off according to the asynchronous message.
2. The method of claim 1, further comprising:
analyzing a flow node to be executed during flow operation to obtain an application identifier corresponding to the flow node to be executed;
acquiring an application program corresponding to the flow node to be executed according to the application identifier;
if the type of the application program corresponding to the flow node to be executed is an automatic compensation type and the operation mode of the application program corresponding to the flow node to be executed is asynchronous processing, establishing an asynchronous message corresponding to the flow node to be executed;
and if the flow node to be executed is successfully executed, setting the state of the asynchronous message corresponding to the flow node to be executed as a suspended state.
3. The method according to claim 1, wherein the asynchronous message corresponding to the flow node to be rolled back further includes a node identifier of the flow node to be rolled back;
the compensating the flow node to be backed off according to the asynchronous message comprises the following steps:
and sending the asynchronous message to an application program processor, and executing the compensation subprogram by the application program processor according to the process node information corresponding to the node identifier in the asynchronous message.
4. The method of claim 1, further comprising:
after the flow node to be backed off is compensated according to the asynchronous message, determining the next flow node to be backed off according to the flow operation information;
determining the next flow node to be backed off as a new flow node to be backed off, and if the flow node to be backed off is determined to need to be automatically compensated, updating the state of the suspended asynchronous message corresponding to the flow node to be backed off into an operating state; and compensating the flow node to be rolled back according to the asynchronous message.
5. The method of claim 1, further comprising:
and after the flow node to be backed off is compensated, deleting the asynchronous message corresponding to the flow node to be backed off.
6. A process fallback compensation apparatus, comprising:
the first determining module is used for determining a flow node to be rolled back when the flow operation is rejected;
an updating module, configured to update a state of a suspended asynchronous message corresponding to the flow node to be backed up to an operating state when it is determined that the flow node to be backed up needs to perform automatic compensation, where the asynchronous message includes an application identifier of an application program corresponding to the flow node to be backed up, the application program is acquired when the flow node to be backed up performs service operation, and the application program includes a compensation subprogram for compensating the flow node to be backed up;
and the compensation module is used for compensating the flow node to be rolled back according to the asynchronous message.
7. The apparatus of claim 6, further comprising:
the analysis module is used for analyzing the flow node to be executed during the process running so as to obtain an application identifier corresponding to the flow node to be executed;
the acquisition module is used for acquiring the application program corresponding to the flow node to be executed according to the application identifier;
the creation module is used for creating an asynchronous message corresponding to the flow node to be executed under the condition that the type of the application program corresponding to the flow node to be executed is an automatic compensation type and the operation mode of the application program corresponding to the flow node to be executed is asynchronous processing;
and the setting module is used for setting the state of the asynchronous message corresponding to the flow node to be executed as a suspended state under the condition that the flow node to be executed is successfully executed.
8. The apparatus according to claim 6, wherein the asynchronous message corresponding to the flow node to be rolled back further includes a node identifier of the flow node to be rolled back;
the compensation module includes:
and sending the asynchronous message to an application program processor, and executing the compensation subprogram by the application program processor according to the process node information corresponding to the node identifier in the asynchronous message.
9. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 5.
10. An electronic device, comprising:
a memory having a computer program stored thereon;
a processor for executing the computer program in the memory to carry out the steps of the method of any one of claims 1 to 5.
CN201911261657.2A 2019-12-10 2019-12-10 Flow backspacing compensation method and device, storage medium and electronic equipment Active CN111080250B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911261657.2A CN111080250B (en) 2019-12-10 2019-12-10 Flow backspacing compensation method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911261657.2A CN111080250B (en) 2019-12-10 2019-12-10 Flow backspacing compensation method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN111080250A true CN111080250A (en) 2020-04-28
CN111080250B CN111080250B (en) 2023-04-18

Family

ID=70313995

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911261657.2A Active CN111080250B (en) 2019-12-10 2019-12-10 Flow backspacing compensation method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN111080250B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116126481A (en) * 2023-02-06 2023-05-16 安芯网盾(北京)科技有限公司 Distributed long transaction processing method and device

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101552739A (en) * 2008-04-03 2009-10-07 北京邮电大学 Method and system for managing life cycle of network service process example
CN101615269A (en) * 2009-08-11 2009-12-30 用友软件股份有限公司 Backing method in a kind of Workflow Management System and device
US20110218927A1 (en) * 2010-03-05 2011-09-08 Oracle International Corporation Compensation patterns for adjusting long running order management fulfillment processes in an distributed order orchestration system
CN102902574A (en) * 2012-09-24 2013-01-30 东软集团股份有限公司 Cooperative processing method and device of multiple information flow nodes
US20140297355A1 (en) * 2013-03-27 2014-10-02 Fujitsu Limited Workflow control apparatus and method therefor
CN104881759A (en) * 2015-06-23 2015-09-02 四川久远银海软件股份有限公司 Business fallback integrated system based on workflow and realization method thereof
CN106600149A (en) * 2016-12-16 2017-04-26 东软集团股份有限公司 Process analysis method and apparatus
CN106611297A (en) * 2015-10-21 2017-05-03 中兴通讯股份有限公司 Workflow abnormity handling method and system
CN106651085A (en) * 2016-08-30 2017-05-10 东软集团股份有限公司 Compensation method based on process rollback and compensation device thereof
CN109951261A (en) * 2019-03-20 2019-06-28 江苏满运软件科技有限公司 Middleware message transmits compensation method, device, electronic equipment, storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101552739A (en) * 2008-04-03 2009-10-07 北京邮电大学 Method and system for managing life cycle of network service process example
CN101615269A (en) * 2009-08-11 2009-12-30 用友软件股份有限公司 Backing method in a kind of Workflow Management System and device
US20110218927A1 (en) * 2010-03-05 2011-09-08 Oracle International Corporation Compensation patterns for adjusting long running order management fulfillment processes in an distributed order orchestration system
CN102902574A (en) * 2012-09-24 2013-01-30 东软集团股份有限公司 Cooperative processing method and device of multiple information flow nodes
US20140297355A1 (en) * 2013-03-27 2014-10-02 Fujitsu Limited Workflow control apparatus and method therefor
CN104881759A (en) * 2015-06-23 2015-09-02 四川久远银海软件股份有限公司 Business fallback integrated system based on workflow and realization method thereof
CN106611297A (en) * 2015-10-21 2017-05-03 中兴通讯股份有限公司 Workflow abnormity handling method and system
CN106651085A (en) * 2016-08-30 2017-05-10 东软集团股份有限公司 Compensation method based on process rollback and compensation device thereof
CN106600149A (en) * 2016-12-16 2017-04-26 东软集团股份有限公司 Process analysis method and apparatus
CN109951261A (en) * 2019-03-20 2019-06-28 江苏满运软件科技有限公司 Middleware message transmits compensation method, device, electronic equipment, storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
HACHICHA R: "a formal task model for flexible workflows systems", 《PROCEEDINGS OF THE 2013 5TH IEEE INTERNATIONAL SYMPOSIUM ON MODELING,SIMULATION AND APPLIED OPTIMIZATION》 *
王家俊等: ""近红外分析网络共享平台中复杂工作流实现算法"", 《计算机应用》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116126481A (en) * 2023-02-06 2023-05-16 安芯网盾(北京)科技有限公司 Distributed long transaction processing method and device
CN116126481B (en) * 2023-02-06 2023-08-25 安芯网盾(北京)科技有限公司 Distributed long transaction processing method and device

Also Published As

Publication number Publication date
CN111080250B (en) 2023-04-18

Similar Documents

Publication Publication Date Title
CN108920135B (en) User-defined service generation method and device, computer equipment and storage medium
CN108959292B (en) Data uploading method, system and computer readable storage medium
US10229040B2 (en) Optimizing execution order of system interval dependent test cases
CN111090423B (en) Webhook framework system and method for realizing active calling and event triggering
CN107644075B (en) Method and device for collecting page information
JP2016508638A (en) Method and system using recursive event listeners in nodes of hierarchical data structures
CN110764894A (en) Timed task management method, device, equipment and storage medium
CN110868309A (en) Method and device for processing resources in VNFM (virtual network configuration function) and computer storage medium
CN114090113B (en) Method, device, equipment and storage medium for dynamically loading data source processing plug-in
CN109828830B (en) Method and apparatus for managing containers
CN111144837A (en) Flow arrangement method and device, storage medium and electronic equipment
CN111080250B (en) Flow backspacing compensation method and device, storage medium and electronic equipment
CN108595178B (en) Hook-based data acquisition method, device and equipment
CN110930110B (en) Distributed flow monitoring method and device, storage medium and electronic equipment
CN114070889B (en) Configuration method, traffic forwarding device, storage medium, and program product
CN110580216A (en) application extraction and detection method and device
CN109871226B (en) Configuration method, device and medium of downloader and electronic equipment
CN113821249A (en) Project development configuration method and device, electronic equipment and readable storage medium
CN113238815A (en) Interface access control method, device, equipment and storage medium
CN113297081A (en) Execution method and device of continuous integration assembly line
CN112463616A (en) Chaos testing method and device for Kubernetes container platform
CN112084114A (en) Method and apparatus for testing an interface
CN113032004A (en) Method, apparatus and program product for managing development jobs in a development environment
CN112711602A (en) Running method and device of storage process, database system and storage medium
CN111026466A (en) File processing method and device, computer readable storage medium and electronic equipment

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