Search

CN-121998399-A - Workflow control method and related device

CN121998399ACN 121998399 ACN121998399 ACN 121998399ACN-121998399-A

Abstract

The application discloses a workflow control method and a related device, relates to the field of automatic control, and can respond to workflow trigger signals to acquire task encapsulation data for triggering workflow start. And analyzing the task package data according to the rule analysis strategy to obtain a workflow execution path containing the starting node. And determining a target execution node corresponding to each node in the execution path according to the corresponding relation between the path nodes and the execution nodes. Determining the execution state of each target execution node from the state cache database according to the node identification of each target execution node, and controlling the execution process of each target execution node according to each execution state and the execution sequence of each node in the execution path. The implementation path of the workflow is independent of a fixed flow chart, and when the business flow changes, a user can immediately take effect by only updating corresponding task data without redesigning and deploying a flow structure, so that iteration and maintenance cost is greatly reduced, and efficiency is improved.

Inventors

  • BIAN YONG
  • HUANG MINGBAO
  • Cheng shijia
  • SHI PANPAN

Assignees

  • 帆软软件有限公司

Dates

Publication Date
20260508
Application Date
20260128

Claims (10)

  1. 1. A workflow control method, comprising: responding to a workflow trigger signal, and acquiring task packaging data for triggering workflow start; analyzing the task package data according to a rule analysis strategy to obtain an initial node of the workflow and an execution path containing the initial node; determining a target execution node corresponding to each node in the execution path according to the corresponding relation between the path node and the execution node; Determining the execution state of each target execution node from a state cache database according to the node identification of each target execution node, and controlling the execution process of each target execution node according to each execution state and the execution sequence of each node in the execution path.
  2. 2. The workflow control method of claim 1, wherein parsing the task package data according to a rule parsing policy results in a start node of the workflow and an execution path including the start node, comprising: Extracting a task description field from task context data of the task encapsulation data, and performing rule condition matching according to the task description field to determine the starting node; And determining other nodes according to fields except the task description field in the task context data, and determining the execution path according to the execution sequence.
  3. 3. The workflow control method of claim 2, further comprising: And determining the target nodes which are executed in parallel according to the node attribute identifiers of the nodes on the execution path, and adjusting the execution sequence of the target nodes.
  4. 4. The workflow control method of claim 1, wherein the execution of each of the target execution nodes comprises: And calling a task processing plug-in unit adapted to the target execution node to execute a task processing process, and performing idempotent verification on the target execution node according to an execution identifier representing the execution state before calling the task processing plug-in unit.
  5. 5. The workflow control method of claim 1, wherein determining the execution state of each of the target execution nodes from the state cache database according to the node identification of each of the target execution nodes, and controlling the execution process of each of the target execution nodes according to each of the execution states and the execution order of each of the nodes in the execution path, comprises: And identifying the current execution state of the current target execution node, and starting the node adjacent to the current target execution node in the execution path and having the execution time later than that of the current target execution node when the representation execution of the current execution state is finished or successful.
  6. 6. The workflow control method of claim 1, wherein the task package data acquisition process comprises: And filling task description data input by a user in a workflow control interface into a task template in a preset format according to the corresponding relation of data items to obtain the task packaging data.
  7. 7. The workflow control method of any one of claims 1 to 6, further comprising: And counting the execution state of each target execution node in the state cache database, and counting and sorting the execution results of each target execution node when determining that no unexecuted target execution node exists.
  8. 8. A workflow control apparatus, comprising: The task data acquisition module is used for responding to the workflow trigger signal and acquiring task package data for triggering workflow start; the task data analysis module is used for analyzing the task package data according to a rule analysis strategy to obtain an initial node of the workflow and an execution path containing the initial node; an execution node distribution module for determining a target execution node corresponding to each node in the execution path according to the corresponding relation between the path nodes and the execution nodes, and And the execution node control module is used for determining the execution state of each target execution node from the state cache database according to the node identification of each target execution node, and controlling the execution process of each target execution node according to each execution state and the execution sequence of each node in the execution path.
  9. 9. An electronic device comprising at least one processor and a memory coupled to the processor, wherein: the memory is used for storing a computer program; the processor is configured to execute the computer program to enable the electronic device to implement the workflow control method of any one of claims 1 to 7.
  10. 10. A computer storage medium carrying one or more computer programs which, when executed by an electronic device, enable the electronic device to implement a workflow control method as claimed in any one of claims 1 to 7.

Description

Workflow control method and related device Technical Field The application relates to the technical field of automatic control, in particular to a workflow control method and a related device. Background The automatic workflow system is a flow execution scheme based on a software platform, and the core is to automatically execute repeated, fixed and multi-link business flows in enterprises according to preset rules and logic, so that manual intervention is reduced, and further, flow efficiency and standardization degree are improved. The existing automatic workflow system generally depends on a static flow chart or a fixed task arrangement mode, when the business logic is slightly changed, the flow chart, the release system and the like need to be redesigned, the process is tedious and complex, the efficiency is low, and the requirements cannot be met gradually. Disclosure of Invention In view of the above, the present application provides a workflow control method and related apparatus, so as to achieve the purposes of improving efficiency, reducing cost and complexity. The specific scheme is as follows: the first aspect of the present application provides a workflow control method, including: responding to a workflow trigger signal, and acquiring task packaging data for triggering workflow start; analyzing the task package data according to a rule analysis strategy to obtain an initial node of the workflow and an execution path containing the initial node; determining a target execution node corresponding to each node in the execution path according to the corresponding relation between the path node and the execution node; Determining the execution state of each target execution node from a state cache database according to the node identification of each target execution node, and controlling the execution process of each target execution node according to each execution state and the execution sequence of each node in the execution path. In one possible implementation, the parsing the task package data according to a rule parsing policy to obtain a start node of the workflow and an execution path including the start node includes: Extracting a task description field from task context data of the task encapsulation data, and performing rule condition matching according to the task description field to determine the starting node; And determining other nodes according to fields except the task description field in the task context data, and determining the execution path according to the execution sequence. In one possible implementation, the workflow control method further includes: And determining the target nodes which are executed in parallel according to the node attribute identifiers of the nodes on the execution path, and adjusting the execution sequence of the target nodes. In one possible implementation, the executing process of each target executing node includes: And calling a task processing plug-in unit adapted to the target execution node to execute a task processing process, and performing idempotent verification on the target execution node according to an execution identifier representing the execution state before calling the task processing plug-in unit. In one possible implementation, the determining, according to the node identifier of each target execution node, the execution state of each target execution node from a state cache database, and controlling, according to each execution state and the execution sequence of each node in the execution path, an execution process of each target execution node includes: And identifying the current execution state of the current target execution node, and starting the node adjacent to the current target execution node in the execution path and having the execution time later than that of the current target execution node when the representation execution of the current execution state is finished or successful. In one possible implementation, the task package data acquisition process includes: And filling task description data input by a user in a workflow control interface into a task template in a preset format according to the corresponding relation of data items to obtain the task packaging data. In one possible implementation, the workflow control method further includes: And counting the execution state of each target execution node in the state cache database, and counting and sorting the execution results of each target execution node when determining that no unexecuted target execution node exists. A second aspect of the present application provides a workflow control apparatus comprising: The task data acquisition module is used for responding to the workflow trigger signal and acquiring task package data for triggering workflow start; the task data analysis module is used for analyzing the task package data according to a rule analysis strategy to obtain an initial node of the workflow and an execution path containing the initial n