Workflow control method and related device
By dynamically generating workflow execution paths, the complexity caused by flowchart dependencies in existing technologies is solved, enabling efficient workflow control that does not require redesign when business changes occur, and reducing iteration and maintenance costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- FAN RUAN SOFTWARE CO LTD
- Filing Date
- 2026-01-28
- Publication Date
- 2026-05-08
AI Technical Summary
Existing automated workflow systems rely on static flowcharts or fixed task orchestration methods, which requires redesigning flowcharts when business logic changes. This process is cumbersome, inefficient, and fails to meet the needs of modern enterprises.
By responding to workflow trigger signals to obtain task encapsulation data, parsing rules and strategies to determine the starting node and execution path, and using a state cache database to control the order and state of execution nodes, the execution path can be dynamically generated, avoiding dependence on fixed flowcharts.
When business processes change, there is no need to redesign the process structure; simply updating the task data is sufficient to take effect, significantly reducing iteration and maintenance costs and improving the execution efficiency and flexibility of the workflow.
Smart Images

Figure CN121998399A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of automatic control technology, and in particular to a workflow control method and related apparatus. Background Technology
[0002] An automated workflow system is a software-based process execution solution. Its core function is to automatically execute repetitive, fixed, and multi-stage business processes within an enterprise according to preset rules and logic, reducing manual intervention and thereby improving process efficiency and standardization. However, current automated workflow systems generally rely on static flowcharts or fixed task orchestration methods. When business logic changes slightly, it is necessary to redesign flowcharts and re-release the system, a cumbersome, complex, and inefficient process that is gradually failing to meet current needs. Summary of the Invention
[0003] In view of the above problems, this application provides a workflow control method and related apparatus to improve efficiency, reduce costs, and decrease complexity. The specific solution is as follows:
[0004] The first aspect of this application provides a workflow control method, comprising:
[0005] In response to a workflow trigger signal, acquire the task encapsulation data that triggered the workflow startup;
[0006] The task encapsulation data is parsed according to the rule parsing strategy to obtain the starting node of the workflow and the execution path containing the starting node;
[0007] Based on the correspondence between path nodes and execution nodes, the target execution node corresponding to each node in the execution path is determined;
[0008] The execution status of each target execution node is determined from the state cache database based on the node identifier of each target execution node, and the execution process of each target execution node is controlled according to the execution status and the execution order of each node in the execution path.
[0009] In one possible implementation, parsing the task encapsulation data according to the rule parsing strategy to obtain the starting node of the workflow and the execution path containing the starting node includes:
[0010] The task description field is extracted from the task context data of the task encapsulation data, and the starting node is determined by matching the rule conditions based on the task description field.
[0011] Based on the fields in the task context data other than the task description field, other nodes are identified, and the execution path is determined according to the order of execution.
[0012] In one possible implementation, the workflow control method further includes:
[0013] Based on the node attribute identifiers of each node on the execution path, the target nodes for parallel execution are determined, and the execution order of the target nodes is adjusted.
[0014] In one possible implementation, the execution process of each target execution node includes:
[0015] The task processing process is executed by calling the task processing plugin adapted to the target execution node, and before calling the task processing plugin, the target execution node is idempotently verified according to the execution identifier that represents the execution state.
[0016] In one possible implementation, determining the execution state of each target execution node from the state cache database based on the node identifier of each target execution node, and controlling the execution process of each target execution node according to the execution state and the execution order of each node in the execution path, includes:
[0017] The current execution status of the current target execution node is identified. When the current execution status indicates that the execution has ended or succeeded, the node in the execution path that is adjacent to the current target execution node and whose execution time is later than the current target execution node is started.
[0018] In one possible implementation, the process of acquiring the task encapsulation data includes:
[0019] The task description data entered by the user in the workflow control interface is filled into the task template in a preset format according to the data item correspondence to obtain the task encapsulation data.
[0020] In one possible implementation, the workflow control method further includes:
[0021] The execution status of each target execution node in the state cache database is statistically analyzed. When it is determined that there are no unexecuted target execution nodes, the execution results of each target execution node are statistically analyzed and organized.
[0022] A second aspect of this application provides a workflow control device, comprising:
[0023] The task data acquisition module is used to acquire the task encapsulation data that triggers the workflow in response to the workflow trigger signal;
[0024] The task data parsing module is used to parse the task encapsulation data according to the rule parsing strategy to obtain the starting node of the workflow and the execution path containing the starting node.
[0025] An execution node allocation module is used to determine the target execution node corresponding to each node in the execution path based on the correspondence between path nodes and execution nodes; and,
[0026] The execution node control module is used to determine the execution status of each target execution node from the status cache database according to the node identifier of each target execution node, and to control the execution process of each target execution node according to the execution status and the execution order of each node in the execution path.
[0027] A third aspect of this application provides a computer program product including computer-readable instructions that, when executed on an electronic device, cause the electronic device to implement the workflow control method described in the first aspect or any implementation thereof.
[0028] A fourth aspect of this application provides an electronic device, including at least one processor and a memory connected to the processor, wherein:
[0029] The memory is used to store computer programs;
[0030] The processor is used to execute the computer program so that the electronic device can implement the workflow control method of the first aspect or any implementation thereof.
[0031] The fifth aspect of this application provides a computer storage medium carrying one or more computer programs, which, when executed by an electronic device, enable the electronic device to implement the workflow control method described in the first aspect or any implementation thereof.
[0032] By employing the above technical solution, the workflow control method provided in this application can respond to a workflow trigger signal and obtain the task encapsulation data that triggers the workflow startup. The task encapsulation data is parsed according to a rule parsing strategy to obtain a workflow execution path containing the starting node. Based on the correspondence between path nodes and execution nodes, the target execution nodes corresponding to each node in the execution path are determined. The execution status of each target execution node is determined from the state cache database based on the node identifier of each target execution node, and the execution process of each target execution node is controlled according to the execution status and the execution order of each node in the execution path. This ensures that the workflow execution path does not depend on a fixed flowchart. When business processes change, users only need to update the corresponding task data for immediate effect, without the need to redesign and deploy the process structure, thereby significantly reducing iteration and maintenance costs and improving efficiency. Attached Figure Description
[0033] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.
[0034] Figure 1 An architecture diagram of a workflow control system provided in this application;
[0035] Figure 2 A flowchart of a workflow control method provided in this application;
[0036] Figure 3 A structural diagram of a workflow control device provided in this application;
[0037] Figure 4 This is a structural diagram of an electronic device provided in this application. Detailed Implementation
[0038] The embodiments of this application are described below with reference to the accompanying drawings. The terminology used in the implementation section of this application is for explaining specific embodiments only and is not intended to limit the scope of this application.
[0039] The embodiments of this application will now be described with reference to the accompanying drawings. Those skilled in the art will recognize that, with technological advancements and the emergence of new scenarios, the technical solutions provided in the embodiments of this application are equally applicable to similar technical problems.
[0040] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms are interchangeable where appropriate; this is merely a way of distinguishing objects with the same attributes in the embodiments of this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a series of elements is not necessarily limited to those elements, but may include other elements not explicitly listed or inherent to those processes, methods, products, or apparatuses.
[0041] See Figure 1 , Figure 1 A schematic diagram of the architecture of a workflow control system is shown. The system may include a terminal 100 and a server 200. The server 200 can provide the workflow control method provided in the embodiments of this application to one or more terminals.
[0042] The terminal 100 may be equipped with a workflow control application. The application and webpage can provide an interface. The terminal 100 can receive relevant parameters input by the user on the workflow control interface and send the parameters to the server 200. The server 200 can obtain the processing result based on the received parameters and return the processing result to the terminal 100.
[0043] It should be understood that in some optional implementations, the terminal 100 can also complete the action of obtaining the processing result based on the received parameters on its own, without the need for the server to cooperate. This application embodiment is not limited to this.
[0044] The following description Figure 1 The product form of the mid-terminal 100;
[0045] The terminal 100 in this application embodiment can be a tablet computer, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, etc., and this application embodiment does not impose any restrictions on it.
[0046] Terminal 100 may include a radio frequency unit, memory, input unit, display unit, camera (optional), audio circuitry (optional), speaker (optional), microphone (optional), headphone jack (optional), processor, external interface, power supply, and other components. Those skilled in the art will understand that the above-mentioned components are merely examples and do not constitute a limitation on the terminal or multifunctional device; it may include more or fewer components, or a combination of certain components, or different components.
[0047] The input unit can be used to receive input numeric or character information, and to generate key signal inputs related to user settings and function control of the portable multi-functional device. Specifically, the input unit may include a touchscreen (optional) and / or other input devices. Other input devices may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control buttons, power buttons, etc.), trackball, mouse, joystick, etc.
[0048] Among them, the input device can receive input data, etc.
[0049] The display unit can be used to display information input by the user or information provided to the user, various menus of the terminal, interactive interfaces, file display, and / or playback of any multimedia file. In the embodiments of this application, the display unit can be used to display the workflow control interface, processing results, etc.
[0050] The memory can be used to store software code related to the workflow control method, the processor can execute the steps of the workflow control method, and can also schedule other units (such as the above-mentioned input unit and display unit) to achieve the corresponding functions.
[0051] This radio frequency unit (optional) can be used to receive and send signals during information transmission or calls.
[0052] In this embodiment of the application, the radio frequency unit can send data to the server 200 and receive the processing results sent by the server 200.
[0053] It should be understood that this radio frequency unit is optional and can be replaced with other communication interfaces, such as a network port.
[0054] Terminal 100 also includes a power source (such as a battery) for supplying power to the various components.
[0055] Terminal 100 also includes an external interface, which can be a standard Micro USB interface or a multi-pin connector, which can be used to connect terminal 100 to other devices for communication or to connect a charger to charge terminal 100.
[0056] Server 200 includes a bus, a processor, a communication interface, and memory. The processor, memory, and communication interface communicate with each other via the bus.
[0057] The memory can be used to store software code related to the workflow control method, the processor can execute the steps of the chip's workflow control method, and can also schedule other units to achieve the corresponding functions.
[0058] Current workflow systems typically rely on BPMN (Business Process Modeling Notation), fixed flowcharts, state machines, and other methods for workflow orchestration. These methods result in fixed process structures that are difficult to modify. The orchestration methods are complex and not easily maintained by relevant business personnel. Furthermore, cross-node execution depends on centralized scheduling, creating a single point of failure.
[0059] To address the aforementioned problems, this application provides a workflow control method. The workflow control method of this application embodiment will be described in detail below with reference to the accompanying drawings.
[0060] Reference Figure 2 , Figure 2 A flowchart illustrating a workflow control method provided in this application embodiment is shown below. Figure 2 As shown in the embodiment of this application, a workflow control method may include steps S201 to S204, which are described in detail below.
[0061] Step S201: In response to the workflow trigger signal, obtain the task encapsulation data that triggers the workflow startup.
[0062] Specifically, users can submit relevant execution tasks or events through the workflow scheduling system on the terminal. These tasks or events can serve as input triggers for the workflow, originating from API calls, message queue events, timed triggers, etc. The relevant information for each task or event is uniformly encapsulated into task encapsulation data. This task encapsulation data contains context object data describing the task. For example, using JSON format task encapsulation data, the following format of task encapsulation data is obtained:
[0063] TaskContext {
[0064] taskId: String
[0065] taskType: "DATA_SYNC"
[0066] sourceSystem: "EXTERNAL"
[0067] dataSize: 10000
[0068] containsSensitiveField: true
[0069] businessFlags: {...}
[0070] }
[0071] In this context, taskType represents the task type, and sourceSystem represents the source system.
[0072] It is understood that those skilled in the art can select and adjust the format of the above-mentioned task encapsulation data as needed, and no restrictions are imposed here.
[0073] Step S202: Parse the task encapsulation data according to the rule parsing strategy to obtain the workflow's starting node and the execution path containing the starting node.
[0074] Specifically, based on the task encapsulation data mentioned above, since the format of each data item in the encapsulation data of the task to be executed is relatively fixed, the starting node and workflow path of the workflow can be determined by conditional matching of the relevant fields extracted from the task encapsulation data.
[0075] Step S203: Based on the correspondence between path nodes and execution nodes, determine the target execution node corresponding to each node in the execution path.
[0076] Specifically, based on the workflow path formed by the various nodes, and according to the correspondence between multiple distributed execution nodes and the nodes on the workflow path, the execution nodes that process each process node on the workflow path are determined. Each process node can correspond to one target execution node.
[0077] Step S204: Determine the execution status of each target execution node from the status cache database based on the node identifier of each target execution node, and control the execution process of each target execution node according to the execution status and the execution order of each node in the execution path.
[0078] Specifically, when controlling the execution of related tasks by each execution node, the execution order between the nodes is taken into account. The execution status of each execution node, recorded in the state cache database, is used to advance the execution process of the workflow. For example, the next execution node will only be started and executed after the workflow of the previous execution node has been completed or successfully completed.
[0079] As can be seen from the above, this workflow control method abstracts the process logic into configurable rule encapsulation files, so that the execution path of the workflow does not depend on a fixed flowchart. Therefore, when business changes occur, only the rules need to be updated to take effect immediately, without the need to redesign, deploy or reconstruct the process structure, which greatly reduces iteration and maintenance costs.
[0080] In another embodiment, to achieve accurate and rapid determination of the execution path, the above-mentioned parsing of the task encapsulation data according to the rule parsing strategy to obtain the workflow's starting node and the execution path containing the starting node may specifically include:
[0081] Extract the task description field from the task context data of the task encapsulation data, and determine the starting node by matching the rule conditions based on the task description field;
[0082] Based on the fields in the task context data other than the task description field, other nodes are identified, and the execution path is determined according to the order of execution.
[0083] Specifically, taking the JSON task encapsulation data mentioned above as an example, this task encapsulation data represents an "enterprise data synchronization task." Based on a predefined set of rules, the context fields in the task encapsulation data can be matched to determine whether to trigger the corresponding workflow and its starting node. For example, the matching results are shown below:
[0084] IF taskType == DATA_SYNC AND sourceSystem == EXTERNAL;
[0085] THEN startNode = "DataValidationNode".
[0086] This enables automatic matching between input data and rule conditions, allowing tasks to enter the corresponding workflow execution entry point, i.e., the starting node.
[0087] After determining the starting node, the rule parsing engine parses all rules associated with the task to dynamically generate the workflow execution path for this task.
[0088] Continuing with the data synchronization task mentioned above, we can make further judgments based on the context:
[0089] When a task contains sensitive fields, a desensitization processing node needs to be executed; if data validation fails, subsequent nodes will not be triggered.
[0090] In practical implementation, an intermediate data structure can be constructed to describe the execution path, for example:
[0091] ExecutionPlan {
[0092] nodes: [
[0093] { nodeId: "DataValidationNode", parallelGroup: 1},
[0094] { nodeId: "DesensitizationNode", parallelGroup: 1},
[0095] { nodeId: "RiskControlNode", parallelGroup: 2} ]
[0097] dependencies: {
[0098] "RiskControlNode" depends on ["DataValidationNode"]
[0099] }
[0100] }
[0101] The `parallelGroup` is used to identify nodes that can be executed in parallel. Based on the node's attribute identifier, the target nodes for parallel execution can be determined, and the execution order of the target nodes can be adjusted. It can be seen that the process of determining this execution path is not a fixed procedure, but rather generated in real-time for the current user task. The corresponding execution order is defined before execution, ensuring the accuracy and reliability of subsequent execution.
[0102] Based on the above embodiments, according to the determined execution paths, each node is distributed to multiple distributed execution nodes. The status of each execution node is periodically maintained, for example:
[0103] ExecutorNode {
[0104] nodeId: String
[0105] currentLoad: Float
[0106] activeTasks: Integer
[0107] status: "AVAILABLE"
[0108] }
[0109] Based on the above information, nodes in the execution path can be allocated. Subsequently, the scheduling module sends the node execution instructions to the corresponding execution nodes and generates a unique execution identifier for each node for subsequent status tracking.
[0110] For example:
[0111] select executorNode
[0112] where executorNode.status == AVAILABLE
[0113] order by executorNode.currentLoad asc
[0114] limit 1.
[0115] Here, executorNode.status represents the status indicator of the currently executing node.
[0116] In practical implementation, the execution process of each of the above target execution nodes includes:
[0117] The task processing process is executed by calling the task processing plugin adapted to the target execution node. Before calling the task processing plugin, the target execution node is idempotently checked based on the execution identifier representing the execution status. By designing the execution nodes of the workflow as a pluggable structure, different business logics can be quickly integrated or replaced through a unified interface, enabling the system to be reused in multiple business domains and possessing high scalability and cross-scenario adaptability.
[0118] Specifically, corresponding pluggable business execution modules can be loaded based on the node type. Plugg modules can use a unified interface definition, as shown in the following diagram:
[0119] WorkflowNodePlugin {
[0120] execute(TaskContext context): NodeResult
[0121] }
[0122] Before calling a plugin, the execution node can perform idempotency checks based on the execution identifier to avoid multiple executions of business logic due to repeated scheduling.
[0123] After the plugin completes execution, it returns the node execution result, for example:
[0124] NodeResult {
[0125] nodeId: String
[0126] status: "SUCCESS" | "FAIL"
[0127] outputData: {...}
[0128] }
[0129] And generate corresponding node state change events. The executing node can publish its execution results via the event bus, and these results can be stored in the aforementioned cache database, thereby controlling the switching of execution nodes. Specifically, controlling the execution process of each target executing node includes:
[0130] The system identifies the current execution status of the target execution node. When the current execution status indicates completion or success, it starts the node adjacent to the current target execution node in the execution path that was executed later than the current target execution node. Subsequent rule conditions are re-evaluated based on the latest status in the cache database. For example, the risk control node is only allowed to be triggered when the data verification node returns a success status. By statistically analyzing the execution status of each target execution node in the status cache database, and determining that there are no unexecuted target execution nodes, the execution results of each target execution node are statistically analyzed and compiled.
[0131] In other words, when the status flags of each execution node in the cache database indicate that no subsequent triggerable nodes exist, the workflow is considered complete. The execution results of each node are then aggregated to generate the final workflow result. This result is returned to the upper-layer business system via interface responses, event notifications, callbacks, etc. Because the scheduling mechanism and rule logic support distributed multi-node collaboration, task processing capacity can be linearly increased by dynamically expanding the number of execution nodes, effectively addressing the performance requirements of high-concurrency, large-scale task scenarios. Furthermore, based on rule analysis of the runtime context, only nodes relevant to the current task are selected for execution, automatically skipping irrelevant steps, achieving real-time pruning of the workflow path, thereby reducing unnecessary calculations and scheduling and improving overall execution efficiency.
[0132] In some embodiments, to facilitate user adjustments to the workflow, the process of obtaining the above-mentioned task encapsulation data includes:
[0133] The task description data entered by the user in the workflow control interface is filled into the preset format task template according to the data item correspondence to obtain the task encapsulation data.
[0134] Specifically, a task configuration interface can be displayed within the workflow control interface. This interface presents various task context data items (such as the JSON-formatted task encapsulation data shown above) with different options. Users can select options from dropdown menus for each data item or fill in text. After selecting the data items, clicking the "Generate" button on the interface will generate the task encapsulation data.
[0135] It is understood that those skilled in the art may use other configuration methods to generate task data, and no restrictions are imposed here.
[0136] This workflow control method can completely decouple the rule layer, scheduling layer and execution layer. When needed, it can increase processing capacity through node expansion, ensure high system availability through fault recovery mechanism, and does not require modification of the core framework when expanding business, demonstrating excellent sustainable scalability.
[0137] The above describes a workflow control method provided by an embodiment of this application. The following describes the apparatus for executing the above workflow control method.
[0138] Please see Figure 3 , Figure 3 This is a schematic diagram of a workflow control device provided in an embodiment of this application. Figure 3 As shown, the workflow control device includes:
[0139] The task data acquisition module 301 is used to acquire the task encapsulation data that triggers the start of the workflow in response to the workflow trigger signal;
[0140] The task data parsing module 302 is used to parse the task encapsulation data according to the rule parsing strategy to obtain the starting node of the workflow and the execution path containing the starting node.
[0141] The execution node allocation module 303 is used to determine the target execution node corresponding to each node in the execution path based on the correspondence between path nodes and execution nodes; and,
[0142] The execution node control module 304 is used to determine the execution status of each target execution node from the status cache database according to the node identifier of each target execution node, and to control the execution process of each target execution node according to the execution status and the execution order of each node in the execution path.
[0143] In one possible implementation, the task data parsing module 302 parses the task encapsulation data according to a rule parsing strategy to obtain the workflow's starting node and the execution path containing the starting node, including:
[0144] Extract the task description field from the task context data of the task encapsulation data, and determine the starting node by matching the rule conditions based on the task description field;
[0145] Based on the fields in the task context data other than the task description field, other nodes are identified, and the execution path is determined according to the order of execution.
[0146] In one possible implementation, it also includes an execution order adjustment module, which is used to determine the target nodes for parallel execution based on the node attribute identifiers of each node on the execution path, and adjust the execution order of the target nodes.
[0147] In one possible implementation, the execution process of each target execution node in the task data parsing module 302 includes:
[0148] The task processing process is executed by calling the task processing plugin adapted to the target execution node. Before calling the task processing plugin, the target execution node is checked for idempotency based on the execution identifier that represents the execution status.
[0149] In one possible implementation, the execution node control module 304 determines the execution status of each target execution node from the status cache database based on the node identifier of each target execution node, and controls the execution process of each target execution node according to the execution status and the execution order of each node in the execution path, including:
[0150] The current execution status of the current target execution node is identified. When the current execution status indicates that the execution has ended or succeeded, the node in the execution path that is adjacent to the current target execution node and whose execution time is later than the current target execution node is started.
[0151] In one possible implementation, the process of acquiring task encapsulated data in task data acquisition module 301 includes:
[0152] The task description data entered by the user in the workflow control interface is filled into the preset format task template according to the data item correspondence to obtain the task encapsulation data.
[0153] In one possible implementation, the execution node control module 304 is also used to statistically analyze the execution status of each target execution node in the state cache database, and when it is determined that there are no unexecuted target execution nodes, to statistically analyze and organize the execution results of each target execution node.
[0154] This application also provides an electronic device in its embodiments. (See reference...) Figure 4 The diagram illustrates a structural schematic suitable for implementing the electronic device in the embodiments of this application. The electronic device in the embodiments of this application may include, but is not limited to, fixed terminals such as laptops, tablets, desktop computers, etc. Figure 4 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0155] like Figure 4 As shown, the electronic device may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 402 or a program loaded from a storage device 408 into a random access memory (RAM) 403. When the electronic device is powered on, the RAM 403 also stores various programs and data required for the operation of the electronic device. The processing unit 401, ROM 402, and RAM 403 are interconnected via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.
[0156] Typically, the following devices can be connected to I / O interface 405: input devices 406 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 407 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 408 including, for example, memory cards, hard drives, etc.; and communication devices 409. Communication device 409 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 4 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have alternatively.
[0157] This application also provides a computer program product including computer-readable instructions, which, when executed on an electronic device, cause the electronic device to implement any of the workflow control methods provided in this application.
[0158] This application also provides a computer-readable storage medium that carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any of the workflow control methods provided in this application.
[0159] It should also be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. In addition, in the device embodiment drawings provided in this application, the connection relationship between modules indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines.
[0160] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware, or it can be implemented by special-purpose hardware including application-specific integrated circuits, special-purpose CPUs, special-purpose memory, special-purpose components, etc. Generally, any function performed by a computer program can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be diverse, such as analog circuits, digital circuits, or special-purpose circuits. However, for this application, software program implementation is more often the preferred implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, training equipment, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0161] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product.
[0162] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, training device, or data center to another website, computer, training device, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).
Claims
1. A workflow control method, characterized in that, include: In response to a workflow trigger signal, acquire the task encapsulation data that triggered the workflow startup; The task encapsulation data is parsed according to the rule parsing strategy to obtain the starting node of the workflow and the execution path containing the starting node; Based on the correspondence between path nodes and execution nodes, the target execution node corresponding to each node in the execution path is determined; The execution status of each target execution node is determined from the state cache database based on the node identifier of each target execution node, and the execution process of each target execution node is controlled according to the execution status and the execution order of each node in the execution path.
2. The workflow control method according to claim 1, characterized in that, The step of parsing the task encapsulation data according to the rule parsing strategy to obtain the starting node of the workflow and the execution path containing the starting node includes: The task description field is extracted from the task context data of the task encapsulation data, and the starting node is determined by matching the rule conditions based on the task description field. Based on the fields in the task context data other than the task description field, other nodes are identified, and the execution path is determined according to the order of execution.
3. The workflow control method according to claim 2, characterized in that, Also includes: Based on the node attribute identifiers of each node on the execution path, the target nodes for parallel execution are determined, and the execution order of the target nodes is adjusted.
4. The workflow control method according to claim 1, characterized in that, The execution process of each target execution node includes: The task processing process is executed by calling the task processing plugin adapted to the target execution node, and before calling the task processing plugin, the target execution node is idempotently verified according to the execution identifier that represents the execution state.
5. The workflow control method according to claim 1, characterized in that, The step of determining the execution status of each target execution node from the state cache database based on the node identifier of each target execution node, and controlling the execution process of each target execution node according to the execution status and the execution order of each node in the execution path, includes: The current execution status of the current target execution node is identified. When the current execution status indicates that the execution has ended or succeeded, the node in the execution path that is adjacent to the current target execution node and whose execution time is later than the current target execution node is started.
6. The workflow control method according to claim 1, characterized in that, The process of obtaining the task encapsulation data includes: The task description data entered by the user in the workflow control interface is filled into the task template in a preset format according to the data item correspondence to obtain the task encapsulation data.
7. The workflow control method according to any one of claims 1 to 6, characterized in that, Also includes: The execution status of each target execution node in the state cache database is statistically analyzed. When it is determined that there are no unexecuted target execution nodes, the execution results of each target execution node are statistically analyzed and organized.
8. A workflow control device, characterized in that, include: The task data acquisition module is used to acquire the task encapsulation data that triggers the workflow in response to the workflow trigger signal; The task data parsing module is used to parse the task encapsulation data according to the rule parsing strategy to obtain the starting node of the workflow and the execution path containing the starting node. The execution node allocation module is used to determine the target execution node corresponding to each node in the execution path based on the correspondence between path nodes and execution nodes; as well as, The execution node control module is used to determine the execution status of each target execution node from the status cache database according to the node identifier of each target execution node, and to control the execution process of each target execution node according to the execution status and the execution order of each node in the execution path.
9. An electronic device, characterized in that, It includes at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program to enable the electronic device to implement the workflow control method as described in any one of claims 1 to 7.
10. A computer storage medium, characterized in that, The storage medium carries one or more computer programs that, when executed by an electronic device, enable the electronic device to implement the workflow control method as described in any one of claims 1 to 7.