Workflow processing method and related device

The finite state machine algorithm is used to process workflow data, which solves the performance problems caused by the activiti component's frequent access to the database, improves the response speed of the workflow tool and optimizes the database query performance, avoids multi-team logic conflicts, and reduces the difficulty of maintenance.

CN118567809APending Publication Date: 2024-08-30BEIJING SHANGYIN MICRO CORE TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410711365.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-03
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

When existing workflow tools based on the Activiti component process workflow data state transitions, frequent database access leads to performance degradation, especially in batch data submission scenarios, the response speed is significantly reduced.

Method used

Adopts a predefined finite state machine algorithm, matches the target action through the state machine instance, current state, event and parameter context corresponding to the workflow, performs state updates, and writes state change data to the database association table, supporting batch calls and internal memory Calculate and simplify the database structure.

Benefits of technology

It improves the response speed of workflow tools, simplifies database query performance, avoids multi-team logic conflicts, and reduces maintenance difficulty.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118567809A
    Figure CN118567809A
Patent Text Reader

Abstract

The invention discloses a data flow processing method and a related device, which can be used in the field of data processing, and the method comprises the steps: firstly, obtaining workflow data, the workflow data comprising a current state, an event and a parameter context of a workflow; then, through a predefined finite-state machine algorithm, based on a state machine instance corresponding to the workflow, a current state, an event and a parameter context, matching a target action; then, executing a target action, and updating the state of the workflow from the current state to a target state; and finally, writing the workflow recording object including the state change data of the workflow into the database association table. Therefore, the workflow tool is established based on the finite-state machine algorithm, the internal memory is used for calculation, and the calculation speed is higher; different workflows correspond to different state machine instances, batch calling of the workflows can be supported, and the response speed of a workflow tool can be increased under the scene of batch submission of the workflows.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a workflow processing method and related devices. Background Art

[0002] With the increase in the amount of workflow data involved in financial services, how to maintain the state transition of workload data has attracted more and more attention.

[0003] At present, workflow tools based on activiti components are usually used to maintain the state transition of workflow data. However, activiti components are too dependent on the database. Every time a workflow operation is performed, activiti components need to frequently access the database, which greatly affects the performance of the system. In addition, activiti components can only execute a single sequential call for batch data. In the scenario of multi-task batch submission, the response speed of workflow tools based on activiti components will be greatly reduced.

[0004] Therefore, how to improve the response speed of workflow tools has become a problem that needs to be solved. Summary of the invention

[0005] Based on the above problems, the present application provides a workflow processing method and related devices, which can improve the response speed of workflow tools.

[0006] The embodiments of the present application disclose the following technical solutions:

[0007] In a first aspect, an embodiment of the present application provides a workflow processing method, the method comprising:

[0008] Acquire workflow data, the workflow data including current state, events, and parameter context of the workflow;

[0009] Matching a target action based on a state machine instance corresponding to the workflow, the current state, the event, and the parameter context by a predefined finite state machine algorithm;

[0010] Execute the target action to update the state of the workflow from the current state to the target state;

[0011] A workflow record object including the state change data of the workflow is written into a database association table.

[0012] Optionally, matching the target action based on the current state, the event and the parameter context by using a predefined finite state machine includes:

[0013] Matching the action to be selected based on the current state, the event and the parameter context by a predefined finite state machine;

[0014] Based on the weights corresponding to the various candidate actions, the candidate action with the highest weight is selected as the target action.

[0015] Optionally, after executing the target action and updating the workflow data from the current state to the target state, the method further includes:

[0016] If the target state is a preset end state, a flow end identifier is output.

[0017] Optionally, after matching the target action through the predefined finite state machine based on the state machine instance corresponding to the workflow, the current state, the event, and the condition corresponding to the parameter context, the method further includes:

[0018] If the target action is a repeated action, the workflow data is restored to the data after the target action is executed for the first time by rolling back the transaction;

[0019] Output action duplication exception information.

[0020] Optionally, the predefined finite state machine algorithm includes multiple state machine instances; one of the state machine instances includes multiple state nodes, a current state node binding event set, and an event binding action set, and different actions in the action set are used to transition the workflow from the current state node to different target state nodes.

[0021] Optionally, a concurrent hash map is used to implement the state transfer of the workflow in the finite state machine algorithm; the key of the concurrent hash map includes the current state and the target state, and the value of the concurrent hash map is a set of events.

[0022] In a second aspect, an embodiment of the present application provides a workflow processing device, the device comprising: an acquisition module, a matching module, an execution module and a writing module;

[0023] The acquisition module is used to acquire workflow data, wherein the workflow data includes the current state, events and parameter context of the workflow;

[0024] The matching module is used to match the target action based on the state machine instance corresponding to the workflow, the current state, the event and the parameter context through a predefined finite state machine algorithm;

[0025] The execution module is used to execute the target action and update the state of the workflow from the current state to the target state;

[0026] The writing module is used to write the workflow record object including the state change data of the workflow into the database association table.

[0027] Optionally, the device further comprises: a repeated error reporting module;

[0028] The duplicate error reporting module is used to restore the workflow data to the data after the first execution of the target action through transaction rollback when the target action is a duplicate action; and output action duplication exception information.

[0029] In a third aspect, an embodiment of the present application provides a workflow processing device, the device comprising: a memory and a processor;

[0030] The memory is used to store program code and transmit the program code to the processor;

[0031] The processor is used to execute the steps of the workflow processing method described in any implementation manner of the first aspect according to the program code.

[0032] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program runs on a workflow processing device, the workflow processing device performs the steps of the workflow processing method as described in any implementation method in the first aspect.

[0033] Compared with the prior art, this application has the following beneficial effects:

[0034] An embodiment of the present application provides a data flow processing method, in which, first, workflow data is obtained, and the workflow data includes the current state, events, and parameter context of the workflow; then, a target action is matched based on the state machine instance corresponding to the workflow, the current state, the events, and the parameter context through a predefined finite state machine algorithm; then, the target action is executed to update the state of the workflow from the current state to the target state; finally, a workflow record object including the state change data of the workflow is written into a database association table. Therefore, when establishing a workflow tool based on the finite state machine algorithm, internal memory can be used for calculations. All calculations are completed in a single process or thread. There is no network communication, and the calculation speed is faster. Different workflows correspond to different state machine instances. On the one hand, it can support batch calling of workflows. In the scenario of batch submission of workflows, the response speed of workflow tools can be improved. On the other hand, workflow record objects can be uniformly written into a database association table, thereby simplifying the database structure. When there is a query demand, the order number can be used to directly query a single table, which can improve the query performance of the database association table. On the other hand, different teams can establish different state machine instances, and the workflow logic can be maintained internally, which can avoid mixing the workflow logic of multiple teams, avoid workflow logic conflicts between different teams, and reduce maintenance difficulty. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0036] Figure 1 A flowchart of a workflow processing method provided in an embodiment of the present application;

[0037] Figure 2 A schematic diagram of the structure of a finite state machine example provided in an embodiment of the present application;

[0038] Figure 3 A flowchart of another workflow processing method provided in an embodiment of the present application;

[0039] Figure 4 A schematic diagram of a workflow processing device provided in an embodiment of the present application;

[0040] Figure 5 A structural diagram of a workflow processing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0041] The workflow processing method and related devices provided in the present application can be used in the field of data processing. The above is only an example and does not limit the application field of the workflow processing method and related devices provided in the present application.

[0042] The terms "first", "second", "third" and "fourth" etc. in the specification, claims and drawings of this application are used to distinguish different objects rather than to limit a specific order.

[0043] In the embodiments of the present application, the words "as an example" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "as an example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the words "as an example" or "for example" is intended to present the relevant concepts in a specific way.

[0044] The terms used in the implementation section of this application are only used to explain the specific embodiments of this application and are not intended to limit this application.

[0045] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0046] See also Figure 1 , which is a flow chart of a workflow processing method provided in an embodiment of the present application, the method comprising:

[0047] S101: Acquire workflow data.

[0048] Workflow is a mode of describing and controlling task execution, usually used to coordinate the sequential execution of multiple steps or activities; workflow data, that is, the data generated during the execution of the workflow, can include but is not limited to the current state, events, and parameter context. Among them, the current state is used to describe the state of the current task or activity; events are the reasons that trigger the execution of the workflow or change the state of the workflow, which can be user interaction, timer triggers, or specific conditions, etc.; parameter context is the input information required for the execution of the workflow, including all variables or parameters that affect the execution of the workflow, such as input data, environment variables, and configuration information.

[0049] S102: Match the target action based on the state machine instance, current state, event and parameter context corresponding to the workflow through a predefined finite state machine algorithm.

[0050] Finite state machine (FSM) is a computational model abstracted for studying computational processes with limited memory and certain language classes. A finite state machine has a finite number of states, and each state can migrate to zero or more states.

[0051] In the embodiment of the present application, a finite state machine algorithm can be predefined, see Figure 2 , which is a schematic diagram of the structure of a finite state machine instance provided in an embodiment of the present application. Among them, a state machine instance includes multiple state nodes, a current state node binding event set, and an event binding action set. Different actions in the action set are used to convert the workflow from the current state node to different target state nodes.

[0052] Specifically, you can create multiple state machine instances (Machine) to represent different workflows. For example, you can create Figure 2 The order state machine is shown as an example of a state machine.

[0053] Each state machine instance contains a limited number of state nodes. The state node that the workflow is currently in is the current state node, and the state node that the workflow will be in next is the target state node. A current state node can correspond to multiple target state nodes, for example Figure 2 In the example, the current status node is "pending supervisor review", and the target status nodes include "pending core supervisor confirmation review", "pending core handler confirmation review", "pending bank submission", and "rejected review". These nodes represent different stages and states in the workflow, and the state of the workflow can change between these state nodes.

[0054] In addition, in order to trigger the transition of workflow states, events (Event) are defined to drive the workflow to transfer from the current state node to the target state node, and a series of actions (Change) are defined for each event. These actions are the operations that the workflow needs to perform during the state transition process. Different actions correspond to different target states. According to the parameter context (Context), the condition (Condition) is used to determine which action to perform, thereby achieving a smooth change of workflow states. For example Figure 2 The conditions include "core confirmation is required and a specified core is required", "core confirmation is required", "core confirmation is not required", and "unconditional", which correspond to different actions and target states respectively.

[0055] Thus, a finite state machine algorithm including multiple state machine instances can be predefined, so that based on the current state, event, and parameter context in the workflow data, it can be determined which condition the workflow data meets, and then the target action can be matched. For example, if the current state is "pending supervisor review", the event is "supervisor review passed", and the parameter context meets the condition "core confirmation required", then the matching target action is action 2.

[0056] Optionally, a stateless finite state machine is used in the embodiment of the present application. The current state is not maintained, but only the relationship between states is maintained. This can prevent the problem of continuous execution of state flow and skipping of actions due to failure of idempotence guarantee.

[0057] S103: Execute the target action to update the state of the workflow from the current state to the target state.

[0058] For example, the target action may include but is not limited to changing data, calling external services, or starting other tasks. By executing the target action, the workflow can be converted from the current state node to the target state node corresponding to the target action, such as Figure 2 As shown, by executing action 2, the workflow can be transferred from the current state node "pending supervisor review" to the target state node "pending core manager confirmation review", that is, the state of the workflow is updated from the current state to the target state.

[0059] S104: Writing a workflow record object including workflow status change data into a database association table.

[0060] Exemplarily, a workflow record object can be created based on the workflow state change data generated during the process of workflow changing from the current state to the target state. For example, the workflow record object can include various events and state changes of the workflow instance during its life cycle. The workflow record object can be inserted into the database association table of the workflow processing record table (T_ORDER_WORKFLOW) by establishing a connection with the database, using the corresponding SQL statement, and sending the SQL statement to the database server, thereby completing the insertion of data, that is, completing the persistence of the workflow record object.

[0061] Therefore, in the embodiment of the present application, a workflow tool is established based on a finite state machine algorithm, and internal memory can be used for calculations. All calculations are completed in a single process or thread. There is no network communication, and the calculation speed is faster. Different workflows correspond to different state machine instances. On the one hand, it can support batch calling of workflows. In the scenario of batch submission of workflows, the response speed of the workflow tool can be improved. On the other hand, workflow record objects can be uniformly written into a database association table, thereby simplifying the database structure. When there is a query demand, the order number can be used to directly query a single table, which can improve the query performance of the database association table. On the other hand, different teams can establish different state machine instances, and the workflow logic can be maintained internally, which can avoid mixing the workflow logic of multiple teams, avoid workflow logic conflicts between different teams, and reduce maintenance difficulty.

[0062] join Figure 3 , which is a flow chart of another workflow processing method provided in an embodiment of the present application, the method comprising:

[0063] S301: Acquire workflow data.

[0064] Specifically, workflow data, that is, data generated during the execution of a workflow, may include but is not limited to current status, events, and parameter contexts.

[0065] S302: Match the actions to be selected based on the state machine instance, current state, event and parameter context corresponding to the workflow through a predefined finite state machine algorithm.

[0066] S303: Based on the weights corresponding to the various candidate actions, the candidate action with the highest weight is selected as the target action.

[0067] Exemplarily, the state machine instance may be predefined based on a finite state machine algorithm.

[0068] Specifically, a state machine instance can be created by an instance builder, including a current state node, multiple target state nodes, multiple persistence methods, and a concurrent hash map (Concurrent HashMap) is used to implement the state transfer of the workflow in the finite state machine algorithm; wherein the key of the concurrent hash map is the state enumeration in the state machine instance, which may include the current state and the target state, and the value of the concurrent hash map is the collection of events in the state machine instance. The use of concurrent hash maps to implement state transfer in the finite state machine algorithm can process multiple state transfer requests concurrently, improve the state conversion speed of the workflow, and once the state machine is instantiated, it is not allowed to modify the internal objects of the state machine, which can improve the thread security and operation stability.

[0069] In addition, the action builder can bind action-related information in the order of current state, event, target state, action, condition, and weight. Specifically, it can be a current state binding event set, an event binding action set, and an action defines a condition and a weight. Optionally, the action builder can be a single source builder (State Change Builder) in which an action is bound by a current state, or it can be a plural source builder (State Change Multi Source Builder) in which the same action is allowed to be bound by different current states. In the embodiment of the present application, the instance object can be initialized according to the instance builder and the action builder, and bound to the Spring container.

[0070] In an embodiment of the present application, based on a finite state machine algorithm, the actions to be selected are matched according to the state machine instance, current state, event, and parameter context corresponding to the workflow. Among them, the actions to be selected can be one or more, and a weight can be pre-configured for each action to be selected. When there are multiple actions to be selected, the action to be selected with the highest weight can be selected as the target action based on the weights corresponding to each action to be selected. For example, when the conditions "core confirmation is required and a specified core is required" and "core confirmation is required" are met at the same time, the actions to be selected include action 1 and action 2. If the weight pre-configured for action 1 is greater than the weight pre-configured for action 2, action 1 is used as the target action.

[0071] S304: Execute the target action to update the workflow data from the current state to the target state.

[0072] For example, if you want to start a new workflow flow, you can use the startAnd Run First Persistence method of the state machine instance object, select an action based on the defined initial state and the event and parameter context passed in, get the target state, and return a business primary key (fkWorkflow) representing the process, execute the instantiation method, initialize the workflow record object, and execute the persistence method to write the record object into the database. If you want to continue to execute an existing workflow, you can use the execute Event Persistence method of the state machine instance object, select an action based on the current state, event and parameter context passed in, get the target state, and return the previous business primary key, execute the instantiation method, initialize the workflow record object, and execute the persistence method to write the record object into the database. If the target state is already the defined end state, you can also return the flow end identifier.

[0073] S305: Determine whether the target action is a repeated action, if so, execute step S306; if not, execute step S308.

[0074] In the embodiment of the present application, the state change of the workflow is driven by events, and the event is bound to the state before modification. When the state changes, it is determined whether the binding relationship between the state before modification and the event is correct, thereby avoiding errors in workflow data caused by repeated calls resulting in the wrong state calling the wrong event.

[0075] S306: Restore the workflow data to the data after the target action is executed for the first time by rolling back the transaction.

[0076] Specifically, the workflow data can be restored to the data after the first execution of the target action by calling the rollback method rollback() of the state machine instance and performing a rollback operation according to the persistent unique identifier. Optionally, if the workflow data is persisted asynchronously, when the main transaction is rolled back, the workflow records written asynchronously cannot be rolled back because the asynchronously persisted workflow data is usually performed in the background thread and is parallel to the execution process of the main transaction. Therefore, after the rollback is completed, a workflow record message that needs to be rolled back and deleted can be inserted. In this way, when other transactions process this message, the corresponding workflow data can be deleted according to the information in the message, thereby ensuring data consistency while avoiding potential problems caused by directly rolling back the asynchronously written workflow data; then, through message consumers such as background threads or timed tasks, the workflow record messages that need to be rolled back and deleted are consumed and the corresponding deletion operations are performed, and the workflow data is deleted according to the persistent unique identifier such as ID, thereby ensuring the uniqueness and consistency of the data.

[0077] S307: Output action duplication exception information.

[0078] Exemplarily, when the target action is a repeated action, action repetition exception information for error reporting may be output, which may include but is not limited to information such as the repeated action and execution time.

[0079] S308: Determine whether the target state is a preset end state, if so, execute step S309; ​​if not, execute step S310.

[0080] S309: Output the flow end mark.

[0081] S310: Writing a workflow record object including workflow status change data into a database association table.

[0082] See also Figure 4, this figure is a schematic diagram of a workflow processing device provided in an embodiment of the present application, and the device includes: an acquisition module 401, a matching module 402, an execution module 403 and a writing module 404.

[0083] The acquisition module 401 is used to acquire workflow data, where the workflow data includes the current state, events, and parameter context of the workflow;

[0084] A matching module 402 is used to match a target action based on a state machine instance, a current state, an event, and a parameter context corresponding to the workflow through a predefined finite state machine algorithm;

[0085] An execution module 403 is used to execute a target action and update the state of the workflow from the current state to the target state;

[0086] The writing module 404 is used to write the workflow record object including the state change data of the workflow into the database association table.

[0087] Therefore, in the embodiment of the present application, a workflow tool is established based on a finite state machine algorithm, and internal memory can be used for calculations. All calculations are completed in a single process or thread. There is no network communication, and the calculation speed is faster. Different workflows correspond to different state machine instances. On the one hand, it can support batch calling of workflows. In the scenario of batch submission of workflows, the response speed of the workflow tool can be improved. On the other hand, workflow record objects can be uniformly written into a database association table, thereby simplifying the database structure. When there is a query demand, the order number can be used to directly query a single table, which can improve the query performance of the database association table. On the other hand, different teams can establish different state machine instances, and the workflow logic can be maintained internally, which can avoid mixing the workflow logic of multiple teams, avoid workflow logic conflicts between different teams, and reduce maintenance difficulty.

[0088] In some other embodiments provided in the present application, the matching module 402 is specifically used to match the candidate actions through a predefined finite state machine based on the current state of workflow data processing, workflow data processing events, and workflow data processing parameter context; based on the weights corresponding to each candidate action, the candidate action with the highest weight is selected as the target action.

[0089] In some other embodiments provided in the present application, the workflow processing device also includes: a repeated error reporting module, which is used to restore the workflow data to the data after the first execution of the target action through transaction rollback when the target action is a repeated action; and output action duplication exception information.

[0090] In some other embodiments provided in the present application, the workflow processing device further includes: an end module, which is used to output a flow end identifier when the workflow data processing target state is a preset end state.

[0091] In some other embodiments provided in the present application, a predefined finite state machine algorithm includes multiple state machine instances; a workflow data processing state machine instance includes multiple state nodes, a current state node binding event set, and an event binding action set. Different actions in the workflow data processing action set are used to convert the workflow from the current state node to different target state nodes.

[0092] In some other embodiments provided in the present application, a concurrent hash map is used to implement the state transfer of the workflow in the finite state machine algorithm; the key of the workflow data processing concurrent hash map includes the current state of the workflow data processing and the target state of the workflow data processing, and the value of the workflow data processing concurrent hash map is a collection of workflow data processing events.

[0093] See also Figure 5 , this figure is a structural diagram of a workflow processing device provided in an embodiment of the present application, and the device includes: a memory 501 and a processor 502.

[0094] Memory 501: used to store program codes and transmit the program codes to the processor.

[0095] Processor 502: used to execute the steps of the above workflow processing method according to the instructions in the program code.

[0096] In addition, the present application also provides a computer-readable storage medium, in which computer instructions are stored. When the computer instructions are executed on a workflow processing device, the workflow processing device executes the steps of the above-mentioned workflow processing method.

[0097] It should be noted that each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments. The device and storage medium embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components indicated as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. A person of ordinary skill in the art can understand and implement it without creative work.

[0098] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A workflow processing method, characterized in that: The method comprises: Acquire workflow data, the workflow data including current state, events, and parameter context of the workflow; Matching a target action based on a state machine instance corresponding to the workflow, the current state, the event, and the parameter context by a predefined finite state machine algorithm; Execute the target action to update the state of the workflow from the current state to the target state; A workflow record object including the state change data of the workflow is written into a database association table.

2. The method according to claim 1, characterized in that The matching of the target action based on the current state, the event and the parameter context by a predefined finite state machine includes: Matching the action to be selected based on the current state, the event and the parameter context by a predefined finite state machine; Based on the weights corresponding to the various candidate actions, the candidate action with the highest weight is selected as the target action.

3. The method according to claim 1, characterized in that After executing the target action and updating the workflow data from the current state to the target state, the method further includes: If the target state is a preset end state, a flow end identifier is output.

4. The method according to claim 1, characterized in that After matching the target action through the predefined finite state machine based on the state machine instance corresponding to the workflow, the current state, the event, and the condition corresponding to the parameter context, the method further includes: If the target action is a repeated action, the workflow data is restored to the data after the target action is executed for the first time by rolling back the transaction; Output action duplication exception information.

5. The method according to claim 1, characterized in that The predefined finite state machine algorithm includes multiple state machine instances; one of the state machine instances includes multiple state nodes, a current state node binding event set, and an event binding action set, and different actions in the action set are used to convert the workflow from the current state node to different target state nodes.

6. The method according to claim 1, characterized in that A concurrent hash map is used to realize the state transfer of the workflow in a finite state machine algorithm; the key of the concurrent hash map includes the current state and the target state, and the value of the concurrent hash map is a set of events.

7. A workflow processing device, characterized in that: The device comprises: an acquisition module, a matching module, an execution module and a writing module; The acquisition module is used to acquire workflow data, wherein the workflow data includes the current state, events and parameter context of the workflow; The matching module is used to match the target action based on the state machine instance corresponding to the workflow, the current state, the event and the parameter context through a predefined finite state machine algorithm; The execution module is used to execute the target action and update the state of the workflow from the current state to the target state; The writing module is used to write the workflow record object including the state change data of the workflow into the database association table.

8. The device according to claim 1, characterized in that The device also includes: a repeated error reporting module; The duplicate error reporting module is used to restore the workflow data to the data after the first execution of the target action through transaction rollback when the target action is a duplicate action; and output action duplication exception information.

9. A workflow processing device, characterized in that: The device comprises: a memory and a processor; The memory is used to store program code and transmit the program code to the processor; The processor is used to execute the steps of the workflow processing method according to any one of claims 1 to 6 according to the program code.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program. When the computer program runs on a workflow processing device, the workflow processing device executes the steps of the workflow processing method according to any one of claims 1 to 6.

Citation Information

Cited By

  • Project full life cycle state-driven circulation method and system

    CN122614790A