A process node processing method and apparatus, a storage medium, and a device

By detecting and executing missing process nodes in the workflow engine, the problem of process instance failure caused by abnormal process nodes is solved, thus improving the execution efficiency of process instances.

CN116414597BActive Publication Date: 2026-06-26TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TENCENT TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2022-01-05
Publication Date
2026-06-26

Smart Images

  • Figure CN116414597B_ABST
    Figure CN116414597B_ABST
Patent Text Reader

Abstract

The embodiment of the application discloses a kind of process node processing method, device, storage medium and equipment, mainly related to cloud technology field, the method comprises: in the process of application process in workflow engine executing the process node to be executed in target process instance, obtain the working state of workflow engine;If the working state of workflow engine is abnormal state, then according to the process node of state database associated with target process instance in the process node to be executed, the target process node in target process instance in loss state is obtained;Attribute information of target process node is read from state database, application process is called, and target process node is executed according to attribute information. By the application, the execution efficiency of target process instance can be improved, and target process instance cannot be executed to complete due to process node loss.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of cloud technology, and more particularly to a process node processing method, storage medium, and device. Background Technology

[0002] To ensure the efficient execution of tasks in a business system, these tasks are typically orchestrated into process instances comprising multiple process nodes. A workflow engine controls the coordinated operation of related components, allowing the process nodes within the instance to flow according to specific process rules, thus automating business processing. However, due to the strong dependencies between process nodes, if an exception occurs during the execution of one process node, subsequent process nodes may fail to execute, leading to the failure of the entire process instance and resulting in low execution efficiency. Summary of the Invention

[0003] The technical problem to be solved by the embodiments of this application is to provide a process node processing method, apparatus, storage medium and device, which can improve the execution efficiency of the target process instance.

[0004] One embodiment of this application provides a process node processing method, including:

[0005] During the execution of the pending process node in the target process instance by the application process in the workflow engine, the working status of the workflow engine is obtained;

[0006] If the workflow engine is in an abnormal state, the process nodes in the state database associated with the target process instance are traversed according to the process node to be executed to obtain the target process node in the target process instance that is in a missing state.

[0007] The system reads the attribute information of the target process node from the state database, calls the application process, and executes the target process node based on the attribute information.

[0008] One embodiment of this application provides a process node processing device, including:

[0009] The acquisition module is used to acquire the working status of the workflow engine during the execution of the pending process node in the target process instance by the application process in the workflow engine.

[0010] The traversal module is used to traverse the process nodes in the status database associated with the target process instance based on the process node to be executed if the working status of the workflow engine is in an abnormal state, so as to obtain the target process node in the target process instance that is in a lost state.

[0011] The execution module is used to read the attribute information of the target process node from the status database, call the application process, and execute the target process node according to the attribute information.

[0012] The traversal module includes:

[0013] The first acquisition unit is used to obtain the execution order of process nodes in the target process instance from the state database; the process nodes in the target process instance include process nodes to be executed.

[0014] The generation unit is used to generate a process node tree corresponding to the target process instance based on the execution order of the process nodes in the target process instance;

[0015] The second acquisition unit is used to acquire the first node type of the process node to be executed;

[0016] The traversal unit is used to traverse the nodes in the process node tree according to the first node type to obtain the target process node that is in a lost state in the target process instance.

[0017] The process node tree includes the root node corresponding to the first process node that reflects the earliest execution order in the target process instance, and the leaf node corresponding to the second process node that reflects the execution order of the second process node that is later than the first process node in the target process instance.

[0018] The traversal unit is specifically used for:

[0019] If the first node type is a signal gateway node type, then the process node tree is traversed starting from the corresponding node of the process node to be executed in the process node tree to obtain the target process node in the target process instance that is in a lost state; the target process node includes at least one of the first process node and the second process node.

[0020] If the first node is a non-signal gateway node type, then the process node tree is traversed starting from the root node to obtain the target process node that is in a lost state in the target process instance.

[0021] Wherein, if the first node type is a signal gateway node type, then the process node tree is traversed from the corresponding node of the process node to be executed in the process node tree as the starting point to obtain the target process node in the target process instance that is in a lost state, including:

[0022] If the first node type is a signal gateway node type, and the node in the process node tree that reflects the process node to be executed is the root node of the process node tree, then obtain the execution status of the process node to be executed. If the execution status of the process node to be executed is not completed, then determine the process node to be executed as the target process node in the target process instance that is in a lost state.

[0023] If the first node type is a signal gateway node type, and the node in the process node tree that reflects the process node to be executed is a leaf node of the process node tree, then the process node tree is traversed from the leaf node corresponding to the process node to be executed to the root node of the process node tree to obtain the third process node whose execution status is in the incomplete execution state. The third process node is determined as the target process node in the target process instance that is in the missing state.

[0024] If the first node type is a non-signal gateway node type, then the process node tree is traversed starting from the root node to obtain the target process nodes in the lost state within the target process instance, including:

[0025] If the first node type is a non-signal gateway node type, then the root node is used as the starting point for traversal, and all nodes in the process node tree are traversed to obtain the fourth process node whose execution status is in the incomplete execution state.

[0026] The fourth process node is identified as the target process node in the target process instance that is in a lost state.

[0027] The execution module includes:

[0028] The third acquisition unit is used to read the attribute information of the target process node from the status database;

[0029] The Add Unit is used to add the attribute information of the target process node to the node database corresponding to the target process instance;

[0030] The removal unit is used to call the application process, read the attribute information of the target process node from the node database, and remove the attribute information of the target process node from the node database.

[0031] The execution unit is used to obtain the execution information of the target process node from the status database based on the attribute information, and execute the target process node according to the execution information.

[0032] The execution information includes the node interface information of the target process node and the process interface information of the target process instance.

[0033] The execution unit is specifically used for:

[0034] The application process is invoked to retrieve the node interface information of the target process node and the process interface information of the target process instance from the state database based on the attribute information.

[0035] Obtain the second node type corresponding to the target process node;

[0036] Based on the second node type, select the target processor from the processors in the workflow engine to execute the target process node;

[0037] Invoke the target processor and execute the target process node based on the node interface information and process interface information.

[0038] Specifically, the execution unit is also used for:

[0039] When the execution state of the target process node is received during the execution of the target process node by calling the target processor, the execution state of the target process node is updated according to the execution state change instruction to obtain the updated execution state.

[0040] The updated execution status is used to update the execution status of the target process node in the status database;

[0041] If the updated execution status is "not completed", then the attribute information of the target process node will be added to the node database.

[0042] The acquisition module includes:

[0043] The fourth acquisition unit is used to acquire system log data of the workflow engine during the execution of the process node to be executed in the target process instance by the application process in the workflow engine;

[0044] The determination unit is used to determine the working status of the workflow engine based on system log data.

[0045] Specifically, the determining unit is used for:

[0046] If the system log data indicates that the system of the first service device belonging to the node database of the workflow engine has restarted, then the working state of the workflow engine is determined to be abnormal.

[0047] If the system log data indicates that the system of the second service device corresponding to the application process has restarted, then the workflow engine is determined to be in an abnormal state.

[0048] If the system log data indicates that an adjustment operation has been received for the process node to be executed, then the workflow engine is determined to be in an abnormal state.

[0049] If the system log data indicates that the network of the first service device is abnormal, then the workflow engine is determined to be in an abnormal state.

[0050] One embodiment of this application provides a computer device, including: a processor and a memory;

[0051] The processor is connected to a memory, which stores a computer program. When the computer program is executed by the processor, it causes the computer device to perform the method provided in the embodiments of this application.

[0052] One aspect of this application provides a computer-readable storage medium storing a computer program adapted to be loaded and executed by a processor, so that a computer device having the processor performs the method provided in this application.

[0053] One embodiment of this application provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the method provided in this application embodiment.

[0054] In this embodiment, during the execution of a process node to be executed in the target process instance by the application process in the workflow engine, the working status of the workflow engine is obtained. This allows for the detection of the workflow engine's working status and whether it is abnormal. If the workflow engine's working status is abnormal, the process nodes in the status database associated with the target process instance are traversed according to the process node to be executed to obtain the target process node in the target process instance that is in a lost state; the attribute information of the target process node is read from the status database, the application process is invoked, and the target process node is executed according to the attribute information. Through this application, when a workflow engine malfunctions, the lost target process node in the target process instance can be retrieved and executed, preventing the target process instance from failing to execute due to the loss of process nodes caused by a workflow engine malfunction, thus improving the execution efficiency of the target process instance. Attached Figure Description

[0055] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0056] Figure 1 This is a schematic diagram of the architecture of a process node processing system provided in an embodiment of this application;

[0057] Figure 2 This is a schematic diagram of an application scenario for process node processing provided in an embodiment of this application;

[0058] Figure 3 This is a flowchart illustrating a process node processing method provided in an embodiment of this application;

[0059] Figure 4 This is a schematic diagram of a workflow engine provided in an embodiment of this application;

[0060] Figure 5 This is a schematic diagram illustrating the operation of a workflow engine provided in an embodiment of this application;

[0061] Figure 6 This is a schematic diagram of a process node tree provided in an embodiment of this application;

[0062] Figure 7 This is a schematic diagram of a sub-process node provided in an embodiment of this application;

[0063] Figure 8 This is a schematic diagram of a signal gateway node provided in an embodiment of this application;

[0064] Figure 9 This is a schematic diagram illustrating the execution of a signal gateway node according to an embodiment of this application;

[0065] Figure 10 This is a schematic diagram of a finite state machine for a process example provided in the embodiments of this application;

[0066] Figure 11 This is a schematic diagram of a finite state machine for a process node provided in an embodiment of this application;

[0067] Figure 12 This is a schematic diagram illustrating an example of a workflow engine executing a target process, as provided in an embodiment of this application.

[0068] Figure 13 This is a schematic diagram of a process node processing method provided in an embodiment of this application;

[0069] Figure 14 This is a schematic diagram illustrating how to obtain a target process node according to an embodiment of this application;

[0070] Figure 15 This is a schematic diagram illustrating how to obtain a target process node according to an embodiment of this application;

[0071] Figure 16 This is a schematic diagram illustrating the execution of a target process node according to an embodiment of this application;

[0072] Figure 17 This is a schematic diagram illustrating the execution of a target process node according to an embodiment of this application;

[0073] Figure 18This is a schematic diagram of the structure of a process node processing device provided in an embodiment of this application;

[0074] Figure 19 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0075] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0076] This application relates to the field of cloud technology. Specifically, it relates to cloud computing, which refers to the delivery and usage model of IT infrastructure, meaning obtaining necessary resources on demand and in a scalable manner through a network. In a broader sense, cloud computing refers to the delivery and usage model of services, meaning obtaining necessary services on demand and in a scalable manner through a network. These services can be IT and software related, internet-related, or other services. Cloud computing is a product of the development and integration of traditional computer and network technologies such as grid computing, distributed computing, parallel computing, utility computing, network storage technologies, virtualization, and load balancing. In the embodiments of this application, the workflow engine can refer to the workflow engine of a cloud delivery platform deployed in the cloud. This cloud delivery platform's workflow engine can be used to execute various business process instances, such as data verification, business processing approval, etc., enabling automated business processing. A cloud delivery platform refers to the ability to provide a large platform for sharing infrastructure, thereby achieving infrastructure consolidation, and providing a data storage and governance platform to enable cross-departmental and cross-regional collaborative governance and integrated services, thereby achieving scientific decision-making, breaking down information silos, and promoting the integration of information systems.

[0077] Please see Figure 1 , Figure 1 This is a schematic diagram of the structure of a process node processing system provided in an embodiment of this application. For example... Figure 1 As shown, the process node processing system may include server 10 and a user terminal cluster. The user terminal cluster may include one or more user terminals; the number of user terminals is not limited here. Figure 1 As shown, it can specifically include user terminal 100a, user terminal 100b, user terminal 100c, ..., user terminal 100n. Figure 1 As shown, user terminals 100a, 100b, 100c, ..., 100n can each connect to the server 10 via a network, so that each user terminal can interact with the server 10 through the network connection.

[0078] Each user terminal in this user terminal cluster can include: smartphones, tablets, laptops, desktop computers, wearable devices, smart home devices, head-mounted devices, in-vehicle terminals, and other intelligent terminals with process node processing capabilities. It should be understood that, for example... Figure 1 Each user terminal in the user terminal cluster shown can have the target application (i.e., the application client) installed. When the application client runs on each user terminal, it can interact with the aforementioned... Figure 1 Data interaction occurs between the servers 10 shown.

[0079] Among them, such as Figure 1 As shown, the server 10 can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.

[0080] For ease of understanding, the embodiments of this application may be described in detail below. Figure 1 From the multiple user terminals shown, one user terminal is selected as the target user terminal. This target user terminal may include: smartphones, tablets, laptops, desktop computers, smart TVs, and other smart terminals with process node processing capabilities. For example, for ease of understanding, embodiments of this application may... Figure 1The user terminal 100a shown serves as the target user terminal. During the execution of the pending process nodes in the target process instance within the application process of the workflow engine, user terminal 100a can acquire the working status of the workflow engine in real-time or periodically. The workflow engine refers to the functional component used to implement the target process instance. The workflow engine can perform important functions such as node management, flow management, and process example management for the target process instance. For example, the workflow engine could refer to the workflow engine of a cloud delivery platform, which monitors and manages the execution of the target process instance. User terminal 100a can detect whether the workflow engine's working status is normal. If user terminal 100a detects an abnormal working status, it can send a message indicating an abnormal working status to server 10. After receiving the message indicating an abnormal working status, server 10 can traverse the process nodes in the status database associated with the target process instance based on the pending process nodes to obtain the target process nodes that are in a missing state within the target process instance. The state database includes the execution status and execution information corresponding to each process node in one or more process instances. The execution information may include the attribute information of the process node (such as node identifier), whether the process node can be skipped, and the process instance to which the process node belongs. Server 10 can traverse the process nodes belonging to the target process instance in the state database to obtain the target process node that is in a lost state in the target process instance.

[0081] Furthermore, after obtaining the target process node in the target process instance that is in a lost state, server 10 can retrieve the attribute information of the target process node from the state database. This attribute information may refer to the node identifier of the process node. The server then sends this attribute information to user terminal 100a. The user terminal can invoke the application in the workflow engine to execute (i.e., logically execute) the target process node according to its attribute information, so that the target process node reaches the execution completion state. Thus, through this application, when an abnormality is detected in the workflow engine's working state, the server can identify the target process node in the target process instance that is in a lost state and execute it. This avoids the situation where a process node in the target process instance is lost, causing the target process instance to fail to execute successfully, thereby improving the execution efficiency of the target process instance.

[0082] For better understanding, please refer to [link / reference]. Figure 2 , Figure 2 This is a schematic diagram illustrating an application scenario for process node processing provided in an embodiment of this application. Wherein, as... Figure 2 The server 20d shown can be the server 10 mentioned above, such as... Figure 2The target user terminal 20a shown can be the one described above. Figure 1 Any user terminal in the user terminal cluster shown, for example, target user terminal 20a can be the aforementioned user terminal 100b. Figure 2 As shown, the target user terminal 20a displays the execution status interface 20c of the process nodes in the current process instance A. For example... Figure 2 As shown in the execution status interface 20c, process nodes 1 and 2 in process instance A are in the completed state, while process node 3 is in the executing state (i.e., not yet completed). Figure 2 As shown, the target user terminal 20a can invoke an application process (such as any one of application process 1, application process 2, or application process n) in the workflow engine 20b to obtain the attribute information of the incomplete process node 3 in process instance A from the node database, and obtain the execution information of process node 3 from the status database. Based on this execution information, the target user terminal 20a executes the incomplete process node 3 in process instance A. While invoking the application process in workflow engine 20b to execute process node 3 (i.e., the process node to be executed) in process instance A, the target user terminal 20a can obtain the working status of workflow engine 20b in real time. If the target user terminal 20a detects a restart event in workflow engine 20b, it can determine that the working status of workflow engine 20b is abnormal and send a message indicating that the working status of workflow engine 20b is abnormal to server 20d.

[0083] Furthermore, after receiving a message from the target user terminal 20a indicating that the workflow engine 20b is in an abnormal state, the server 20d can traverse the process nodes in the state database 20e based on process node 3. The state database 20e stores relevant information (such as attribute information, execution information, etc.) of the process nodes in process instance A. The server 10 can determine the process node (i.e., process node 3) in instance process A that has not been completed from the state database 20e, and designate this process node 3 as the target process node 20f in a lost state within process instance A. The server 20d can retrieve the attribute information 20g of the target process node from the state database 20e and return this attribute information 20g to the target user terminal 20a. This attribute information may refer to the node identifier. Furthermore, after receiving the attribute information 20g of the target process node, the target user terminal 20a can add the attribute information 20g to the node database and call the application process in the workflow engine to retrieve the attribute information 20g from the node database. Based on the attribute information 20g, it retrieves the execution information of the target process node from the status database and executes the target process node 3 according to the execution information. After the target process node is executed in the workflow engine 20b, the target user terminal 20a can output the execution status interface 20h, displaying the information that the process instance has been completed. Therefore, this application can avoid the situation where nodes are lost during process instance execution, leading to the process instance failing to execute successfully, and can improve the efficiency of process instance execution.

[0084] Please see Figure 3 , Figure 3 This is a flowchart illustrating a process node processing method provided in an embodiment of this application. This process node processing method can be executed by a computer device, which can be a server (as described above). Figure 1 Server 10 in the middle), or user terminal (as described above) Figure 1 This application does not limit the scope to any user terminal in the user terminal cluster. Figure 3 As shown, the process node processing method may include, but is not limited to, the following steps:

[0085] S101: During the execution of the pending process node in the target process instance by the application process in the workflow engine, obtain the working status of the workflow engine.

[0086] Specifically, computer equipment can orchestrate business processing tasks into target process instances comprising multiple process nodes. A workflow engine then executes each process node within the target process instance, thereby automating the execution of business processing tasks, reducing the need for manual execution, and achieving intelligent task execution. The workflow engine executes the process nodes within the target process instance to ensure that each node is completed. The workflow engine also provides important management functions for the target process instance, such as node management, flow management, and process example management. Specifically, the computer equipment can retrieve attribute information of incomplete process nodes within the target process instance from the node database through the application process within the workflow engine. This attribute information can refer to the node identifier of the process node. The node database stores attribute information of incomplete process nodes within one or more process instances, and the target process instance belongs to any one of these process instances.

[0087] Furthermore, after the computer device reads the attribute information of the pending process nodes (i.e., incomplete process nodes) in the target process instance through the application process in the workflow engine, it can obtain the execution information of the pending process nodes from the status database based on this attribute information. This execution information may include the execution status of the target process instance to which the pending process node belongs, the first node type of the pending process node, the execution logic, and the execution status, etc. The status database includes the attribute information, execution status, and execution information of the process nodes included in one or more process instances. Further, after obtaining the attribute information of the pending process nodes, the computer device can execute the pending process node through the application process in the workflow engine according to the attribute information, so that the pending process node reaches the completed execution state. During the execution of the pending process nodes in the target process instance by the application process in the workflow engine, the computer device can obtain the working status of the workflow engine in real time or periodically.

[0088] The workflow engine can include multiple application processes. Computer devices can invoke these application processes in the workflow engine using one or a combination of the following two methods: Method 1: Determine the application process based on the business type corresponding to the process node to be executed. Different application processes can have different business processing capabilities. For example, application processes include Application Process 1 and Application Process 2. Application Process 1 has the business processing capability for financial business types, while Application Process 2 has the business processing capability for social business types. Therefore, the application process used to execute the process node can be determined based on its business type, thus improving the accuracy of business processing. The business processing capability of the application process is determined based on its success rate and processing efficiency in historical time periods. Method 2: The computer device can obtain the number of process nodes to be executed for each application process and determine the application process used to execute the process nodes of the target process instance based on the number of process nodes to be executed. This achieves load balancing among the application processes and improves business processing efficiency.

[0089] like Figure 4 As shown, Figure 4 This is a schematic diagram of a workflow engine provided in an embodiment of this application, as shown below. Figure 4 As shown, the workflow engine is a part of the cloud delivery platform. Figure 4As shown, the cloud delivery platform includes a foundation layer, which comprises a state database, a node database, and a message queue. The state database stores information about each process instance (such as execution status, execution logic, instance identifier, etc.) and information about each process node within each process instance (such as execution status, execution logic, node identifier, etc.). The message queue stores pending process nodes in the node database that require status updates, i.e., pending process nodes in the node database that have not yet been completed, and maintains a first-in, first-out (FIFO) order. The cloud delivery platform also includes an atomic task layer, which comprises a virtual machine task module and a disk task module. These modules determine the process instances of the business processing tasks that need to be executed. The atomic task layer also includes a node setting module and a deployment execution module. The node setting module sets the process nodes within the process instance, and the deployment execution module deploys the execution order of the process nodes within the process instance. Finally, the cloud delivery platform includes a controller layer, which comprises an atomic task controller, a deployment progress tree updater, an orchestration generator, and a workflow engine. The cloud delivery platform comprises several components: an atomic task controller to control the generated process instances, a deployment progress tree updater to update the process node tree based on the execution status of the process instances, and an orchestration generator to generate process instances based on business processing tasks and execute them through the workflow engine. The platform also includes an API (Application Programming Interface) layer, which stores business processing interface information. Furthermore, the cloud delivery platform can connect to third-party systems to manage business processing within those systems.

[0090] For example, a processing task Q is set up in the cloud delivery platform. Computer devices can determine the execution logic and order of the process nodes in processing task Q through several setting and deployment execution modules within the cloud delivery platform. Furthermore, the computer devices can orchestrate the processing task Q using the orchestration generator in the cloud delivery platform to generate a process instance q. This process instance q includes four process nodes: material preparation, configuration preparation, application deployment, and service registration. Further, the computer devices can manage the execution of these four process nodes in process instance q through the workflow engine in the cloud delivery platform, ensuring that all four process nodes in process instance q reach a completed state, thus completing the execution management of process instance q.

[0091] like Figure 5 As shown, Figure 5 This is a schematic diagram illustrating the operation of a workflow engine provided in an embodiment of this application, such as... Figure 5As shown, computer devices can read the pending process nodes from the node database through coroutines 1, 2, ..., n (i.e., application processes) in the workflow engine. This node database includes pending process nodes (i.e., process nodes that have not yet been completed) from multiple process instances. The node database stores the attribute information of the process nodes that have not yet been completed within the process instances. For example... Figure 5 As shown, coroutine 1 in the workflow engine can read the attribute information (such as node identifier) ​​of the process node 1 to be executed from the node database. Similarly, coroutine 2 in the workflow engine can obtain the attribute information of the process node 2 to be executed from the node database. That is, coroutines in the workflow engine can read the attribute information of one process node to be executed at a time. After a coroutine in the workflow engine reads a process node to be executed from the node database, it removes the read attribute information of that process node from the node database. Figure 5 As shown, the process of the workflow engine executing the process node to be executed is described in detail, taking the execution of process node 1 by coroutine 1 as an example. After coroutine 1 in the workflow engine reads the process node to be executed from the node database, the attribute information of the process node to be executed can be removed from the node database.

[0092] Furthermore, after coroutine 1 reads the attribute information of the process node 1 to be processed, it can obtain the execution information of the process node 1 to be executed from the state database. This execution information can include the execution status, execution logic, and execution status of the target process instance to which the process node belongs. The computer device can execute the process node 1 to be executed based on the execution information of the process node to be executed through coroutine 1 in the workflow engine. After coroutine 1 performs a state transition (i.e., state update) on the process node 1 to be executed based on the execution information, it can update the initial execution status of the process node to be executed in the state database according to the updated execution status of the process node 1 to be executed. Furthermore, the computer device can detect whether the process node to be executed after the state update is in an incomplete execution state. If the process node to be executed after the state update is still in an incomplete execution state, the attribute information of the process node to be executed after the state update is added to the node database, so that subsequent coroutines in the workflow engine can continue to read the process node to be executed after the state update from the node database, thereby enabling the process node to be executed after the state update to be executed to complete.

[0093] Optionally, the specific method for obtaining the working status of the workflow engine during the execution of the pending process node in the target process instance by the application process in the workflow engine may include: obtaining system log data of the workflow engine during the execution of the pending process node in the target process instance by the application process in the workflow engine; and determining the working status of the workflow engine based on the system log data.

[0094] Specifically, during the execution of the pending process nodes in the target process instance within the workflow engine, the computer device can acquire system log data from the workflow engine. This system log data includes detailed records of events triggered within the workflow engine. The computer device can use this system log data to detect whether the workflow engine's operating status is abnormal. If the system log data detects a target event occurring in the workflow engine, then the abnormal operating status of the workflow engine can be determined. By analyzing the system logs, the status of the workflow engine can be determined, enabling automated detection of the workflow engine's operating status and improving detection efficiency.

[0095] Optionally, the specific methods by which the computer device determines the working status of the workflow engine based on system log data may include: if the system log data indicates that the system of the first service device belonging to the node database of the workflow engine has undergone a restart operation, then the working status of the workflow engine is determined to be abnormal. If the system log data indicates that the system of the second service device corresponding to the application process has undergone a restart operation, then the working status of the workflow engine is determined to be abnormal. If the system log data indicates that an adjustment execution operation has been received for the node of the process to be executed, then the working status of the workflow engine is determined to be abnormal. If the system log data indicates that the network of the first service device is abnormal, then the working status of the workflow engine is determined to be abnormal.

[0096] Specifically, if the computer detects that the system log data of the workflow engine indicates a system restart operation in the first service device belonging to the workflow engine's node database, then the workflow engine's operating state can be determined to be abnormal. Since the node database stores the attribute information of the unexecuted process nodes in the target process instance, a restart due to a node database failure may result in the loss of this attribute information. Consequently, the workflow engine cannot execute the lost process nodes, thus failing to ensure the successful execution of the target process instance. Therefore, when the computer detects a restart operation in the node database, the workflow engine's operating state can be determined to be abnormal, allowing for the subsequent addition of the lost process nodes to the node database to ensure the successful execution of the target process instance.

[0097] Specifically, when a computer detects that the system log data of the workflow engine indicates a restart operation on the second service device corresponding to the application process, it can be determined that the workflow engine's operating state is abnormal. Specifically, if the workflow engine restarts while the application process in the workflow engine is executing a process node according to the execution information, the application process will restart, causing the currently executing process node to be lost. Since the node database does not contain the lost process node, it cannot be completed. Therefore, when a computer detects a system restart operation on the second service device corresponding to the application process, it can be determined that the workflow engine's operating state is abnormal.

[0098] Specifically, if the computer equipment detects system log data from the workflow engine indicating a network anomaly in the first service device, then the workflow engine's operating state can be determined to be abnormal. Since the application process in the workflow engine needs to retrieve attribute information of the process nodes to be executed from the node database, when the application process sends a request to the first service device in the node database to read the process node to be executed, the first service device can send the attribute information of the process node to the application process and remove the attribute information of the process node to be executed from the node database. However, if a network anomaly occurs during the process of the first service device in the node database sending the process node to be executed to the application process, the process node being sent will be lost. That is, the application process will not receive the process node to be executed sent by the first service device in the node database, causing the target process instance to fail to complete execution.

[0099] Specifically, if the system log data from the computer device to the workflow engine indicates that an adjustment operation has been received for a node in the pending process, then the workflow engine's operating state can be determined to be abnormal. When an administrator detects an anomaly in a node in the pending process, they can trigger adjustment operations for that node, such as stopping the node, retrying the node, or skipping the node. When the computer device detects these adjustment operations by the administrator for a node in the pending process, the workflow engine's operating state can be determined to be abnormal.

[0100] Optionally, the specific method by which the computer device determines the working status of the workflow engine based on system log data may include: the computer device can determine the execution time of the application process in the workflow engine during the execution of the pending process node in the target process instance based on the system log data of the workflow engine. Further, the computer device can determine whether the execution time is greater than or equal to a target time threshold. If the computer device detects that the execution time of the pending process node is greater than or equal to the target time threshold, it can determine that the working status of the workflow engine is abnormal; if the computer device detects that the execution time of the pending process node is less than the target time threshold, it can determine that the working status of the workflow engine is normal. The target time threshold can be determined based on the business type of the target process instance or based on the specific node execution status; this embodiment does not impose any limitations.

[0101] Optionally, the state database can refer to a MySQL database (a relational database management system) used to store execution information (such as process interface information) of the target process instance and attribute and execution information (such as information about the process instance to which it belongs, execution logic, and state process rules) of each process node in the target process instance. The node database can refer to a Redis (Remote Dictionary Server) database, which is a high-performance key-value database that also supports master-slave synchronization. Data can be synchronized from the master server to any number of slave servers, and a slave server can be a master server associated with other slave servers, improving the scalability of read operations and reducing data redundancy.

[0102] S102, if the workflow engine is in an abnormal state, then the process nodes in the state database associated with the target process instance are traversed according to the process node to be executed to obtain the target process node in the target process instance that is in a lost state.

[0103] Specifically, if the computer device determines that the workflow engine's operating state is abnormal, it can determine that there may be missing process nodes to be executed. The computer device can then traverse the process nodes in the state database associated with the target process instance, based on the process nodes to be executed, to find the target process node in the target process instance that is in a missing state. Specifically, the computer device can traverse the process nodes in the state database based on the node type and execution order of the process nodes to be executed, etc., to obtain the execution status of the process nodes belonging to the target process instance. Further, process nodes in the target process instance whose execution status is "not completed" are identified as the target process nodes in the target process instance that are in a missing state.

[0104] Optionally, the computer device can determine candidate process nodes in the target process instance that are in an incomplete execution state based on the execution status of process nodes belonging to the target process instance in the state database, and obtain the node identifier of the candidate process node. The computer device can also obtain stored process nodes belonging to the target process instance from the node database and obtain the node identifier of the stored process node. Further, the computer device can determine the differing process nodes based on the node identifiers of the stored process nodes and the candidate process nodes, and identify the differing process nodes as target process nodes in a missing state within the target process instance. It can be understood that after determining candidate process nodes in the target process instance that are in an incomplete execution state from the state database based on the process nodes to be executed, the computer device can determine whether the candidate process nodes in the incomplete execution state in the state database are missing based on the stored process nodes belonging to the target process instance still stored in the node database. If a candidate process node exists in the state database but does not exist in the node database, it can be determined that the candidate process node is missing, and this candidate process node can be identified as a target process node in a missing state within the target process instance.

[0105] Optionally, the computer device may traverse the process nodes in the state database associated with the target process instance based on the process nodes to be executed to obtain the target process nodes in the target process instance that are in a missing state. Specifically, this may involve: obtaining the execution order of the process nodes in the target process instance from the state database; the process nodes in the target process instance include the process nodes to be executed; generating a process node tree corresponding to the target process instance based on the execution order of the process nodes in the target process instance; obtaining the first node type of the process nodes to be executed; and traversing the nodes in the process node tree based on the first node type to obtain the target process nodes in the target process instance that are in a missing state.

[0106] Specifically, the state database stores relevant information (such as execution information, attribute information, etc.) of multiple process nodes in the target process instance. These process nodes have an execution order, such as the start node executing first and the end node executing last. The computer device can obtain the execution order of the process nodes in the target process instance from the state database. The process nodes in the target process instance include those to be executed. The computer device can generate a process node tree corresponding to the target process instance based on the execution order of the process nodes. Specifically, when generating the process node tree, the computer device can use the execution order of each process node in the target process instance. Specifically, the computer device can use the first executed process node in the target process instance as the root node of the process node tree, the process nodes whose execution order is later than the root node as leaf nodes, and the last executed process node as the end node of the process node tree. The process node tree of the target process instance can be pre-generated and directly called later. Furthermore, the computer device can obtain the first node type of the process node to be executed, and based on the first node type of the process node to be executed, traverse the nodes in the process node tree to obtain the target process instance that is in a lost state in the target process instance.

[0107] like Figure 6 As shown, Figure 6 This is a schematic diagram of a process node tree provided in an embodiment of this application, such as... Figure 6As shown, a computer device can generate a process node tree for a target process instance based on the execution order of the process nodes in the target process instance. Let process instance A include process nodes A1, A2, A3, A4, A5, and A6, which have an execution order. Process node A1 is the first process node to execute. Process nodes A2 and A3 have the same execution order but are executed later than process node A1. Process node A6 is executed later than process node A2. Process nodes A4 and A5 have the same execution order but are executed later than process node A2. The computer device can use process node 1, which has the first execution order in process instance A, as node 1 in the process node tree. Process nodes A2 and A3, which have the same execution order but are executed later than process node A1, can be used as leaf nodes 2 and 3 in the process node tree. Specifically, the computer device can use process nodes A4 and A5, which have the same execution order, as leaf nodes 4 and 5 in the process node tree, and process node A6 in the target process instance as leaf node 6 in the process node tree, to generate the process node tree of the target process instance. The process node tree of the target process instance can be pre-generated and can be directly called later.

[0108] Specifically, the first node type of the process node to be executed can include event node type, activity node type, signal gateway node type, etc. Among them, the event node type refers to the process node of which the target event will be triggered when the process reaches the event node type. Event node type process nodes can include start event nodes and end event nodes. Both start and end event nodes exist as actual nodes in the orchestration file (i.e., the target process instance), but are not displayed on the front-end page. The start event node indicates the beginning of a process instance or orchestration file, and the end event node indicates the end of a process instance or orchestration file.

[0109] Specifically, activity node types include two subclasses: tasks and sub-processes. Activity node types also exist as actual nodes in the orchestration file (i.e., the target process instance). Among them, tasks are the most basic unit of activities, the actual executors of actions. When the first node type of a process node to be executed is a task node, different types of tasks can be supported through task plugins. For example, by binding an HTTP (HyperText Transfer Protocol) plugin, when this process node is executed, an HTTP request will be sent to the specified network interface (i.e., URL) to complete the preset target task. Sub-process nodes are nested processes; a sub-process node can include multiple task nodes and multiple deployment sub-processes. Figure 7 As shown, Figure 7 This is a schematic diagram of a sub-process node provided in an embodiment of this application, such as... Figure 7 As shown, sub-process a belonging to the target process instance may include sub-process a1, sub-process a2, sub-process a3, and sub-process a4. Sub-process a1 may include process nodes of task types, namely material preparation task nodes, configuration preparation task nodes, application deployment task nodes, and service registration task nodes.

[0110] The signal gateway node type is used to control the flow of business (i.e., the target process instance). For example, a signal gateway node can be introduced to control the flow of the target process instance. The signal gateway node exists as a real node in the orchestration file (i.e., the target process instance) and is displayed as a manual task on the front-end page. A signal gateway node means that when the target process instance reaches this node, it will enter a blocked state until a success / failure signal arrives, at which point it will resume execution. For example... Figure 8 As shown, Figure 8 This is a schematic diagram of a signal gateway node provided in an embodiment of this application, as shown below. Figure 8 As shown, the signal gateway node will be displayed on the front-end page as a manual task. Figure 8 As shown, when the signal gateway node is displayed on the front-end page, it can show the execution progress of the currently deployed orchestration (i.e., the target process instance), such as 16 / 16 completed (there are 16 process nodes in total, and all 16 have been executed, meaning all have been completed). Figure 8 As shown, when the signal gateway node is displayed on the front-end page, it can also display the current execution status of the signal gateway, such as waiting for manual operation, so that a signal can be triggered manually to indicate success or failure. Of course, administrators can click the "Cancel Deployment" button in the signal gateway node to trigger a failure signal.

[0111] like Figure 9As shown, Figure 9 This is a schematic diagram illustrating the execution of a signal gateway node according to an embodiment of this application, such as... Figure 9 As shown, when the computer device completes the execution of sub-processes a1 (including material preparation task nodes, configuration preparation task nodes, application deployment task nodes, and service registration task nodes), a2, a3, and a4 within sub-process a of the target process instance, it will enter a blocked state upon reaching signal network node 90a. Execution will only resume once a success / failure signal arrives. Figure 9 As shown, administrators can click the "Operation Success" button corresponding to signal gateway node 90a to generate a success signal, completing the execution of sub-process a. Figure 9 As shown, when administrators do not know how to operate the signal gateway node 90a, they can click the corresponding view guide button to view the operations to be performed on the signal gateway node 90a.

[0112] Optionally, the process node tree includes a root node corresponding to the first process node that reflects the earliest execution order in the target process instance, and leaf nodes corresponding to the second process node that reflects the later execution order in the target process instance. The specific method by which the computer device traverses the nodes in the process node tree according to the first node type to obtain the target process node in the target process instance that is in a lost state may include: if the first node type is a signal gateway node type, then the process node tree is traversed starting from the node corresponding to the process node to be executed, to obtain the target process node in the target process instance that is in a lost state; the target process node includes at least one of the first process node and the second process node. If the first node type is not a signal gateway node type, then the process node tree is traversed starting from the root node to obtain the target process node in the target process instance that is in a lost state.

[0113] Specifically, the computer device can obtain the first node type of the process node to be executed, and determine the target traversal method for traversing the process nodes in the state database associated with the target process instance based on the first node type. This reduces the number of nodes that need to be traversed in the process node tree, thereby reducing traversal time and improving traversal efficiency. If the computer device determines that the first node type is a signal gateway node, it can use the node corresponding to the process node to be executed in the process node tree as the traversal starting point to traverse the process node tree and obtain the target process node in the target process instance that is in a missing state. Since process nodes whose execution order is later than the signal gateway node are in an inactive state (i.e., they cannot be executed yet and will only begin execution after the execution instruction), they do not need to be executed and therefore do not need to be traversed. Therefore, when the process node to be executed is a signal gateway node, the node corresponding to the process node to be executed in the process node tree can be used as the traversal starting point to traverse the process node tree and obtain the target process node in the target process instance that is in a missing state. The target process node can include at least one of the first process node and the second process node.

[0114] Specifically, if the process node to be executed is not a signal gateway node type, the root node in the process node tree can be used as the starting point for traversal to obtain the target process node in the target process instance that is in a missing state. If the process node to be executed is not a signal gateway type, such as an event node or activity node, it can exist at any node position in the target process instance. Therefore, to ensure that every process node in the target process instance can be traversed, the root node in the process node tree can be used as the starting point for traversal to obtain the execution status of each process node in the target process instance. Process nodes whose execution status is "not completed" are identified as the target process nodes in the target process instance that are in a missing state.

[0115] Optionally, the specific method by which the computer device traverses the process node tree to obtain the target process node in the missing state in the target process instance may include: if the first node type is a signal gateway node type, and the node in the process node tree that reflects the process node to be executed is the root node of the process node tree, then the execution status of the process node to be executed is obtained; if the execution status of the process node to be executed is incomplete, then the process node to be executed is determined as the target process node in the missing state in the target process instance. If the first node type is a signal gateway node type, and the node in the process node tree that reflects the process node to be executed is a leaf node of the process node tree, then starting from the leaf node corresponding to the process node to be executed, the process node tree is traversed towards the root node of the process node tree to obtain the third process node whose execution status is incomplete, and the third process node is determined as the target process node in the missing state in the target process instance.

[0116] Specifically, if the computer device determines that the first node type is a signal gateway node type, and the node in the process node tree that reflects the process node to be executed is the root node in the process node tree (i.e., the node corresponding to the process node to be executed in the process node tree is the root node), then the execution status of the process node to be executed can be obtained. If the computer device determines that the execution status of the process node to be executed is not completed, then the process node to be executed can be identified as a target process node in the target process instance that is in a lost state; if the computer device determines that the execution status of the process node to be executed is completed, then the process node to be executed will not be identified as a target process node in the target process instance that is in a lost state. Optionally, when the computer device determines that the execution status of the process node to be executed is not completed, it can identify the process node to be executed as a candidate process node. The computer device can obtain the node identifier of the candidate process node and, based on the node identifier, determine whether a candidate process node (i.e., the process node to be executed) exists in the node database. If the computer determines that no candidate process node exists in the node database, then the candidate process node is identified as the target process node in the target process instance that is in a missing state. If a candidate process node exists in the node database, then the candidate process node is not identified as the target process node in the target process instance that is in a missing state. This improves the efficiency of traversing process nodes in the state database, as well as the accuracy and comprehensiveness of traversing process nodes in the state database.

[0117] Specifically, if the computer device determines that the first node type is a signal gateway node type, and the node in the process node tree that reflects the process node to be executed is a leaf node (i.e., not the root node), then the computer device can traverse the nodes in the process node tree from the leaf node corresponding to the process node to the root node, obtaining the execution status of the process nodes between the leaf node and the root node. Based on the execution status of the process nodes between the leaf node and the root node, the computer device determines the third process node in the target process instance that is in an incomplete execution state. Further, the computer device can determine this third process node as the target process node in the target process instance that is in a missing state. Optionally, the computer device can obtain the node identifier of the third process node and determine whether the third process node exists in the node database based on the node identifier. If the computer device determines that the third process node does not exist in the node database, then the third process node is determined as the target process node in the target process instance that is in a missing state; if the computer device determines that the third process node exists in the node database, then the computer device does not determine the third process node as the target process node in the target process instance that is in a missing state. This improves the efficiency of traversing process nodes in the state database, as well as the accuracy and comprehensiveness of traversing process nodes in the state database.

[0118] Optionally, the specific method by which the computer device traverses the process node tree to obtain the target process node in the missing state within the target process instance may include: if the first node type is a non-signal gateway node type, then starting from the root node, traversing all nodes in the process node tree to obtain the fourth process node whose execution state is in the incomplete execution state. This fourth process node is then identified as the target process node in the missing state within the target process instance.

[0119] Specifically, if the computer device determines that the first node type of the process node to be executed is a non-signal gateway node type, to ensure that each process node in the target process instance can be traversed, the root node in the process node tree can be used as the starting point to traverse all nodes in the process node tree, obtaining the fourth process node whose execution state is in the incomplete state. Further, the computer device can identify the fourth process node in the incomplete state as the target process node in the target process instance that is in a missing state. Optionally, the computer device can determine whether the fourth process node exists in the node database based on its node identifier. If the computer device determines that the fourth process node does not exist in the node database, it identifies the fourth process node as the target process node in the missing state in the target process instance; if the computer device determines that the fourth process node exists in the node database, it does not identify the fourth process node as the target process node in the missing state in the target process instance.

[0120] Specifically, each process instance and each process node can be viewed as a finite state machine. The execution state of a process instance or node changes through certain events, and rules for the transition of execution states can be defined (i.e., what events trigger how the execution state of a process instance or node will transition (i.e., update)). For example, for a process node or instance in a waiting state, a stop event can transition it to a stopped state, or a success event can transition it to a successful state. Similarly, for a process node or instance in a stopped state, a stop success event can transition it to a stopped state. Furthermore, retry, skip, and pause functions can be configured for process nodes or instances according to specific needs. For some unnecessary nodes, there is also a need to ignore execution failures (i.e., when a non-essential node fails, it can be ignored, and execution can continue). The finite state machine of a process instance is different from that of a process node. A process node has some special execution states that do not exist in the finite state machine of a process instance, such as the Skip state and the Ignore state of the node.

[0121] like Figure 10 As shown, Figure 10 This is a schematic diagram of a finite state machine for a process example provided in an embodiment of this application, such as... Figure 10As shown, the initial execution state of a process instance can be "Created". When a start event is triggered (either manually or during operation), the computer device can adjust the state flow of the process instance from "Created" to "Running". When a success event is triggered, the computer device can adjust the state flow of the process instance from "Running" to "Successful". When a failure event is triggered, the computer device can adjust the state flow of the process instance from "Running" to "Failed". When a stop event is triggered, the computer device can adjust the state flow of the process instance from "Running" to "Stopped". When a wait event is triggered, the computer device can adjust the state flow of the process instance from "Running" to "Waiting". Specifically, when a process instance's execution state is "Stopped," if a "Stop Successful" event is triggered, the computer device can transition the process instance's state from "Stopped" to "Stopped" based on this event. When a process instance's execution state is "Failed," if a "Skip" event is triggered, the computer device can transition the process instance's state from "Failed" to "Running" based on this event. Similarly, when a process instance's execution state is "Failed," if a "Retry" event is triggered, the computer device can transition the process instance's state from "Failed" to "Retrying" based on this event. Furthermore, the computer device can use a "Start" event to transition the process instance's state from "Retrying" to "Running." Finally, when a process instance's execution state is "Waiting," if a "Run" event is triggered, the computer device can transition the process instance's state from "Waiting" to "Running" based on this event. Specifically, when a process instance is in a waiting state, if a failure event is triggered, the computer device can adjust the state transition of the waiting state based on the failure event, updating the execution state of the process instance to a failed state. Conversely, when a process instance is in a waiting state, if a stop event is triggered, the computer device can adjust the state transition of the waiting state based on the failure event, updating the execution state of the process instance to a stopped state.

[0122] like Figure 11 As shown, Figure 11 This is a schematic diagram of a finite state machine for a process node provided in an embodiment of this application, as shown below. Figure 11As shown, the initial execution state of a process node can be "Created". When a start event is triggered (either manually or during operation), the computer device can adjust the state flow of the process node from "Created" to "Running". When a stop success event is triggered, the computer device can adjust the state flow of the process node from "Created" to "Stopped". When a signal gateway wait event is triggered, the computer device can adjust the state flow of the process node from "Created" to "Waiting". When a success event is triggered, the computer device can adjust the state flow of the process node from "Running" to "Successful". When a failure event is triggered, the computer device can adjust the state flow of the process node from "Running" to "Failed". When a stop event is triggered, the computer device can adjust the state flow of the process node from "Running" to "Stopped". When a wait event is triggered, the computer device can perform a state transition on the running state of the process node based on the wait event, and update the execution state of the process node to the waiting state.

[0123] Specifically, when a process node's execution status is "Stopped," if a "Stop Successful" event is triggered, the computer device can transition the process node's status from "Stopped" to "Stopped" based on this event. When a process node's execution status is "Failed," if a "Skip" event is triggered, the computer device can transition the process node's status from "Failed" to "Skipped" based on this event. When a process node's execution status is "Failed," if an "Ignore" event is triggered, the computer device can transition the process node's status from "Failed" to "Ignored" based on this event. Finally, when a process node's execution status is "Failed," if a "Retry" event is triggered, the computer device can transition the process node's status from "Failed" to "Retrying" based on this event. Furthermore, the computer device can use a start event to transition the retrying state of a process node, updating its execution state to running. Similarly, the computer device can use a stop event to transition the execution state of a process node, updating its retrying state to stopped. Specifically, when a process node's execution state is waiting, if a run event is triggered, the computer device can transition the waiting state of the process node based on the run event, updating its execution state to running. Similarly, when a process node's execution state is waiting, if a failure event is triggered, the computer device can transition the waiting state of the process node based on the failure event, updating its execution state to failed. Finally, when a process node's execution state is waiting, if a stop event is triggered, the computer device can transition the waiting state of the process node based on the failure event, updating its execution state to stopped. Specifically, when the execution status of a process node is in a waiting state, if a stop success event is triggered, the computer device can perform a state transition on the waiting state of the process node based on the stop success event, updating the execution status of the process node to a stopped state.

[0124] S103: Read the attribute information of the target process node from the status database, call the application process, and execute the target process node according to the attribute information.

[0125] Specifically, after identifying a target process node in a missing state within the target process instance, the computer device can read the target process node's attribute information from the state database. This attribute information may refer to the node identifier of the target process node. The computer device can then invoke the application process to execute the target process instance based on the attribute information, thereby bringing the target process node to the execution completion state.

[0126] Optionally, to prevent the loss of process nodes in the target process instance when the workflow engine's working state is abnormal, the computer device can use an MQ database as the node database. The MQ database has an ACK mechanism, ensuring that after the workflow engine's application process reads the attribute information of the process node to be executed from the node database, the node database retains this attribute information. Thus, when the workflow engine malfunctions, it can continue to retrieve the attribute information of the process node to be executed from the node database and execute the process node based on this attribute information.

[0127] like Figure 12 As shown, Figure 12 This is a schematic diagram illustrating an example of a workflow engine executing a target process, as provided in an embodiment of this application. Figure 12 As shown, upper-layer business processes can initiate orchestration tasks for target process instances to generate them. The computer device can use the workflow engine-OSS (i.e., the operating system) 120a to store instance information (such as execution status and attribute information) of the target process instance, as well as node information (such as execution status and attribute information) of each process node within the target process instance, into the state database 120d. Further, the computer device can add the process nodes to be executed from the target process instance to the message queue 120b in the node database. Further, the computer device can use coroutines in the workflow engine 120c to retrieve the node identifier of the process node to be executed from the message queue 120b in the node database, and based on this node identifier, retrieve the execution information of the process node to be executed from the state database 120d. Further, the computer device can use the node processor 120e in the workflow engine to determine the target processor for processing the process node to be executed, based on the first node type of the process node. For example... Figure 12 As shown, when the process node to be executed is a task node, a preset target plugin (such as plugin 1...plugin m) can be used as the target processor to process the process node, and the plugin's processing logic is executed. When the process node to be executed is a sub-process node, the sub-process node processor is used as the target processor for the process node to be executed, and the processing logic in the sub-process node processor is executed. When the process node to be executed is a signal gateway node, the signal gateway node processor is used as the target processor for the process node to be executed, and the processing logic in the signal gateway processor is executed.

[0128] Furthermore, such as Figure 12As shown, during the execution of a process node to be executed, if a status update instruction for the process node to be executed is received, the execution status of the target process instance or the process node to be executed is updated according to the status update instruction via event handler 120f. Further, the computer device can update the execution status in the status database 120d based on the updated execution status of the process node to be executed or the target process instance. Simultaneously, the computer device can determine whether the execution status of the target process instance or the process node to be executed is in an incomplete state. If the execution status of the target process instance or the process node to be executed is in an incomplete state, the process node to be executed is pushed to the message queue 120b of the node database; if the execution status of the target process instance or the process node to be executed is in a completed state, the process node to be executed is not pushed to the message queue 120b of the node database.

[0129] In this embodiment, the workflow engine's working status is obtained during the execution of the process node to be executed in the target process instance by the application process in the workflow engine. This allows for the detection of the workflow engine's working status and whether it is abnormal. If the workflow engine's working status is abnormal, the process nodes in the status database associated with the target process instance are traversed based on the process node to be executed to obtain the target process node in the target process instance that is in a missing state. Therefore, when an abnormal working status of the workflow engine is detected, the status database is traversed to determine the target process node in the target process instance that is in a missing state. The attribute information of the target process node is read from the status database, the application process is invoked, and the target process node is executed based on the attribute information. Through this application, when a workflow engine malfunctions, the missing target process node in the target process instance can be retrieved and executed, preventing the target process instance from failing to execute due to the loss of process nodes caused by a workflow engine malfunction, thus improving the execution efficiency of the target process instance.

[0130] like Figure 13 The diagram shown illustrates a process node processing method according to an embodiment of this application. This process node processing method can be executed by a computer device, which can be a server (as described above). Figure 1 Server 10 in the middle), or user terminal (as described above) Figure 1 This application does not limit the scope to any user terminal in the user terminal cluster. Figure 13 As shown, the process node processing method may include, but is not limited to, the following steps:

[0131] S201: During the execution of the pending process node in the target process instance by the application process in the workflow engine, obtain the working status of the workflow engine.

[0132] S202, if the workflow engine is in an abnormal state, then the process nodes in the state database associated with the target process instance are traversed according to the process node to be executed to obtain the target process node in the target process instance that is in a lost state.

[0133] Specifically, the details of steps S201-S202 in this embodiment can be found above. Figure 3 The contents of steps S101-S102 are not described again in this embodiment of the application.

[0134] S203, Read the attribute information of the target process node from the status database.

[0135] Specifically, after the computer device identifies a target process node in a lost state within the target process instance, it can read the attribute information of the target process node from the state database. This attribute information may refer to the node identifier.

[0136] S204, add the attribute information of the target process node to the node database corresponding to the target process instance.

[0137] Specifically, computer devices can add the attribute information of the target process node to the node database corresponding to the target process instance. Since the workflow engine's application process needs to retrieve the process node to be executed from the node database, the attribute information of the target process node needs to be added to the node database so that the application process in the workflow engine can execute the target process node.

[0138] S205, invoke the application process, read the attribute information of the target process node from the node database, and remove the attribute information of the target process node from the node database.

[0139] Specifically, computer devices can call application processes in the workflow engine to read the attribute information of target process nodes from the node database in a loop. In order to avoid repeated execution, the attribute information of target process nodes needs to be removed from the node database.

[0140] S206. Based on the attribute information, obtain the execution information of the target process node from the status database, and execute the target process node according to the execution information.

[0141] Specifically, the computer device can obtain the execution information of the target process node from the status database based on the attribute information of the target process node, and execute the target process node according to the execution information so that the target process node reaches the execution completion state.

[0142] Optionally, the execution information includes the node interface information of the target process node and the process interface information of the target process instance. The computer device retrieves the execution information of the target process node from the state database based on the attribute information. The specific method of executing the target process node based on the execution information may include: invoking the application process; retrieving the node interface information of the target process node and the process interface information of the target process instance from the state database based on the attribute information; obtaining the second node type corresponding to the target process node; selecting a target processor from the processors in the workflow engine to execute the target process node based on the second node type; invoking the target processor; and executing the target process node based on the node interface information and the process interface information.

[0143] Specifically, execution information includes the node interface information of the target process node and the process interface information of the target process instance. The computer device can invoke the application process in the workflow engine to retrieve the execution information of the target process node from the state database based on its attribute information. This execution information can refer to the node interface information of the target process node and the process interface information of the target process instance. The node interface information of the target process node can refer to a DAO (Data Access Object), located between logic and persistence, enabling access to persistent data. In other words, it encapsulates the relevant information of the target process node using database operations, providing a corresponding interface to the outside world through which the relevant information of the target process node can be retrieved. A DAO can provide the interface required for accessing relational database systems, separating data access from business logic and providing an object-oriented data access interface to the upper layer. Similarly, the instance interface information of the target process instance can also refer to a DAO. The computer device can invoke the node processor in the workflow engine to execute the target process node based on its node interface information and the process interface information of the target process instance.

[0144] Optionally, the computer device invokes a node processor in the workflow engine. The specific method for executing the target process node based on node interface information and process interface information may include: obtaining the second node type corresponding to the target process node; determining the target processor for executing the target process node based on the second node type; invoking the target processor; and executing the target process node based on the node interface information and process interface information. If, during the execution of the target process node, an execution status change instruction for the target process node is received, the execution status change instruction is used to update the execution of the target process node.

[0145] Specifically, the computer device can obtain the second node type corresponding to the target process node, and determine the target processor for executing the target process node based on the second node type. The second node type of the target process node can be found above. Figure 3 The description of the first node type of the process node to be executed in step S102 will not be repeated here. Different node types require different processing logic and necessitate different processors. Therefore, the computer device can invoke the target processor to execute the target process node based on its node interface information and the process interface information of the target process instance. Specifically, if the second node type of the target process node is a task node, an HTTP plugin or other plugin can be used to process the logic of the target process node; if the second node type is a sub-process node, a sub-process node processor is used to execute the processor logic of the target process node; if the second node type is a signal gateway node, a signal gateway processor is used to execute the processor logic of the target process node. Specifically, the computer device can invoke the target processor to obtain the execution state transition rules of the target process node based on its node interface information and the execution state flow rules of the target process instance based on its process interface information. Further, based on the execution state transition rules of the target process node and the execution state flow rules of the target process instance, an execution state change instruction for the target process node is generated.

[0146] Furthermore, during the process of a computer device invoking the target processor to execute a target process node, when it receives an execution status change instruction for the target process node, it updates the execution target process node according to the execution status change instruction. It can be understood that when the computer device receives an execution status change instruction for the target process node from the administrator during the execution of the target process node, it can update the execution target process node according to the status change instruction. Alternatively, it can be understood that if a preset status change instruction is triggered during the execution of the target process node, the computer device can update the instruction target process node according to the preset status change instruction. For example, if the current execution status of the target process node is "running," and the execution status of the target process instance to which the target process node belongs is "stopped," an execution status instruction is generated for the target process node to update its execution status to "stopped" based on the execution status transition rules of the target process node and the execution status flow rules of the target process instance. The computer device can then update the running status of the target process node to "stopped" according to this instruction. For example, if a computer device updates the execution status of a target process node to a stopped state by calling the target processor, but obtains information from the node interface of the target process node that the administrator has performed a skip adjustment operation on the target process node, the computer device will update the execution status of the target process node to a skipped state based on the skip adjustment operation.

[0147] Specifically, in the target processor of the workflow engine, the deployment level (e.g., deployment 65) of the target process instance is obtained based on its execution status. At this deployment level, the upcoming target event (e.g., stop or skip event) is determined based on the execution status of the target process node and the target process instance itself. The computer device can call the FSM (FiniteState Machine) event handler in the target processor to transition the execution status of the target process node to the next state based on the upcoming target event. If the target process node is in a running state, and the computer device determines through the target processor that the upcoming target event is a failure event, the FSM event handler will then transition the running state of the target process node to a failure state based on this failure event. After the target processor completes the execution of a node, if the target process node's execution status reaches the completed state, it is not necessary to add the target process node's attribute information to the node database. If the execution status of the target process node is in the incomplete state, its attribute information needs to be added to the node database. If the execution status of the target process node reaches the completed state, but the target process instance to which the target process node belongs has not completed execution, its attribute information needs to be added to the node database for the next incomplete process node in the target process node. Optionally, when the execution status of the target process node is in the incomplete state, it is necessary to wait x seconds before adding the target process node's attribute information to the node database. The application process in the workflow engine calls the target processing function in the target processor. This target processing function determines the process processing function based on the execution status of the target process instance and performs logical processing on the target process instance according to this process processing function. The process processing function of the target process instance determines the node processing function of the target process node based on its execution status and performs logical processing on the target process node according to this node processing function.

[0148] Optionally, the computer device also updates the execution status of the target process node according to the execution status change instruction, obtaining the updated execution status. The updated execution status is then used to update the execution status of the target process node in the status database. If the updated execution status is "not completed," the attribute information of the target process node is added to the node database.

[0149] Specifically, the computer device can update the execution status of the target process node according to the execution status update instruction to obtain the updated execution status. If the current execution status of the target process node is "running," and the computer device receives an execution status update instruction indicating a failure event, it can update the execution status of the target process node according to the failure event, changing the "running" status to a "failed" status (i.e., the updated execution status). Furthermore, the computer device can use the updated execution status to update the execution status of the target process node in the status database. For example, when the execution status of the target process node is updated to "failed," the "running" status in the status database can be updated to "failed." Further, the computer device can check whether the updated execution status of the target process node is "not completed." If the updated execution status is "not completed," the updated attribute information of the target process node is added to the node database. If the updated execution status is "completed," the updated attribute information is not added to the node database.

[0150] like Figure 14 As shown, Figure 14 This is a schematic diagram illustrating how to obtain a target process node according to an embodiment of this application, such as... Figure 14As shown, when the process node to be executed is a non-signal gateway node type, during the process of the computer device executing the process node to be executed in the target process instance through the application process in the workflow engine, when the upper-layer service receives a stop instruction for the process node to be executed, the computer device can determine that the working state of the workflow engine is abnormal and call the stop interface 140b. The computer device can call the stop interface processing function of stop interface 140b, and add new logic in the stop interface processing function, that is, obtain the process node tree corresponding to the target process instance, obtain the target process node in the target process instance that is in a lost state according to the root node in the process node tree, and push the target process node back to the node database 140d, that is, add the attribute information of the target process node to the node database 140d. Further, the computer device can execute the original logic of the stop interface processing function, update the execution status of the process node to be executed to the stopped state, return a stop success message to the upper-layer service, and update the execution status of the process node to be executed in the status database 140e. In this way, the computer device adds the attribute information of the target process node that is missing in the target process instance to the node data 140d. It then retrieves the attribute information of the target process node from the node database via a coroutine in the workflow engine 140c, and obtains the execution information of the target process node from the state database 140e. Based on this execution information, it manages the execution status of the target process node. This avoids the target process instance failing to complete due to the loss of process nodes, thus improving the execution efficiency of the target process instance.

[0151] like Figure 15 As shown, Figure 15 This is a schematic diagram illustrating how to obtain a target process node according to an embodiment of this application, such as... Figure 15As shown, when the process node to be executed is a signal gateway node type, during the process of the computer device executing the process node to be executed in the target process instance through the application process in the workflow engine, when the upper-layer service receives a signal gateway task reporting instruction for the process node to be executed, the computer device can determine that the working state of the workflow engine is abnormal and call the signal gateway reporting 150b. The computer device can call the gateway task reporting interface processing function of the signal gateway reporting 150b, and add new logic to the gateway task reporting interface processing function, that is, obtain the process node tree corresponding to the target process instance, recursively obtain the target process node in the target process instance that is in a lost state according to the current node (i.e., the process node to be executed), and push the target process node back to the node database 150d, that is, add the attribute information of the target process node to the node database 150d. Further, the computer device can execute the original logic of the gateway task reporting interface processing function, store the execution result of the target process instance in the status database 150e, and return an execution success message to the upper-layer service 150a. In this way, the computer device adds the attribute information of the target process node that is missing in the target process instance to the node data 150d. The attribute information of the target process node is obtained from the node database through the coroutine in the workflow engine 150c, and the execution information of the target process node is obtained from the state database 150e. The execution status of the target process node is changed according to the execution information. This can avoid the target process instance from failing to complete due to the loss of process nodes in the target process instance, and can improve the execution efficiency of the target process instance.

[0152] like Figure 16 As shown, Figure 16 This is a schematic diagram illustrating the execution of a target process node according to an embodiment of this application, such as... Figure 16 As shown, when a computer device detects that the workflow engine's working state is abnormal, it will retrieve the target process node that is missing from the target process instance and add the target process node's attribute information to the node database. This may result in duplicate process nodes in the node database. Figure 16 As shown, although duplicate target process nodes exist in the node database, this will not affect the target process node reaching the execution completion state. Figure 16As shown, if process node 1 exists in node database 160a, and its node state is "waiting," the process state of the target process instance to which process node 1 belongs is also "waiting." Due to the addition operation of the computer device adding the attribute information of the target process node to the node database, a duplicate process node 1 exists in node database 160b, meaning there are two identical process nodes 1 in node database 160b. Further, the computer device can read a process node 1 from node database 160b through workflow engine 160c. When a state update instruction for the target process instance is detected, workflow engine 160c performs a state transition for the target process instance to which process node 1 belongs, updating the waiting state of the target process instance to a stopped state. Further, the computer device can update the execution state of process node 1 through workflow engine 160d, updating the waiting state of process node 1 to a stopped state. When the computer determines that process node 1 is in an incomplete state, it adds process node 1 to the node database 160e. At this time, the node database 160e contains process node 1 with an execution status of "stopped" and process node 1 with an execution status of "waiting".

[0153] Furthermore, the computer device can read another process node 1 (i.e., one in a waiting state) from the node database 160e via workflow engine 160f, update the status of process node 1, and add it to the node database 160g. At this point, both process nodes 1 in node database 160g have the same execution state. The computer device can also read a process node 1 from the node database 160g via workflow engine 160h, update its status, and if the process node enters a stopped state after the status update, it is not added to the node database. Instead, the status of the target process instance to which process node 1 belongs is updated to the stopped state. At this point, there is only one process node 1 in node database 160i. When the computer device reads a process node 1 from node database 160i via workflow engine 160j, and detects that the execution state of the process instance to which process node 1 belongs is stopped, it skips the update. Therefore, even if multiple identical process nodes exist in the node database, it will not affect the completion of the target process node's execution.

[0154] like Figure 17 As shown, Figure 17 This is a schematic diagram illustrating the execution of a target process node according to an embodiment of this application, such as... Figure 17As shown, when a computer device detects that the workflow engine's working state is abnormal, it will retrieve the target process node that is missing from the target process instance and add the target process node's attribute information to the node database. This may result in duplicate process nodes in the node database. Figure 16 As shown, although duplicate target process nodes exist in the node database, this will not affect the target process node reaching the execution completion state. Figure 17 As shown, if process node 1 exists in node database 170a, and its node state is "waiting," the process state of the target process instance to which process node 1 belongs is also "waiting." Due to the addition operation of the computer device adding the attribute information of the target process node to the node database, a duplicate process node 1 exists in node database 170b, meaning there are two identical process nodes 1 in node database 170b. Furthermore, the computer device can read one process node 1 from node database 170b through an application process in workflow engine 170c, and another process node 1 from node database 170b through another application process in workflow engine 170d. When workflow engines 170c and 170d detect a state update instruction for the target process instance, they respectively perform state transitions on the target process instance to which process node 1 belongs, updating the waiting state of the target process instance to "stopped."

[0155] Furthermore, the computer device can update the execution status of process node 1 through workflow engines 170e and 170f, respectively, updating the waiting status of process node 1 to the stopped state. When the computer device determines that process node 1 corresponding to workflow engines 170e and 170f is in an incomplete execution state, it adds the process node 1 corresponding to workflow engines 170e and 170f to the node database 170g. At this time, there are two process nodes 1 with the same execution state in the node database 170g. Further, the computer device can read another process node 1 (i.e., the execution state is waiting) from the node database 170g through workflow engine 170h and update the status of that process node 1. When workflow engine 170i detects that a process node has entered the stopped state after a status update, it does not add it to the node database. Meanwhile, the computer device can read another process node 1 (i.e., the execution state is waiting) from the node database 170g through the workflow engine 170j and update the status of process node 1. When the workflow engine 170k detects that the status of the target process instance to which process node 1 belongs has been updated to the stopped state, it will skip the update. It can be seen that even if there are multiple identical process nodes in the node database, it will not affect the completion of the target process node.

[0156] In this embodiment, the workflow engine's working status is obtained during the execution of the process node to be executed in the target process instance by the application process in the workflow engine. This allows for the detection of the workflow engine's working status and whether it is abnormal. If the workflow engine's working status is abnormal, the process nodes in the status database associated with the target process instance are traversed based on the process node to be executed to obtain the target process node in the target process instance that is in a missing state. Therefore, when an abnormal working status of the workflow engine is detected, the status database is traversed to determine the target process node in the target process instance that is in a missing state. The attribute information of the target process node is read from the status database, the application process is invoked, and the target process node is executed based on the attribute information. Through this application, when a workflow engine malfunctions, the missing target process node in the target process instance can be retrieved and executed, preventing the target process instance from failing to execute due to the loss of process nodes caused by a workflow engine malfunction, thus improving the execution efficiency of the target process instance.

[0157] Please see Figure 18 , Figure 18This is a schematic diagram of the structure of a process node processing device provided in an embodiment of this application. The aforementioned process node processing device can be a computer program (including program code) running on a computer device; for example, the process node processing device is an application software. The process node processing device can be used to execute corresponding steps in the process node processing method provided in the embodiments of this application. Figure 18 As shown, the process node processing device may include: an acquisition module 11, a traversal module 12, and an execution module 13.

[0158] Module 11 is used to obtain the working status of the workflow engine during the execution of the process node to be executed in the target process instance by the application process in the workflow engine;

[0159] The traversal module 12 is used to traverse the process nodes in the status database associated with the target process instance based on the process node to be executed if the working status of the workflow engine is in an abnormal state, so as to obtain the target process node in the target process instance that is in a lost state.

[0160] Execution module 13 is used to read the attribute information of the target process node from the status database, call the application process, and execute the target process node according to the attribute information.

[0161] The traversal module 12 includes:

[0162] The first acquisition unit 1201 is used to acquire the execution order of process nodes in the target process instance from the status database; the process nodes in the target process instance include process nodes to be executed.

[0163] The generation unit 1202 is used to generate a process node tree corresponding to the target process instance based on the execution order of the process nodes in the target process instance;

[0164] The second acquisition unit 1203 is used to acquire the first node type of the process node to be executed;

[0165] Traversal unit 1204 is used to traverse the nodes in the process node tree according to the first node type to obtain the target process node that is in a lost state in the target process instance.

[0166] The process node tree includes the root node corresponding to the first process node that reflects the earliest execution order in the target process instance, and the leaf node corresponding to the second process node that reflects the execution order of the second process node that is later than the first process node in the target process instance.

[0167] Traversing unit 1204 is specifically used for:

[0168] If the first node type is a signal gateway node type, then the process node tree is traversed starting from the corresponding node of the process node to be executed in the process node tree to obtain the target process node in the target process instance that is in a lost state; the target process node includes at least one of the first process node and the second process node.

[0169] If the first node is a non-signal gateway node type, then the process node tree is traversed starting from the root node to obtain the target process node that is in a lost state in the target process instance.

[0170] Specifically, traversal unit 1204 is also used for:

[0171] If the first node type is a signal gateway node type, and the node in the process node tree that reflects the process node to be executed is the root node of the process node tree, then obtain the execution status of the process node to be executed. If the execution status of the process node to be executed is not completed, then determine the process node to be executed as the target process node in the target process instance that is in a lost state.

[0172] If the first node type is a signal gateway node type, and the node in the process node tree that reflects the process node to be executed is a leaf node of the process node tree, then the process node tree is traversed from the leaf node corresponding to the process node to be executed to the root node of the process node tree to obtain the third process node whose execution status is in the incomplete execution state. The third process node is determined as the target process node in the target process instance that is in the missing state.

[0173] Specifically, traversal unit 1204 is also used for:

[0174] If the first node type is a non-signal gateway node type, then the root node is used as the starting point for traversal, and all nodes in the process node tree are traversed to obtain the fourth process node whose execution status is in the incomplete execution state.

[0175] The fourth process node is identified as the target process node in the target process instance that is in a lost state.

[0176] Execution module 13 includes:

[0177] The third acquisition unit 1301 is used to read the attribute information of the target process node from the status database;

[0178] Add unit 1302, used to add the attribute information of the target process node to the node database corresponding to the target process instance;

[0179] The removal unit 1303 is used to call the application process, read the attribute information of the target process node from the node database, and remove the attribute information of the target process node from the node database.

[0180] The execution unit 1304 is used to obtain the execution information of the target process node from the status database based on the attribute information, and execute the target process node based on the execution information.

[0181] The execution information includes the node interface information of the target process node and the process interface information of the target process instance.

[0182] Execution unit 1304 is specifically used for:

[0183] The application process is invoked to retrieve the node interface information of the target process node and the process interface information of the target process instance from the state database based on the attribute information.

[0184] Obtain the second node type corresponding to the target process node;

[0185] Based on the second node type, select the target processor from the processors in the workflow engine to execute the target process node;

[0186] Invoke the target processor and execute the target process node based on the node interface information and process interface information.

[0187] Specifically, execution unit 1304 is also used for:

[0188] When the execution state of the target process node is received during the execution of the target process node by calling the target processor, the execution state of the target process node is updated according to the execution state change instruction to obtain the updated execution state.

[0189] The updated execution status is used to update the execution status of the target process node in the status database;

[0190] If the updated execution status is "not completed", then the attribute information of the target process node will be added to the node database.

[0191] The acquisition module 11 includes:

[0192] The fourth acquisition unit 1101 is used to acquire system log data of the workflow engine during the execution of the process node to be executed in the target process instance by the application process in the workflow engine;

[0193] The determination unit 1102 is used to determine the working status of the workflow engine based on system log data.

[0194] Specifically, the determining unit 1102 is used for:

[0195] If the system log data indicates that the system of the first service device belonging to the node database of the workflow engine has restarted, then the working state of the workflow engine is determined to be abnormal.

[0196] If the system log data indicates that the system of the second service device corresponding to the application process has restarted, then the workflow engine is determined to be in an abnormal state.

[0197] If the system log data indicates that an adjustment operation has been received for the node to be executed in the process, then the workflow engine is determined to be in an abnormal state.

[0198] If the system log data indicates that the network of the first service device is abnormal, then the workflow engine is determined to be in an abnormal state.

[0199] According to one embodiment of this application, Figure 3 The steps involved in the process node processing method shown can be derived from... Figure 18 The process nodes shown are executed by the various modules within the processing unit. For example, Figure 3 Step S101 shown can be performed by Figure 18 The acquisition module 11 in the middle is used to execute, Figure 3 Step S102 shown can be performed by Figure 18 The traversal module 12 in the middle is used to execute, Figure 3 Step S103 shown can be performed by Figure 18 The execution module 13 in the middle is used to execute it.

[0200] According to one embodiment of this application, Figure 18 The modules in the process node processing device shown can be individually or entirely merged into one or more units, or some of these units can be further divided into multiple functionally smaller sub-units to achieve the same operation without affecting the technical effects of the embodiments of this application. The above modules are based on logical function division; in practical applications, the function of one module can be implemented by multiple units, or the function of multiple modules can be implemented by one unit. In other embodiments of this application, the testing device may also include other units; in practical applications, these functions can also be implemented with the assistance of other units, and can be implemented collaboratively by multiple units.

[0201] In this embodiment, the workflow engine's working status is obtained during the execution of the process node to be executed in the target process instance by the application process in the workflow engine. This allows for the detection of the workflow engine's working status and whether it is abnormal. If the workflow engine's working status is abnormal, the process nodes in the status database associated with the target process instance are traversed based on the process node to be executed to obtain the target process node in the target process instance that is in a missing state. Therefore, when an abnormal working status of the workflow engine is detected, the status database is traversed to determine the target process node in the target process instance that is in a missing state. The attribute information of the target process node is read from the status database, the application process is invoked, and the target process node is executed based on the attribute information. Through this application, when a workflow engine malfunctions, the missing target process node in the target process instance can be retrieved and executed, preventing the target process instance from failing to execute due to the loss of process nodes caused by a workflow engine malfunction, thus improving the execution efficiency of the target process instance.

[0202] Please see Figure 19 , Figure 19 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Figure 19 As shown, the computer device 1000 may include a processor 1001, a network interface 1004, and a memory 1005. Furthermore, the computer device 1000 may also include a user interface 1003 and at least one communication bus 1002. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen and a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be high-speed RAM or non-volatile memory, such as at least one disk storage device. Optionally, the memory 1005 may also be at least one storage device located remotely from the processor 1001. Figure 19 As shown, the memory 1005, which is a computer-readable storage medium, may include an operating system, a network communication module, a user interface module, and a device control application.

[0203] exist Figure 19In the computer device 1000 shown, the network interface 1004 provides network communication functionality; the user interface 1003 is mainly used to provide an input interface for the target user; and the processor 1001 can be used to call the device control application stored in the memory 1005 to achieve:

[0204] During the execution of the pending process node in the target process instance by the application process in the workflow engine, the working status of the workflow engine is obtained;

[0205] If the workflow engine is in an abnormal state, the process nodes in the state database associated with the target process instance are traversed according to the process node to be executed to obtain the target process node in the target process instance that is in a missing state.

[0206] The system reads the attribute information of the target process node from the state database, calls the application process, and executes the target process node based on the attribute information.

[0207] It should be understood that the computer device 1000 described in the embodiments of this application can execute the foregoing text. Figure 3 or Figure 13 The description of the process node processing method in the corresponding embodiment can also be executed as described above. Figure 18 The description of the process node processing device in the corresponding embodiments will not be repeated here. Furthermore, the beneficial effects of using the same method will also not be repeated.

[0208] Furthermore, it should be noted that this application embodiment also provides a computer-readable storage medium, which stores a computer program executed by the aforementioned process node processing device. The computer program includes program instructions, and when the processor executes the program instructions, it can execute the aforementioned... Figure 3 and Figure 13 The description of the process node processing method in the corresponding embodiment will not be repeated here.

[0209] Furthermore, the beneficial effects of using the same method will not be repeated here. For technical details not disclosed in the computer-readable storage medium embodiments involved in this application, please refer to the description of the method embodiments of this application. As an example, program instructions can be deployed and executed on a computing device, or on multiple computing devices located in one location, or on multiple computing devices distributed in multiple locations and interconnected through a communication network. Multiple computing devices distributed in multiple locations and interconnected through a communication network can constitute a blockchain system.

[0210] Furthermore, it should be noted that this application also provides a computer program product or computer program, which may include computer instructions, which may be stored in a computer-readable storage medium. The processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor may execute the computer instructions, causing the computer device to perform the aforementioned actions. Figure 3 and Figure 13 The description of the process node processing method in the corresponding embodiments is already provided and will not be repeated here. Furthermore, the beneficial effects of using the same method will also not be repeated. For technical details not disclosed in the computer program products or computer program embodiments involved in this application, please refer to the description of the method embodiments of this application.

[0211] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0212] The steps in the method of this application embodiment can be adjusted, combined, or deleted according to actual needs.

[0213] The modules in the device of this application embodiment can be merged, divided, and deleted according to actual needs.

[0214] Those skilled in the art will understand that implementing all or part of the processes in the above embodiments is possible.

[0215] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.

[0216] The above description discloses only preferred embodiments of the present invention and should not be construed as limiting the scope of the present invention. Therefore, equivalent variations made in accordance with the claims of the present invention are still within the scope of the present invention.

Claims

1. A method for processing process nodes, characterized in that, include: During the execution of the pending process node in the target process instance by the application process in the workflow engine, the working status of the workflow engine is obtained; If the workflow engine is in an abnormal state, the execution order of the process nodes in the target process instance is obtained from the state database; the process nodes in the target process instance include the process node to be executed; the abnormal state of the workflow engine includes at least one of the following: the system of the first service device of the node database of the workflow engine is restarted, the system of the second service device corresponding to the application process is restarted, an adjustment execution operation is received for the process node to be executed, and the network of the first service device is abnormal; Based on the execution order of the process nodes in the target process instance, generate the process node tree corresponding to the target process instance; The process node tree includes a root node corresponding to the first process node that reflects the earliest execution order in the target process instance, and leaf nodes corresponding to the second process node that reflects the execution order of the target process instance that is later than the first process node. Obtain the first node type of the process node to be executed; If the first node type is a signal gateway node type, then the process node tree is traversed starting from the corresponding node of the process node to be executed in the process node tree to obtain the target process node in the target process instance that is in a lost state. The target process node includes at least one of the first process node and the second process node; If the first node type is a non-signal gateway node type, then the process node tree is traversed starting from the root node to obtain the target process node in the target process instance that is in a lost state. The system reads the attribute information of the target process node from the state database, calls the application process, and executes the target process node according to the attribute information.

2. The method according to claim 1, characterized in that, If the first node type is a signal gateway node type, then the process node tree is traversed starting from the corresponding node of the process node to be executed in the process node tree to obtain the target process node in the target process instance that is in a lost state, including: If the first node type is a signal gateway node type, and the node in the process node tree that reflects the process node to be executed is the root node of the process node tree, then the execution status of the process node to be executed is obtained. If the execution status of the process node to be executed is not completed, then the process node to be executed is determined as the target process node in the target process instance that is in a lost state. If the first node type is a signal gateway node type, and the node in the process node tree that reflects the process node to be executed is a leaf node of the process node tree, then the process node tree is traversed from the leaf node corresponding to the process node to be executed towards the root node of the process node tree to obtain a third process node whose execution state is in the incomplete execution state, and the third process node is determined as the target process node in the target process instance that is in the missing state.

3. The method according to claim 1, characterized in that, If the first node type is a non-signal gateway node type, then the process node tree is traversed starting from the root node to obtain the target process node in the target process instance that is in a lost state, including: If the first node type is a non-signal gateway node type, then the root node is used as the starting point for traversal, and all nodes in the process node tree are traversed to obtain the fourth process node whose execution status is in the incomplete execution state. The fourth process node is identified as the target process node in the target process instance that is in a lost state.

4. The method according to claim 1, characterized in that, The step of reading the attribute information of the target process node from the state database, invoking the application process, and executing the target process instance according to the attribute information includes: Read the attribute information of the target process node from the status database; Add the attribute information of the target process node to the node database corresponding to the target process instance; The application process is invoked to read the attribute information of the target process node from the node database, and the attribute information of the target process node is removed from the node database. Based on the attribute information, the execution information of the target process node is obtained from the status database, and the target process node is executed based on the execution information.

5. The method according to claim 4, characterized in that, The execution information includes the node interface information of the target process node and the process interface information of the target process instance; The step of obtaining the execution information of the target process node from the state database based on the attribute information, and executing the target process node based on the execution information, includes: The application process is invoked to obtain the node interface information of the target process node and the process interface information of the target process instance from the status database based on the attribute information. Obtain the second node type corresponding to the target process node; Based on the second node type, a target processor for executing the target process node is selected from the processors in the workflow engine; The target processor is invoked to execute the target process node based on the node interface information and the process interface information.

6. The method according to claim 5, characterized in that, The method further includes: During the execution of the target process node by the target processor, when an execution state change instruction for the target process node is received, the execution state of the target process node is updated according to the execution state change instruction to obtain the updated execution state. The updated execution status is used to update the execution status of the target process node in the status database; If the updated execution status is incomplete, then the attribute information of the target process node is added to the node database.

7. The method according to claim 1, characterized in that, During the execution of the pending process node in the target process instance by the application process in the workflow engine, the working status of the workflow engine is obtained, including: During the execution of the process node to be executed in the target process instance by the application process in the workflow engine, the system log data of the workflow engine is obtained; The working status of the workflow engine is determined based on the system log data.

8. The method according to claim 7, characterized in that, Determining the working status of the workflow engine based on the system log data includes: If the system log data indicates that the system of the first service device belonging to the node database of the workflow engine has a restart operation, then the working state of the workflow engine is determined to be abnormal. If the system log data indicates that the system of the second service device corresponding to the application process has a restart operation, then the working state of the workflow engine is determined to be abnormal. If the system log data indicates that an adjustment operation has been received for the process node to be executed, then the working state of the workflow engine is determined to be abnormal. If the system log data indicates that the network of the first service device is abnormal, then the working state of the workflow engine is determined to be abnormal.

9. A process node processing device, characterized in that, include: The acquisition module is used to acquire the working status of the workflow engine during the execution of the process node to be executed in the target process instance by the application process in the workflow engine; The traversal module is used to obtain the execution order of process nodes in the target process instance from the status database if the working state of the workflow engine is abnormal; the process nodes in the target process instance include the process nodes to be executed; the abnormal working state of the workflow engine includes at least one of the following: the system of the first service device of the node database of the workflow engine is restarted, the system of the second service device corresponding to the application process is restarted, an adjustment execution operation is received for the process node to be executed, and the network of the first service device is abnormal; Based on the execution order of the process nodes in the target process instance, generate the process node tree corresponding to the target process instance; The process node tree includes a root node corresponding to the first process node that reflects the earliest execution order in the target process instance, and leaf nodes corresponding to the second process node that reflects the execution order of the target process instance that is later than the first process node. Obtain the first node type of the process node to be executed; If the first node type is a signal gateway node type, then the process node tree is traversed starting from the corresponding node of the process node to be executed in the process node tree to obtain the target process node in the target process instance that is in a lost state. The target process node includes at least one of the first process node and the second process node; If the first node type is a non-signal gateway node type, then the process node tree is traversed starting from the root node to obtain the target process node in the target process instance that is in a lost state. The execution module is used to read the attribute information of the target process node from the status database, call the application process, and execute the target process node according to the attribute information.

10. A computer device, characterized in that, include: Processor and memory; The processor is connected to a memory, wherein the memory is used to store a computer program, and the processor is used to invoke the computer program to cause the computer device to perform the method according to any one of claims 1-8.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program adapted to be loaded and executed by a processor to cause a computer device having the processor to perform the method of any one of claims 1-8.

12. A computer program product or computer program, characterized in that, The computer program product or computer program includes computer instructions stored in a computer-readable storage medium, the computer instructions being adapted to be read and executed by a processor to cause a computer device having the processor to perform the method of any one of claims 1-8.

Citation Information

Patent Citations

  • Method and apparatus for searching node by using tree index

    CN104834654A

  • Scheduling method and system, working node and monitoring node

    CN109842500A

  • Process engine control method and device, terminal and storage medium

    CN113190334A