Workflow processing method, electronic equipment and storage medium

By independently managing process versions and node versions in the workflow framework, the problem of inflexible workflow modification in the existing technology is solved, and flexible changes and rapid deployment of process versions and node versions are achieved to adapt to frequent changes in business scenarios.

CN119556972APending Publication Date: 2025-03-04AGRICULTURAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411603909.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-11
Publication Date
2025-03-04

AI Technical Summary

Technical Problem

The existing workflow framework lacks flexibility in managing process versions and node versions, resulting in inflexible modification of workflows and difficulty in dealing with frequent changes in business scenarios.

Method used

The process version number of the workflow is determined through the process orchestration function, and the node version number of the target node is determined based on this version number. The target microservice is called to perform node tasks through the node interface management function, so as to realize independent management and changes of the process version and node version.

Benefits of technology

It realizes flexible changes in process versions and node versions without interfering with each other, quickly deploys new version node functions, effectively manages workflow process version iterations, and adapts to business scenarios where workflow changes frequently.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119556972A_ABST
    Figure CN119556972A_ABST
Patent Text Reader

Abstract

The invention discloses a workflow processing method, electronic equipment and a storage medium, and the method comprises the steps: determining a flow version number of a workflow through a flow arrangement function when a business main application initiates the workflow; determining at least two target nodes corresponding to the workflow based on the flow version number; determining a node version number corresponding to each target node through a node interface management function, and calling a target micro-service based on a target interface corresponding to the node version number so as to execute a node task of the target node based on the target micro-service; and obtaining a task execution result after the node task of each target node is executed, and determining a processing result of the workflow based on the task execution result. In the embodiment of the invention, the flow arrangement and the node task execution are decoupled, the flexible change of the flow version and the node version does not interfere with each other, the new version node function is quickly deployed, the workflow flow version iteration is effectively managed, and the service scene with frequent workflow change is coped with.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of software technology, and in particular to a workflow processing method, electronic equipment and storage medium. Background Art

[0002] Many office systems developed based on web servers involve process-based business processing. Complex or changeable processes are usually developed using a workflow framework. A workflow framework is a software development framework for web servers. The software development framework provides and implements the most basic software architecture and system. Software developers usually implement more complex business applications and business logic based on a specific framework. When using a workflow framework for development, we can abstract the business rules between the workflow and its various operation steps, and use code to implement the functions actually required. The needs of process-based business processing can also be achieved without using a workflow framework, but the code lacks organization, making development, maintenance, and subsequent functional expansion difficult.

[0003] Different workflow frameworks may have different abstractions for workflows and business rules, but they usually include two concepts: processes and nodes. When a user initiates a process in the system, the system will create a process instance of this type based on the pre-defined workflow process. The workflow process represents a definition of a process, while the process instance is the data corresponding to an actual process. After a process is initiated, the logic of the start node of the process will be executed, and after the execution is completed, it will enter the next node until it reaches the end node or the process ends due to other reasons. Among them, different nodes can realize different functions, which are usually a link in the process.

[0004] In the actual use of workflows, the same workflow sometimes needs to be adjusted according to business needs. At this time, there are often process instances of the process being executed. Directly modifying the existing process may affect the execution of the existing process instance, so version management is required. In the current mainstream workflow framework, the process and nodes are in the same application, and the version of the entire process is defined in the form of a bpmn file. Any modification is regarded as a modification of the process version, so the version number needs to be modified. The existing workflow framework manages the process and nodes as a whole, which is not flexible enough. Summary of the invention

[0005] The present invention provides a workflow processing method, electronic device and storage medium to achieve flexible changes of process versions and node versions without interfering with each other, quickly deploy new version node functions, effectively manage workflow process version iterations, and cope with business scenarios with frequent workflow changes.

[0006] According to one aspect of the present invention, a method for processing a workflow is provided, comprising:

[0007] When the business main application initiates a workflow, the process version number of the workflow is determined through the process orchestration function;

[0008] Determine at least two target nodes corresponding to the workflow based on the workflow version number;

[0009] For each of the target nodes, determine the node version number corresponding to the target node through the node interface management function, and call the target microservice based on the target interface corresponding to the node version number to execute the node task corresponding to the target node based on the target microservice;

[0010] After the node task corresponding to each target node is executed, a task execution result is obtained, and a processing result of the workflow is determined based on the task execution result.

[0011] In a possible implementation, determining the process version number of the workflow through a process orchestration function includes: determining a candidate process version number of the latest version corresponding to the workflow through a process orchestration function, and determining the candidate process version number as the process version number of the workflow.

[0012] In one possible implementation, determining at least two target nodes corresponding to the workflow based on the process version number includes: determining the process version information corresponding to the process version number based on the process version number, and determining the target node based on the process version information; wherein the process information includes the target nodes corresponding to the workflow and the execution order of the target nodes.

[0013] In a possible implementation, determining the node version number corresponding to the target node through a node interface management function includes: determining the latest candidate node version number corresponding to the target node as the node version number corresponding to the target node through the node interface management function.

[0014] In one possible implementation, the method further includes: when receiving a modification operation on the workflow, determining an operation type corresponding to the modification operation; based on the operation type, modifying the process version number corresponding to the workflow or the node version number corresponding to the target node to obtain a process revision number or a node revision number; and when the workflow is called next time, processing the workflow based on the process revision number or the node revision number.

[0015] In a possible implementation, if the modification operation type is a node orchestration change, the method includes: modifying the orchestration of the target node in the workflow based on the modification operation, and generating a process revision number corresponding to the workflow; wherein the node orchestration change includes at least one of adding an existing node, deleting a node, and adjusting the node execution order.

[0016] In a possible implementation, if the modification operation type is a node function change, the method further includes: determining, according to the modification operation, a target node of a function to be changed in the workflow as a node to be modified;

[0017] Modify the target interface corresponding to the node to be modified to a revised interface, and deploy a microservice corresponding to the revised interface; generate a node revision number, and register the revised interface through the node interface management function, wherein the node revision number is used to call the revised interface.

[0018] In one possible implementation, after obtaining the process revision number or the node revision number, the method further includes: if it is determined that the process revision number or the node revision number is effective, determining that the status of the process version number and the node version number corresponding to the workflow is that no new instances will be added; when the last instance in the workflow corresponding to the process version number and the node version number is executed, determining the status of the process version number and the node version number as disabled.

[0019] According to another aspect of the present invention, there is provided a workflow processing device, comprising:

[0020] A process version determination module is used to determine the process version number of the workflow through the process orchestration function when the business main application initiates the workflow;

[0021] A target node determination module, used to determine at least two target nodes corresponding to the workflow based on the process version number;

[0022] A node task execution module is used to determine, for each of the target nodes, the node version number corresponding to the target node through the node interface management function, and call the target microservice based on the target interface corresponding to the node version number, so as to execute the node task corresponding to the target node based on the target microservice;

[0023] The processing result determination module is used to obtain the task execution result after the node task corresponding to each target node is executed, and determine the processing result of the workflow based on the task execution result.

[0024] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0025] at least one processor;

[0026] and a memory communicatively connected to the at least one processor; wherein,

[0027] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the workflow processing method described in any embodiment of the present invention.

[0028] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the processing method of the workflow described in any embodiment of the present invention when executed.

[0029] The technical solution of the embodiment of the present invention includes: when the business main application initiates the workflow, the process version number of the workflow is determined through the process orchestration function; at least two target nodes corresponding to the workflow are determined based on the process version number; the node version number corresponding to each target node is determined through the node interface management function, and the target microservice is called based on the target interface corresponding to the node version number to execute the node task of the target node based on the target microservice; after the node task of each target node is executed, the task execution result is obtained, and the processing result of the workflow is determined based on the task execution result. In the embodiment of the present invention, the problem that the process and the node are managed as a whole in the prior art, and the process orchestration changes and the node function changes cannot be distinguished, resulting in inflexible modification of the workflow is solved. By decoupling the process orchestration from the node task execution, the flexible changes of the process version and the node version are realized without interfering with each other, the new version of the node function is quickly deployed, and the iteration of the workflow process version is effectively managed to cope with business scenarios with frequent workflow changes.

[0030] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0032] Figure 1A flowchart of a method for processing a workflow provided in Embodiment 1 of the present invention;

[0033] Figure 2 An architectural diagram of a workflow processing system provided in Embodiment 1 of the present invention;

[0034] Figure 3 A flowchart of a method for processing a workflow provided in Embodiment 2 of the present invention;

[0035] Figure 4 A schematic diagram of the full life cycle management of a workflow version from creation to final deactivation provided in the second embodiment of the present invention;

[0036] Figure 5 A schematic diagram of the structure of a workflow processing device provided in Embodiment 3 of the present invention;

[0037] Figure 6 This is a schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present invention. DETAILED DESCRIPTION

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

[0039] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0040] To facilitate understanding of the technical solutions of the embodiments of the present invention, some of the terms involved in the embodiments of the present invention are first explained below.

[0041] Give a brief introduction.

[0042] Workflow: Workflow refers to a type of business process that can be fully automatically executed. According to a series of process rules, documents, information or tasks are transferred and executed between different executors. The workflow framework is an encapsulation of workflow logic. We use this framework to develop applications that can be completed by multiple people, multiple departments, and multiple links in a collaborative manner.

[0043] Microservices: Split a monolithic application into multiple relatively independent services, each with its own independent process, and interact with each other through lightweight communication mechanisms. These services can be deployed and maintained independently.

[0044] Process: A work that can be divided into multiple processing links with an execution order between the links. For example, a simple car application workflow process can be divided into four links: application submission, department approval, vehicle dispatch, and vehicle feedback. The actual workflow process can be more complex, with multiple links constituting a process that can be represented by a directed graph.

[0045] Node: Each link in the workflow process can be regarded as a node.

[0046] Process instance: An actual execution of a workflow process.

[0047] Embodiment 1

[0048] Figure 1 This is a flowchart of a workflow processing method provided in the first embodiment of the present invention. This embodiment is applicable to workflow arrangement. The method can be executed by a workflow processing device. The device can be implemented in the form of hardware and / or software. The device can be configured in a computer device. Figure 1 As shown, the method comprises the following steps:

[0049] S110. When the business main application initiates a workflow, the process version number of the workflow is determined through the process orchestration function.

[0050] In the embodiment of the present invention, the service main application can be understood as an application for executing user services, and the service main application can be a client. Figure 2 As shown, it is an architecture diagram of a workflow processing system provided in Embodiment 1 of the present invention. Among them, the process orchestration function and the node interface management function can be located in the main business application, and the function of executing the node task corresponding to the workflow is deployed in a microservice manner, for example, deployed in the form of microservices on the server side, and the node tasks of each node in the workflow are executed through the microservices on the server side.

[0051] A workflow contains multiple nodes. When arranging the process, the execution order of the node tasks corresponding to each node will be determined. The workflow has a process version number, and each node has a node version number.

[0052] In an embodiment of the present invention, determining the process version number of the workflow through the process orchestration function may include: determining a candidate process version number of the latest version corresponding to the workflow through the process orchestration function, and determining the candidate process version number as the process version number of the workflow.

[0053] It should be noted that a workflow can correspond to multiple candidate process version numbers, and the execution of the workflow based on different candidate process version numbers may also be different. For example, when the workflow is "car application", its corresponding candidate process version 1 includes three links: application submission, department approval, and vehicle dispatch, while candidate process version 2 includes four links: application submission, department approval, vehicle dispatch, and vehicle feedback.

[0054] Therefore, when a workflow is initiated in the main business application, the process orchestration function can be used to determine multiple candidate process version numbers corresponding to the workflow. In order to better meet the business needs corresponding to the workflow, the candidate process version number can be used to determine which candidate process version corresponds to the first version. Once determined, the latest candidate process version number can be used as the process version number of the workflow, and the candidate process version corresponding to the process version number can be executed during the actual execution process.

[0055] S120. Determine at least two target nodes corresponding to the workflow based on the process version number.

[0056] In an embodiment of the present invention, determining at least two target nodes corresponding to the workflow based on the process version number includes: determining process version information corresponding to the process version number based on the process version number, and determining the target node based on the process version information.

[0057] The process information includes the target nodes corresponding to the workflow and the execution order of the target nodes.

[0058] It is understandable that a workflow usually includes multiple links, each link is a target node. After the process version number is determined, the corresponding process version information can be found according to the process version number. The process version information is used to describe the process version corresponding to the process version number, and specifically can describe which target nodes correspond to it, and the execution order between the target nodes. For example, the target nodes include node A, node B, and node C, and the execution order is node A->node B->node C. Therefore, based on the process version number, at least two target nodes corresponding to the workflow can be determined.

[0059] S130. For each target node, determine the node version number corresponding to the target node through the node interface management function, and call the target microservice based on the target interface corresponding to the node version number to execute the node task corresponding to the target node based on the target microservice.

[0060] Among them, the node interface management function is used to manage the mapping relationship from the target node to the node task interface, and the node task interface can be a microservice interface for executing the node task of the target node.

[0061] In some possible application scenarios, node a can correspond to multiple candidate node version numbers. When the candidate node version number of node a is v1, its corresponding node task interface is \a\v1; when the candidate node version number of node a is v2, its corresponding node task interface is \a\v2. Task interfaces of different versions can be deployed to microservices at the same time.

[0062] Accordingly, when the workflow is transferred to the target node, since there can be multiple candidate node version numbers corresponding to the target node, the task interfaces corresponding to different candidate node version numbers are also different, and the specific tasks that can be performed by different task interfaces are also different. Therefore, the node version number actually required by the target node can be determined through the node interface management function, and the corresponding target interface can be determined based on the node version number.

[0063] In this embodiment, determining the node version number corresponding to the target node through the node interface management function may include: determining the latest candidate node version number corresponding to the target node as the node version number corresponding to the target node through the node interface management function. This ensures that when executing the business, the target interface is used through the latest node version number to ensure the correct execution of the business and conform to the latest business scenario. S140. After the node task corresponding to each target node is executed, the task execution result is obtained, and the processing result of the workflow is determined based on the task execution result.

[0064] Specifically, when the main business application initiates a workflow, it will obtain the latest version of the process according to the process arrangement, and flow through each node in the process in turn. When flowing through the corresponding node, the node will be mapped to the latest version of the interface of the corresponding node through the node interface management function, and the corresponding interface will be called through the http request to execute the node task, and receive the task execution result, and finally obtain the processing result of the workflow.

[0065] The technical solution of the embodiment of the present invention includes: when the business main application initiates the workflow, the process version number of the workflow is determined through the process orchestration function; at least two target nodes corresponding to the workflow are determined based on the process version number; the node version number corresponding to each target node is determined through the node interface management function, and the target microservice is called based on the target interface corresponding to the node version number to execute the node task of the target node based on the target microservice; after the node task of each target node is executed, the task execution result is obtained, and the processing result of the workflow is determined based on the task execution result. In the embodiment of the present invention, the problem that the process and the node are managed as a whole in the prior art, and the process orchestration changes and the node function changes cannot be distinguished, resulting in inflexible modification of the workflow is solved. By decoupling the process orchestration from the node task execution, the flexible changes of the process version and the node version are realized without interfering with each other, the new version of the node function is quickly deployed, and the iteration of the workflow process version is effectively managed to cope with business scenarios with frequent workflow changes.

[0066] Embodiment 2

[0067] Figure 3 This is a flowchart of a workflow processing method provided in the second embodiment of the present invention. Based on the above embodiment, this embodiment further specifies the modification of the workflow. The specific implementation method can refer to the technical solution of this embodiment. Among them, the technical terms that are the same or corresponding to the above embodiment are not repeated here. Figure 3 As shown, the method includes:

[0068] S210: When receiving a modification operation on the workflow, determine the operation type corresponding to the modification operation.

[0069] In this embodiment, the business in the business main application may change at any time. In order to meet the business changes, the workflow can be modified. Specifically, the workflow can be modified through the workflow orchestration function, such as modifying the execution sequence of each node in the workflow, or the function of a node. At this time, the modification operation can be analyzed to determine the operation type.

[0070] S220. Modify the process version number corresponding to the workflow or the node version number corresponding to the target node according to the operation type to obtain a process revision number or a node revision number.

[0071] The process revision number refers to the new process version number obtained after the mid-node arrangement of the workflow is changed.

[0072] In some embodiments, modifications to the workflow can be divided into two categories: one is to only change the arrangement of nodes in the process without changing the functions of the nodes, and such changes include adjusting the execution order of the nodes, adding or deleting existing nodes in the process, etc. For example, the original process is "node A->node B->node C", which may be adjusted to "node A->node C->node B", or node B may be deleted and a new node D may be added.

[0073] The other type is to change the function of a node, or to add a new node that did not exist before. This type of change involves changes in the logic or function of the node task execution. For example, the function of node A is changed from "data entry" to "data verification", or a new node E is added for "data backup".

[0074] In one achievable manner, if the modification operation type is a node orchestration change, the orchestration of the target node in the workflow can be modified based on the modification operation, and a process revision number corresponding to the workflow can be generated.

[0075] The node arrangement change includes at least one of adding an existing node, deleting a node, and adjusting the node execution order.

[0076] Specifically, node orchestration changes refer to adjusting the execution order, quantity, or relationship of nodes in a process without changing the node function. Such changes usually do not affect the microservices that execute node tasks, but only involve modifications to the process orchestration function in the main application. Modifying the process orchestration creates a new version of the process and increments the process version number, i.e., the process revision number.

[0077] In another feasible method, if the modification operation type is a node function change, the target node of the function to be changed in the workflow can be determined as the node to be modified according to the modification operation; the target interface corresponding to the node to be modified is modified to a revised interface, and the microservice corresponding to the revised interface is deployed; the node revision number is generated, and the revised interface is registered through the node interface management function.

[0078] The node revision number is used to call the revision interface.

[0079] Specifically, node function change means changing the function of a node or adding a node that did not exist before. This type of change requires modifying the interface code of the node execution service and redeploying the microservice. At the same time, the new version of the node interface needs to be registered in the node interface management function of the main application to ensure that the new process instance can correctly execute the corresponding node task.

[0080] In one implementation, to change a node function or add a node that did not exist before, it is necessary to modify the interface code of the node execution service and redeploy the microservice. When adding a node that did not exist before, a node interface needs to be added and the node version number is assigned an initial value. When changing the function of an existing node, if it is a node that has never been effective, the interface of the existing node version can be directly modified. Otherwise, a new version of the node interface needs to be added and a new node version number needs to be assigned.

[0081] Through the node interface management function, the system can flexibly handle different versions of interfaces, support the registration of new interfaces and the update of old interfaces, and provide convenience for business iteration and upgrade.

[0082] The technical solution of the embodiment of the present invention can realize flexible changes to the workflow process version and node version through version management without interfering with each other. This helps to quickly deploy new version node functions, effectively manage the iteration of workflow process versions, and cope with business scenarios with frequent workflow changes.

[0083] S230. When the workflow is called next time, the workflow is processed based on the process revision number or the node revision number.

[0084] Specifically, when the workflow is used next time, it can be executed according to the modified version.

[0085] In an embodiment of the present invention, after obtaining the process revision number or the node revision number, it also includes: if it is determined that the process revision number or the node revision number is effective, then the status of the process version number and the node version number corresponding to the workflow is determined to be no longer a new instance; when the last instance in the workflow corresponding to the process version number and the node version number is executed, the status of the process version number and the node version number is determined to be disabled.

[0086] like Figure 4 As shown, it is a schematic diagram of the whole life cycle management of the workflow version from creation to final deactivation provided by the second embodiment of the present invention. The whole life cycle of a workflow version in the system includes four process states: not effective, effective, no new instances added, and deactivated. By managing these states, the reasonable transition of process versions and the effective use of resources can be ensured.

[0087] First, the process administrator creates a workflow without a version number. At this time, the process is in an ineffective state and the process arrangement can be modified at will. Each node deployment in the process is assigned an initial version number and deployed in the microservice. Since each node will not be executed before the process takes effect, it can be modified and redeployed at will.

[0088] When the process administrator activates the corresponding process, the system generates a latest version number for the process and makes it effective. At this time, the version number of each node is the initial version number.

[0089] After the process takes effect, it may be modified according to business needs. If the modification does not involve the modification of process arrangement and only the node function is modified, the process version will not be changed. A new version interface of the corresponding node will be added to the microservice and the microservice will be redeployed. Then the new version node interface will be registered to the main application node interface management function. When the new process instance is executed to the corresponding node, the latest node version interface will be obtained to execute the node task.

[0090] If you only modify the process arrangement, such as adding existing nodes to the process, deleting nodes, or adjusting the node order, an updated version will be created and put into effect with the modified process. The new version of the process will cause the old version of the process to enter a process state where no new instances are added. In this state, when the user initiates the process to create a process instance, the latest version of the process will be automatically used, and the old version of the process will still flow according to the original process. Modifying the node function or modifying the process arrangement will not affect the executing process instance, only the new process instance.

[0091] Finally, when the last instance of the old version of the process ends, the system changes the status of the old version of the process from no new instances to deactivated. The above process constitutes the full life cycle of a workflow process version in the system.

[0092] The technical solution of the embodiment of the present invention deploys the workflow process orchestration function on the main application, and deploys each node task execution function in the form of microservices. When the process in the main application proceeds to the corresponding node, the microservice interface is called according to certain rules to execute the corresponding node task. When the node orchestration of the workflow process is changed, only the corresponding process and process version number in the main application are modified. When the node function is changed, only part of the microservice application needs to be redeployed, and the corresponding node version is registered in the main application, so that the node task version can be changed without affecting the main application and the existing process instance. It solves the problem that the process and the node are managed as a whole in the prior art, and the process orchestration changes and node function changes cannot be distinguished, resulting in inflexible modification of the workflow. It realizes flexible changes of the process version and the node version without interfering with each other, quickly deploys the new version of the node function, effectively manages the iteration of the workflow process version, and copes with business scenarios with frequent workflow changes.

[0093] By managing the life cycle of the process version, including four states: not effective, effective, no new instances, and deactivated, the problem of directly modifying the existing process in actual use of the workflow may affect the execution of the existing process instance is avoided.

[0094] Embodiment 3

[0095] Figure 5 This is a schematic diagram of the structure of a workflow processing device provided in Embodiment 3 of the present invention. Figure 5 As shown, the device comprises:

[0096] A process version determination module 310 is used to determine the process version number of the workflow through the process orchestration function when the business main application initiates the workflow;

[0097] A target node determination module 320, configured to determine at least two target nodes corresponding to the workflow based on the workflow version number;

[0098] The node task execution module 330 is used to determine the node version number corresponding to the target node through the node interface management function for each target node, and call the target microservice based on the target interface corresponding to the node version number to execute the node task corresponding to the target node based on the target microservice;

[0099] The processing result determination module 340 is used to obtain the task execution result after the node task corresponding to each target node is executed, and determine the processing result of the workflow based on the task execution result.

[0100] The technical solution of the embodiment of the present invention includes: when the business main application initiates the workflow, the process version number of the workflow is determined through the process orchestration function; at least two target nodes corresponding to the workflow are determined based on the process version number; the node version number corresponding to each target node is determined through the node interface management function, and the target microservice is called based on the target interface corresponding to the node version number to execute the node task of the target node based on the target microservice; after the node task of each target node is executed, the task execution result is obtained, and the processing result of the workflow is determined based on the task execution result. In the embodiment of the present invention, the problem that the process and the node are managed as a whole in the prior art, and the process orchestration changes and the node function changes cannot be distinguished, resulting in inflexible modification of the workflow is solved. By decoupling the process orchestration from the node task execution, the flexible changes of the process version and the node version are realized without interfering with each other, the new version of the node function is quickly deployed, and the iteration of the workflow process version is effectively managed to cope with business scenarios with frequent workflow changes.

[0101] Based on the above technical solution, the process version determination module 310 includes:

[0102] The process version determination unit is used to determine the candidate process version number of the latest version corresponding to the workflow through the process orchestration function, and determine the candidate process version number as the process version number of the workflow.

[0103] Based on the above technical solution, the target node determination module 320 includes:

[0104] A target node determination unit, configured to determine the process version information corresponding to the process version number based on the process version number, and determine the target node based on the process version information;

[0105] The process information includes the target nodes corresponding to the workflow and the execution order of the target nodes.

[0106] Based on the above technical solution, the node task execution module 330 includes:

[0107] The node version number determination unit is used to determine the latest candidate node version number corresponding to the target node as the node version number corresponding to the target node through the node interface management function.

[0108] On the basis of the above technical solution, the workflow processing device further includes a workflow modification module, which includes:

[0109] An operation type determination unit, configured to determine an operation type corresponding to the modification operation when receiving a modification operation on the workflow;

[0110] A version modification unit, used to modify the process version number corresponding to the workflow or the node version number corresponding to the target node according to the operation type, to obtain a process revision number or a node revision number;

[0111] The workflow processing unit is used to process the workflow based on the workflow revision number or the node revision number when the workflow is called next time.

[0112] Based on the above technical solution, the version modification unit is specifically used to:

[0113] If the modification operation type is node arrangement change, the arrangement of the target node in the workflow is modified based on the modification operation, and a process revision number corresponding to the workflow is generated;

[0114] The node arrangement change includes at least one of adding an existing node, deleting a node, and adjusting the node execution order.

[0115] On the basis of the above technical solution, the version modification unit is further used to:

[0116] If the modification operation type is a node function change, the target node of the function to be changed in the workflow is determined as the node to be modified according to the modification operation;

[0117] Modify the target interface corresponding to the node to be modified to the revised interface, and deploy the microservice corresponding to the revised interface;

[0118] Generate a node revision number, and register the revision interface through the node interface management function, wherein the node revision number is used to call the revision interface.

[0119] On the basis of the above technical solution, the workflow processing device further includes a version status determination module, which is used to:

[0120] After obtaining the process revision number or the node revision number, if it is determined that the process revision number or the node revision number is effective, the state of the process version number and the node version number corresponding to the workflow is determined to be that no new instances will be added;

[0121] When the last instance in the workflow corresponding to the process version number and the node version number is executed, the status of the process version number and the node version number is determined to be deactivated.

[0122] The workflow processing device provided in the embodiment of the present invention can execute the workflow processing method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0123] Embodiment 4

[0124] Figure 6 A schematic diagram of the structure of an electronic device provided for Embodiment 4 of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0125] like Figure 6 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0126] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0127] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a processing method for a workflow.

[0128] In some embodiments, the processing method of the workflow may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the processing method of the workflow described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the processing method of the workflow in any other appropriate manner (e.g., by means of firmware).

[0129] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0130] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0131] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0132] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0133] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0134] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0135] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0136] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for processing a workflow, characterized in that: include: When the business main application initiates a workflow, the process version number of the workflow is determined through the process orchestration function; Determine at least two target nodes corresponding to the workflow based on the workflow version number; For each of the target nodes, determine the node version number corresponding to the target node through the node interface management function, and call the target microservice based on the target interface corresponding to the node version number to execute the node task corresponding to the target node based on the target microservice; After the node task corresponding to each target node is executed, a task execution result is obtained, and a processing result of the workflow is determined based on the task execution result.

2. The method according to claim 1, characterized in that Determining the process version number of the workflow through the process orchestration function includes: The candidate process version number of the latest version corresponding to the workflow is determined through the process orchestration function, and the candidate process version number is determined as the process version number of the workflow.

3. The method according to claim 1, characterized in that The determining at least two target nodes corresponding to the workflow based on the process version number includes: Determine the process version information corresponding to the process version number based on the process version number, and determine the target node based on the process version information; The process information includes the target nodes corresponding to the workflow and the execution order of the target nodes.

4. The method according to claim 2, characterized in that: The determining the node version number corresponding to the target node through the node interface management function includes: The node interface management function determines the latest candidate node version number corresponding to the target node as the node version number corresponding to the target node.

5. The method according to claim 1, characterized in that The method further comprises: When receiving a modification operation on the workflow, determining an operation type corresponding to the modification operation; According to the operation type, modify the process version number corresponding to the workflow or the node version number corresponding to the target node to obtain a process revision number or a node revision number; When the workflow is called next time, the workflow is processed based on the workflow revision number or the node revision number.

6. The method according to claim 5, characterized in that If the modification operation type is a node arrangement change, the method includes: Modify the arrangement of the target node in the workflow based on the modification operation, and generate a workflow revision number corresponding to the workflow; The node arrangement change includes at least one of adding an existing node, deleting a node, and adjusting the node execution order.

7. The method according to claim 5, characterized in that If the modification operation type is a node function change, the method further includes: Determine, according to the modification operation, a target node of the function to be changed in the workflow as a node to be modified; Modify the target interface corresponding to the node to be modified into a revised interface, and deploy the microservice corresponding to the revised interface; A node revision number is generated, and the revision interface is registered through the node interface management function, wherein the node revision number is used to call the revision interface.

8. The method according to claim 5, characterized in that After obtaining the process revision number or the node revision number, the method further includes: If it is determined that the process revision number or the node revision number is effective, then the state of the process version number and the node version number corresponding to the workflow is determined to be that no new instances will be added; When the last instance in the workflow corresponding to the process version number and the node version number is executed, the status of the process version number and the node version number is determined to be disabled.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for processing the workflow according to any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the processing method of the workflow described in any one of claims 1 to 8 when executed.