A process arrangement method, device, electronic device and storage medium

Through node selection and parameter configuration on the user interface, business processes are generated, and synchronous and asynchronous nodes are supported, which solves the problem that existing orchestration engines cannot adapt to diversified business processes and improves orchestration efficiency and availability.

CN117931167BActive Publication Date: 2025-02-25ZHIWEI XINGYI (SHANGHAI) INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410107817.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-25
Publication Date
2025-02-25
Estimated Expiration
2044-01-25

AI Technical Summary

Technical Problem

The existing orchestration engines cannot adapt to the orchestration needs of diversified actual business processes and are poor in availability.

Method used

By performing node selection operations and node parameter configuration operations on the interface, the business process to be orchestrated is generated, and the orchestration of synchronous nodes and asynchronous nodes is supported to realize visual process orchestration.

Benefits of technology

It improves the efficiency of process orchestration, reduces the chance of code syntax errors, makes the orchestration process of business processes more intuitive and friendly, and improves the compatibility and usability of the orchestration engine.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117931167B_ABST
    Figure CN117931167B_ABST
Patent Text Reader

Abstract

The present application provides a process orchestration method, device, electronic device and storage medium, the method comprising: generating a business process to be orchestrated in response to an interface-based node selection operation and a node parameter configuration operation; the node selection operation supports the selection of nodes including synchronous nodes and asynchronous nodes, the synchronous nodes represent tasks that can be executed without waiting for external actions, and the asynchronous nodes represent tasks that need to wait for external actions to be executed; the nodes in the business process are executed in sequence according to the order of the nodes in the business process. The method realizes visual process orchestration, improves the efficiency of orchestration, and reduces the difficulty of orchestration. In addition, the nodes supported for selection in the method include synchronous nodes and asynchronous nodes, that is, both synchronous nodes and asynchronous nodes can be orchestrated in the business process, so that the obtained business process can effectively describe the diverse types of tasks in the actual business, and improve the compatibility and availability of the orchestration engine.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer application technology, and in particular to a process scheduling method, device, electronic device and storage medium. Background Art

[0002] Process orchestration refers to the process of organizing the tasks involved in an executable process in the order of their execution through an orchestration engine. However, the current orchestration engine has weak orchestration capabilities, and the tasks involved in actual business processes are often diverse, so the current orchestration engine cannot adapt to the diverse orchestration needs of actual business processes. Summary of the invention

[0003] The purpose of the embodiments of the present application is to provide a process orchestration method, device, electronic device and storage medium, which are used to improve the problem that the current orchestration engine cannot adapt to the diverse orchestration requirements of actual business processes and the orchestration engine has poor availability.

[0004] In a first aspect, an embodiment of the present application provides a process orchestration method, comprising: generating a business process to be orchestrated in response to an interface-based node selection operation and a node parameter configuration operation; wherein the node selection operation supports selection of nodes including synchronous nodes and asynchronous nodes, synchronous nodes represent tasks that can be executed without waiting for external actions, and asynchronous nodes represent tasks that need to wait for external actions to be executed; and executing the nodes in the business process in sequence according to the order of the nodes in the business process.

[0005] The above method can be applied to a process orchestration engine. In the above implementation process, the business process to be orchestrated is generated by the user performing node selection operations and node parameter configuration operations on the interface, thereby realizing visual process orchestration. This orchestration process does not require writing a large amount of code, thereby improving the efficiency of process orchestration, reducing the probability of code syntax errors, and making the business process orchestration process more intuitive and more user-friendly for ordinary users.

[0006] At the same time, in the node selection operation, the nodes that support selection include synchronous nodes and asynchronous nodes, that is, in the business process, it can be orchestrated into synchronous nodes to implement tasks that can be executed without waiting for external actions, and it can also be orchestrated into asynchronous nodes to implement tasks that need to wait for external actions to be executed (of course, it can also be orchestrated into these two types of nodes at the same time). The resulting business process can effectively describe the diverse types of tasks in actual business, thereby improving the problem that the existing orchestration engine cannot adapt to the orchestration needs of actual business processes, thereby improving the compatibility and availability of the orchestration engine.

[0007] Optionally, in an embodiment of the present application, the attributes of a node include a node identifier, a process instance identifier, and a branch identifier; wherein the node identifier is used to identify different nodes in a business process; each time a business process runs, a process instance is generated, and the process instance identifier is used to identify the process instance to which the node belongs; the process instance includes one or more branches, and the branch identifier is used to identify the branch to which the node belongs; a branch is a concurrent execution branch in a process instance.

[0008] In the above implementation process, by introducing branches in the process instance, the execution efficiency of the process is improved. At the same time, by setting the node ID, process instance ID and branch ID of the node respectively, different entities involved in the business process execution process are distinguished, which is conducive to ensuring the correctness and reliability of the process execution.

[0009] Optionally, in an embodiment of the present application, if the external action corresponding to the asynchronous node is an action in which the user submits data on the target page, the steps for executing the asynchronous node include: obtaining the node identifier, process instance identifier and branch identifier of the asynchronous node; concatenating the node identifier, process instance identifier and branch identifier of the asynchronous node to generate the address of the target page; notifying the user who executes the external action corresponding to the asynchronous node of the address of the target page in a preset manner; receiving data submitted by the user on the target page; the data includes business data, the node identifier, process instance identifier and branch identifier of the asynchronous node.

[0010] In the above implementation process, the node identifier, process instance identifier and branch identifier of the asynchronous node are spliced ​​to generate the address of the target page, and the address of the target page is notified to the user, so that when the user submits data on the target page, the node identifier, process instance identifier and branch identifier of the asynchronous node can be submitted together, and the branch under the process instance to which the asynchronous node belongs can be located through these identifiers, so as to continue to execute the subsequent nodes of the asynchronous node. That is, through the above implementation process, support for asynchronous nodes is achieved at the execution level, thereby effectively enhancing the compatibility and availability of the process orchestration engine.

[0011] Optionally, in an embodiment of the present application, a node pointer is set for each branch in the process instance, and the node pointer points to the currently executed node in the branch. After receiving the data submitted by the user on the target page, the method also includes: obtaining the node identifier, process instance identifier and branch identifier of the asynchronous node from the data submitted by the user; determining the target node pointer based on the process instance identifier and the branch identifier, the target node pointer refers to the node pointer corresponding to the process instance and the branch to which the asynchronous node belongs; if the node identifier of the asynchronous node is consistent with the node identifier of the node pointed to by the target node pointer, then continue to execute the node after the asynchronous node in the business process.

[0012] In the above implementation process, the node pointer points to the node currently being executed in the branch. The process instance identifier and branch identifier in the data submitted by the user are used to determine the target node pointer, and by comparing the node identifiers, it is determined whether to continue execution. This makes it easier to control and manage the flow of execution logic between nodes in the process instance, ensuring the correctness and reliability of process execution.

[0013] Optionally, in an embodiment of the present application, the target page includes a form page or an approval page.

[0014] In the above implementation process, the target page includes a form page or an approval page. Different forms of target pages can implement different businesses, which is conducive to improving the usability of the process orchestration engine, especially making it applicable to some enterprise scenarios (because in enterprises, filling out forms and approvals are common businesses).

[0015] Optionally, in an embodiment of the present application, if the target page is a form page of an edited form, the node identifier, process instance identifier and branch identifier of the asynchronous node are concatenated to generate the address of the target page, including: obtaining the form instance identifier corresponding to the edited form; concatenating the node identifier, process instance identifier, branch identifier and form instance identifier of the asynchronous node to generate the address of the target page; wherein, the form instance identifier is used to query the form data of the edited form, and the form data is used to render the target page; the data submitted by the user on the target page includes: the updated form data, the node identifier of the asynchronous node, the process instance identifier, the branch identifier and the form instance identifier.

[0016] In the above implementation process, when the target page is a form page of an edited form, the form instance identifier can be spliced ​​in the address of the target page, so that the form data of the edited form can be queried according to the form instance identifier, and the form data can be presented to the user on the target page, so that the user can re-edit the edited form to achieve the reuse of the form data. When the user submits the new form data, in addition to submitting the node identifier, process instance identifier and branch identifier of the asynchronous node, the form instance identifier is also submitted, so that the process orchestration engine can manage the updated form data based on the form instance identifier.

[0017] Optionally, in an embodiment of the present application, a preset method for notifying a user of an external action corresponding to an asynchronous node includes: a first method: obtaining user information of a user who executes an external action corresponding to an asynchronous node, and sending notification information to the user based on the user information, wherein the notification information includes the address of a target page; a second method: obtaining a to-do list of the user, and generating a target representative item based on the address of the target page; the target representative item is used to instruct the user to enter the target page; the target representative item is added to the user's to-do list; a third method: obtaining a data list of the user; generating an interactive button based on the address of the target page, the interactive button is used to instruct the user to enter the target page; and the interactive button is added to the user's data list.

[0018] In the above implementation process, various and flexible ways of notifying users are provided, and the corresponding way can be selected according to the specific application scenario and the page requirements of the target page, so that the user can obtain the address of the target page and enter the target page to complete the external action corresponding to the asynchronous node.

[0019] Optionally, in an embodiment of the present application, if the external action corresponding to the asynchronous node is an action of a third party to call back the target function; then the steps of executing the asynchronous node include: storing the node identifier, process instance identifier and branch identifier of the asynchronous node in association with the function identifier of the target function corresponding to the asynchronous node; sending the function identifier to the third party by calling an interface provided by the third party; in response to the third party's call to the target function through the function identifier, determining the node identifier, process instance identifier and branch identifier of the asynchronous node stored in association with the function identifier according to the function identifier of the called target function.

[0020] In the above implementation process, the external action corresponding to the asynchronous node can also be the action of the third party to call back the target function. By sending the function identifier to the third party, the node identifier, process instance identifier and branch identifier of the asynchronous node associated with the function identifier are determined according to the function identifier of the called target function. Through these identifiers, the branch under the process instance to which the asynchronous node belongs can be located, so as to continue to execute the subsequent nodes of the asynchronous node. That is, through the above implementation process, support for asynchronous nodes is achieved at the execution level.

[0021] In addition, it can be seen that the asynchronous nodes in the embodiments of the present application can support external actions in various application scenarios (for example, filling out forms, approvals, and other actions performed by people, and function callback actions performed by machines), so as to better meet the diverse orchestration requirements of actual business processes and effectively enhance the compatibility and usability of the process orchestration engine.

[0022] Optionally, in an embodiment of the present application, a node pointer is set for each branch in the process instance, and the node pointer points to the currently executed node in the branch. After determining the node identifier, process instance identifier and branch identifier of the asynchronous node saved in association with the function identifier, the method also includes: determining the target node pointer based on the process instance identifier and branch identifier of the asynchronous node, and the target node pointer refers to the node pointer corresponding to the process instance and the branch to which the asynchronous node belongs; if the node identifier of the asynchronous node is consistent with the node identifier of the node pointed to by the target node pointer, then continue to execute the node after the asynchronous node in the business process.

[0023] In the above implementation process, by comparing the node identifier of the asynchronous node and whether the node identifier of the node pointed to by the target node pointer is consistent, it is determined whether to continue executing the node after the asynchronous node, which facilitates the control and management of the flow of execution logic between nodes in the process instance, ensuring the correctness and reliability of the process execution.

[0024] Optionally, in an embodiment of the present application, the node includes a loop node, which is a node that needs to repeatedly execute child nodes in the loop body until the loop end condition is met; the parameters of the loop node include a concurrency attribute; when executing to the loop node, if the concurrency attribute of the loop node is configured for concurrent execution, then under the branch to which the loop node belongs, the same number of secondary branches as the total number of values ​​of the loop variable of the loop node are generated; and the secondary branches are used to concurrently execute the loop body under each value of the loop variable; when executing to the loop node, if the concurrency attribute of the loop node is configured for non-concurrent execution, then the branch to which the loop node belongs is used to repeatedly execute the loop body according to the change of the loop variable.

[0025] In the above implementation process, the node includes a loop node, and the concurrency attribute of the loop node can be configured as concurrent execution and non-concurrent execution, and the concurrency attribute of the loop node can be set according to requirements. When the concurrency attribute of the loop node is configured as concurrent execution, since multiple secondary branches are generated to concurrently execute the loop body, the execution efficiency and performance of the loop node can be improved.

[0026] Optionally, in an embodiment of the present application, if the concurrency attribute of the loop node is configured as concurrent execution, the execution result of the loop node is obtained according to the execution result corresponding to each secondary branch.

[0027] In the above implementation process, when the concurrency attribute of the loop node is configured for concurrent execution, the execution result of the loop node is obtained according to the execution result corresponding to each secondary branch, so that corresponding rules can be set according to actual needs, and the execution results corresponding to each secondary branch can be mapped to the execution result of the loop node (for example, the execution results of each branch can be weighted, counted, etc.), so that the execution logic of the loop node can better express the actual business needs.

[0028] Optionally, in an embodiment of the present application, if the concurrency attribute of the loop node is configured for concurrent execution, the loop termination conditions include: the completion of execution of each secondary branch, execution of any secondary branch to an instruction that requires prematurely terminating the loop, or execution timeout of any secondary branch; after the loop node is executed, the generated secondary branch is destroyed, and the branch to which the loop node belongs is used to continue executing the nodes in the business process.

[0029] In the above implementation process, there are multiple ways to end the loop, so that the execution logic of the loop node can better express the actual business needs. After the loop node is executed, the generated secondary branches are destroyed in time, the memory, CPU, network connection and other resources occupied by the branches are released, and the branches to which the loop node belongs are used to continue to execute the nodes in the business process, which can reduce the consumption of system resources during the execution of the business process.

[0030] Optionally, in an embodiment of the present application, the generation rules of the branch identifier of a node include: if the node is not a child node of a loop node whose concurrency attribute is configured for concurrent execution, the branch identifier of the node is consistent with the process instance identifier; if the node is a child node of a loop node whose concurrency attribute is configured for concurrent execution, the branch identifier of the node is generated based on the branch identifier of the loop node closest to the node in the parent node of the child node and whose concurrency attribute is configured for concurrent execution, and the loop sequence number corresponding to the node; the loop sequence number corresponding to the node is the sequence number of the current value of the loop variable corresponding to the branch to which the node belongs among all values.

[0031] In the above implementation process, the branch identifier corresponding to the node is generated according to the rule. Such a branch identifier can not only identify the branch where the node is located, but also reflect the parent relationship between the nodes, which is convenient for managing the nodes in the process.

[0032] Optionally, in an embodiment of the present application, the business process includes a first node and a second node, wherein the execution order of the first node is before that of the second node; the node identifier, process instance identifier, branch identifier and execution result of the node are associated and stored after the node is executed; if the parameters configured by the second node include a reference to the execution result of the first node, the step of obtaining the execution result of the first node includes: obtaining the node identifier and process instance identifier of the first node; in reverse order of the execution order of the business process, with the second node as the starting point, querying the nodes in the business process whose execution order is before the second node, and determining the branch identifier of each queried node according to the generation rule of the branch identifier and the branch identifier of the second node during the query process; until the node identifier of the queried node is the node identifier of the first node, the branch identifier of the first node is determined as the branch identifier of the queried node; obtaining the execution result of the first node stored in association with the node identifier, process instance identifier and branch identifier of the first node.

[0033] In the above implementation process, the execution result of the predecessor node (for example, the first node) can be obtained through the node identifier and process instance identifier of the predecessor node (for example, the first node), as well as the generation rule of the branch identifier, so that the subsequent node (for example, the second node) in the business process can refer to the execution result of the predecessor node as input during the execution process, thereby enriching the input type of the node and enabling the execution logic of the node to better express the actual business needs.

[0034] In the second aspect, an embodiment of the present application also provides a process orchestration device, including: an orchestration module, which is used to respond to interface-based node selection operations and node parameter configuration operations to generate a business process to be orchestrated; wherein the node selection operation supports the selection of nodes including synchronous nodes and asynchronous nodes, synchronous nodes represent tasks that can be executed without waiting for external actions, and asynchronous nodes represent tasks that need to wait for external actions to be executed; an execution module, which is used to execute the nodes in the business process in sequence according to the order of the nodes in the business process.

[0035] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and when the machine-readable instructions are executed by the processor, the method described above is performed.

[0036] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method described above is executed.

[0037] The present application provides a process orchestration method, device, electronic device and storage medium. Through node selection operations and node parameter configuration operations, the business process to be orchestrated is generated to achieve visual programming. The execution logic of the process can be visually represented and processed, which is more intuitive and easy to understand, and improves the speed of process development. In addition, there is no need to write a large amount of code during the process orchestration process, reducing the probability of code syntax errors. At the same time, in the node selection operation, the nodes supported for selection include synchronous nodes and asynchronous nodes, and the orchestration and execution of synchronous nodes and / or asynchronous nodes are achieved, effectively enhancing the compatibility and availability of the process orchestration engine. The problem of limited application scope of the process orchestration engine and poor availability of the process orchestration engine is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0039] Figure 1 A flowchart of a process arrangement method provided in an embodiment of the present application;

[0040] Figure 2 A schematic diagram of a visual editing interface provided in an embodiment of the present application;

[0041] Figure 3 A schematic diagram of a node parameter configuration operation provided in an embodiment of the present application;

[0042] Figure 4 A schematic diagram of a loop node whose concurrency attribute is configured to be executed concurrently provided in an embodiment of the present application;

[0043] Figure 5 A schematic diagram of the execution process of a loop node whose concurrency attribute is configured as non-concurrent execution provided in an embodiment of the present application;

[0044] Figure 6 A schematic diagram of the execution process of a loop node whose concurrency attribute is configured to be executed concurrently provided in an embodiment of the present application;

[0045] Figure 7 A schematic diagram of the execution process of a nested loop node provided in an embodiment of the present application;

[0046] Figure 8 A schematic diagram of the execution result of the reference node provided in the embodiment of the present application;

[0047] Fig. 9A schematic diagram of a data table including interactive buttons provided in an embodiment of the present application;

[0048] Fig.10 A schematic diagram of the structure of a process orchestration device provided in an embodiment of the present application;

[0049] Fig.11 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0050] The following embodiments of the technical solution of the present application are described in detail in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present application, and are therefore only used as examples, and cannot be used to limit the scope of protection of the present application.

[0051] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by technicians in the technical field to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application.

[0052] In the description of the embodiments of the present application, the technical terms "first", "second", etc. are only used to distinguish different objects, and cannot be understood as indicating or implying relative importance or implicitly indicating the number, specific order or primary and secondary relationship of the indicated technical features. In the description of the embodiments of the present application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.

[0053] Before introducing the process orchestration method provided in the embodiment of the present application, some concepts involved in the embodiment of the present application are first introduced:

[0054] Process Orchestration usually refers to the use of several nodes to complete a business process. Each node represents a task that needs to be completed in the business process. During the orchestration process, the nodes are woven together in an orderly manner and aggregated into a specific execution chain, that is, the business process. The nodes here are, for example: IF (single branch judgment), IF-ELSE (double branch judgment), FOR (for loop), BREAK (break out of the loop), CONTINUE (end this loop), SWITCH (multi-branch selection), Function Call (function call, which can be various functions), Create Variable (create variable), Set Variable (set variable), Return (return), Termination (end), etc.

[0055] A process orchestration engine refers to software used to support process orchestration functions. The process orchestration engine in this application can interact with users through a visual interface, thereby responding to the orchestration operations performed by users on the interface to achieve process orchestration.

[0056] The inventors have found that the current process orchestration engine only supports the orchestration of synchronous tasks, which are tasks that can be completed automatically according to the task logic, without waiting for external actions during execution. However, the tasks involved in the actual business process may include asynchronous tasks, which are tasks that need to wait for external actions to execute. The current process orchestration engine does not support the orchestration of asynchronous tasks, and therefore cannot adapt to the diverse orchestration requirements of the actual business process. The compatibility and usability of the process orchestration engine are poor.

[0057] The embodiments of the present application provide a process orchestration method, device, electronic device and storage medium, in which a user performs a node selection operation and a node parameter configuration operation on an interface to generate a business process to be orchestrated, thereby realizing visual process orchestration. In the node selection operation, the nodes supported for selection include synchronous nodes and asynchronous nodes, that is, in the business process, it can be orchestrated into synchronous nodes to realize support for synchronous tasks, and it can also be orchestrated into asynchronous nodes to realize support for asynchronous tasks. Therefore, the obtained business process can effectively describe the diverse types of tasks in the actual business, and thus can improve the problem that the existing orchestration engine cannot adapt to the orchestration requirements of the actual business process, thereby improving the compatibility and availability of the orchestration engine.

[0058] It should be understood that in addition to the technical solutions proposed in the embodiments of the present application, the above analysis of the technical problems existing in the existing process orchestration engine also belongs to the contribution of the inventor to the present application, rather than existing content in the prior art. Figure 1 A flow chart of a process orchestration method provided by an embodiment of the present application is shown. The process orchestration method provided by an embodiment of the present application can be applied to an electronic device, on which a process orchestration engine is deployed, and the process orchestration method can be, but is not limited to, executed by the process orchestration engine. The electronic device may refer to a terminal and a server having the function of executing a computer program; wherein the terminal may specifically be a smart phone, a tablet computer, a computer, a personal digital assistant (PDA), etc.; the server may specifically be an application server or a web server. The number of the electronic devices may be one or more, for example, it may be a cluster consisting of multiple servers. The electronic device may be a physical device or a virtual device. The process orchestration method may include:

[0059] Step S110: The process orchestration engine responds to the node selection operation and the node parameter configuration operation based on the interface to generate the business process to be orchestrated; wherein the node selection operation supports the selection of synchronous nodes and asynchronous nodes, the synchronous nodes represent tasks that can be executed without waiting for external actions, and the asynchronous nodes represent tasks that need to wait for external actions to be executed.

[0060] The interface in step S110 refers to a visual choreography interface for users to perform process choreography, such as a graphical user interface of application software, a web page, etc. The node selection operation refers to the operation of the user selecting a node in the business process to be choreographed from the nodes supported by the interface, and the node parameter configuration operation refers to the operation of the user configuring parameters for the selected node. Of course, it is not excluded that the user can perform other operations related to process choreography on the interface.

[0061] The interface and the process orchestration engine are interrelated. For example, the interface can be displayed on the terminal device used by the user (such as a smartphone or computer), and the process orchestration engine can be deployed on the backend server. Of course, it is not ruled out that the interface and the process orchestration engine are located on the same device. The various process orchestration operations performed by the user on the interface can form corresponding operation data and be transmitted to the process orchestration engine, so that the process orchestration engine can perceive the operations performed by the user and respond.

[0062] Each node represents a task that the process orchestration engine supports to execute. Users can select nodes according to the needs of the business process to form a business process. For the node selection operation, the nodes that support user selection include synchronous nodes and asynchronous nodes. However, a business process does not necessarily have to contain both types of nodes at the same time, and can also contain only one of the two types of nodes. Among them, synchronous nodes represent tasks that can be executed without waiting for external actions, that is, the synchronous tasks mentioned above. For example, the task of performing data statistics according to the configured formula; another example is the task of sending emails according to the configured recipients, etc. Asynchronous nodes represent tasks that need to wait for external actions to be executed, that is, the asynchronous tasks mentioned above. For example, the task of filling out a form, this task needs to wait for a specific user to fill out the form before it can be executed. Here, the user filling out the form is the so-called external action; another example is the function callback task, this task needs to wait for a third party (which can refer to a software other than the process orchestration engine) to call back the target function before it can be executed. Here, the third party calling back the target function is the so-called external action, and so on. However, it should be pointed out that an asynchronous task may be divided into multiple links, some of which can be executed automatically, and some links need to wait for external actions to be executed. However, from the overall perspective of the task, it is still considered that it needs to wait for external actions to be executed or needs to wait for external actions to be completed.

[0063] As an optional method, Figure 2 A schematic diagram of a visual arrangement interface provided in an embodiment of the present application. Figure 2 , the visual arrangement interface may include a selection interface and a process configuration interface. The process configuration interface is used to display the currently arranged business process, and the selection interface is used to display nodes that support selection, which can be referred to as selection nodes. As mentioned above, the selection nodes may include two types: synchronous nodes and asynchronous nodes. For example, the node selection operation may be an operation of selecting a desired node from the selection nodes displayed on the selection interface and dragging it to a suitable position in the process configuration interface; or an operation of selecting a desired node by clicking on the selection interface, and the clicked node will be automatically displayed at a suitable position in the process configuration interface, and so on.

[0064] In the process configuration interface, users can also connect the nodes selected through the node selection operation through connecting lines to determine the execution order of the nodes; or, in some implementations, the nodes can also be automatically connected (for example, clicking on a node will automatically connect it to the end of the business process).

[0065] Some nodes have configurable parameters. These nodes require users to configure appropriate parameters for them to execute correctly. Of course, it is not ruled out that the process orchestration engine can specify default parameters for the nodes when users do not configure parameters. Figure 3 The schematic diagram of the node parameter configuration operation provided by the embodiment of the present application is shown. The IF node is a node with configurable parameters. The node parameter configuration operation is, for example: when the user hovers the mouse over the IF node or clicks the IF node, an interface on the right pops up, and an input box is displayed on the interface to facilitate the user to configure the specific parameters of the IF node, such as configuring the conditions in the IF node (here, the amount is less than 500).

[0066] In some implementations, in addition to node selection and node parameter configuration operations, users can also perform other scheduling operations on the interface, such as node deletion operations. Figure 3 When the mouse hovers over an existing node in the business process (such as the first SET node or the second SET node), a delete button may also be displayed, so that when the user clicks the delete button, the node is deleted.

[0067] For the orchestrated business process, it can be described in accordance with certain grammatical rules within the orchestration engine. For example, a node can be described by a set of several fields, and these fields can also have a nested relationship. Figure 3Take the IF-ELSE node in (IF-ELSE node can be considered as a combination of IF node and ELSE node, which implements the logic of if-else statement in structured programming) as an example to illustrate the possible description methods of nodes in the process orchestration engine. The node includes several fields, id, type, nodeName, condition, subFlow, and elseSubFlow, where id is the node identifier, type is the node type, nodeName is the node name, condition is the condition configured for the node (such as the amount is less than 500), subFlow represents the subflow to be executed if the condition is met, which may include fields corresponding to one or more nodes (such as the first SET node), and these fields can be nested inside subFlow, elseSubFlow represents the subflow to be executed if the condition is not met, which may include fields corresponding to one or more nodes (such as the second SET node), and these fields can be nested inside elseSubFlow, and the nodes in subFlow and elseSubFlow can also be called subnodes of the IF-ELSE node.

[0068] The above example introduces the concept of child nodes. Not only IF-ELSE nodes have child nodes, but some other nodes, such as the loop node to be introduced later, also have child nodes. If a node in a business process has no child nodes, it is easy to determine whether the node is a synchronous node or an asynchronous node. If a node has child nodes, it can be stipulated that: if all the child nodes of the node are synchronous nodes, then the node itself is also a synchronous node; if the child nodes of the node include asynchronous nodes, then the node itself is an asynchronous node.

[0069] Step S120: the process orchestration engine executes the nodes in the business process in sequence according to the order of the nodes in the business process.

[0070] In step S120, after the user arranges the business process, the user can send a confirmation execution instruction to the process orchestration engine by clicking the confirmation execution button on the interface. After receiving the confirmation execution instruction, the process orchestration engine executes the nodes in the business process in sequence. The execution logic inside each node is implemented in advance by the process orchestration engine. It is understandable that after the user arranges the business process, it can be automatically executed or triggered to execute under certain conditions. Alternatively, it is also possible that during the process of the user arranging the business process, the already arranged part will be automatically executed.

[0071] The execution of business processes can be done in an interpreted manner. However, in order to improve execution efficiency, the business process can also be translated into high-level computer language codes, and the execution of the process can be achieved by executing the corresponding high-level computer language codes.

[0072] When executing to a synchronous node in a business process, it will automatically execute according to the execution logic preset by the process orchestration engine to complete the corresponding synchronous task and continue to execute the subsequent nodes in the business process (if any); when executing to an asynchronous node in a business process, the execution of the business process will be blocked (it may only block a branch, see the definition of branches later), and it is necessary to wait for external actions to complete the corresponding asynchronous task and continue to execute the subsequent nodes in the business process (if any). Here, the subject that executes the external action may be a person, a third-party software, or a device.

[0073] The process orchestration engine can sense whether an external action is executed. For example, after a user fills out a form and clicks the Submit button on the interface, the form data will be returned to the process orchestration engine, so that the process orchestration engine can sense that the user has completed the action of submitting the form data; after a third party calls back the target function, if the target function is part of the process orchestration engine or is monitored by the process orchestration engine, the process orchestration engine can also sense that the third party has completed the action of the callback function, and so on.

[0074] If the external action is not executed for a long time, the process will be continuously blocked at the asynchronous node, causing the subsequent nodes to be unable to execute. To address this issue, a timeout processing mechanism can also be set for the asynchronous node. If the process orchestration engine does not perceive the execution of the external action within the preset time period, it can execute the timeout processing instruction, such as forcing the asynchronous node to specify an execution result, continuing to execute the subsequent nodes, or forcibly terminating the execution of the process, etc. The preset time period can be configured internally by the process orchestration engine, or it can be configured by the user as a parameter of the asynchronous node.

[0075] In addition, it should be noted that external actions refer to the business process execution phase. Node parameter configuration operations performed during the business process orchestration phase do not belong to external actions.

[0076] In the above implementation process, the business process to be orchestrated is generated by the user performing node selection operations and node parameter configuration operations on the interface, thereby realizing visual process orchestration. This orchestration process does not require writing a large amount of code, thereby improving the efficiency of process orchestration, reducing the probability of code syntax errors, and making the business process orchestration process more intuitive and more user-friendly for ordinary users.

[0077] At the same time, in the node selection operation, the nodes that support selection include synchronous nodes and asynchronous nodes, that is, in the business process, it can be orchestrated into synchronous nodes to implement tasks that can be executed without waiting for external actions, and it can also be orchestrated into asynchronous nodes to implement tasks that need to wait for external actions to be executed (of course, it can also be orchestrated into these two types of nodes at the same time). The resulting business process can effectively describe the diverse types of tasks in actual business, thereby improving the problem that the existing orchestration engine cannot adapt to the orchestration needs of actual business processes, thereby improving the compatibility and availability of the orchestration engine.

[0078] Optionally, in the embodiment of the present application, the attributes of the node include a node identifier, a process instance identifier, and a branch identifier. These identifiers can be automatically assigned by the process orchestration engine, and can also be configured by the user (regarded as a parameter of the node).

[0079] The node identifier is a unique identifier of a node, which is used to identify different nodes in a business process and can also be used for reference in a business process. The node identifier can be expressed as a Node ID.

[0080] Each time a business process runs, a process instance is generated. If the business process is regarded as a template, the process instance can be regarded as a real object created based on this template. The business process does not contain actual data, while the process instance does. The process instance identifier is used to identify the process instance to which the node belongs. Here, since the process instance is the result of the business process entity, the process instance also contains all the nodes in the business process.

[0081] In the same operation of the same business process, the flow instance identifiers of all nodes in the business process are consistent, but in different operations of the same business process, even for the same node, the flow instance identifiers are different. For example, when a business process is run for the first time (or the second time), the flow instance identifiers of all nodes in the business process are the same, but the flow instance identifiers generated by the first and second runs of the business process are different. Therefore, the nodes in different process instances can be distinguished and identified by the flow instance identifier. The flow instance identifier can be expressed as a Flow Instance ID.

[0082] A process instance includes one or more branches. A branch is a concurrent execution branch in a process instance. A branch can correspond to a segment of a business process that contains several nodes (for example, as will be known in the following text, a branch can correspond to the loop body of a loop node). In particular, if a process instance includes only one branch, this branch can be considered to be the process instance itself, or it can be considered that the process instance has no branches at this time. The branches contained in a process instance may also have a hierarchical structure, that is, some branches may be subordinate to other branches rather than directly subordinate to the process instance. For example, a process instance contains 3 branches, of which the first branch contains 2 secondary branches. Overall, these 5 branches can be regarded as branches contained in the process instance. The branch identifier is used to identify the branch to which the node belongs. In the business process, the nodes of the same branch have the same branch identifier. The branch identifier can be expressed as a Thread ID.

[0083] In the above implementation process, by introducing branches in the process instance, the execution efficiency of the process is improved (because branches can be executed in parallel). At the same time, by setting the node ID, process instance ID and branch ID attributes of the node, the different entities (nodes, process instances, branches) involved in the business process execution process are distinguished, which is conducive to ensuring the correctness and reliability of the process execution. For details on how to use these node attributes, please refer to the examples below.

[0084] Optionally, in an embodiment of the present application, the nodes in the business process include loop nodes, which are nodes that need to repeatedly execute the loop body until the loop end condition is met. The loop body is a process segment that needs to be repeatedly executed defined inside the loop node. The loop body can contain one or more nodes, which can be called child nodes of the loop node. The child nodes in the loop body define the operations or logic to be executed by the loop node. In particular, the child nodes of the loop node can also be loop nodes.

[0085] A loop node may be a synchronous node or an asynchronous node. If the loop body of a loop node is full of synchronous nodes, the loop node can be considered a synchronous node. If the loop body of a loop node contains asynchronous nodes, the loop node can be considered an asynchronous node.

[0086] The parameters of the loop node include a concurrency attribute, and the concurrency attribute of the loop node can be configured as concurrent execution or non-concurrent execution.

[0087] When executing to the loop node in step S120, if the concurrency attribute of the loop node is configured for concurrent execution, the process orchestration engine generates a number of secondary branches that is the same as the total number of values ​​of the loop variable of the loop node under the branch to which the loop node belongs (in this case, the process instance is also regarded as a branch), and uses the secondary branches to concurrently execute the loop body under each value of the loop variable, wherein each secondary branch is used to execute the loop body under one value of the loop variable.

[0088] When executing to the loop node in step S120, if the concurrency attribute of the loop node is configured as non-concurrent execution, the loop body is repeatedly executed according to the change of the loop variable using the branch to which the loop node belongs, that is, the loop body is serially executed according to the loop logic.

[0089] Correspondingly, the nodes in the business process may also include non-loop nodes. Non-loop nodes may be defined as nodes that do not require repeated execution of loop bodies. Since no repeated execution is involved, non-loop nodes are usually executed serially.

[0090] See also Figure 4 The diagram shows a schematic diagram of a loop node in which the concurrency attribute provided by an embodiment of the present application is configured to be executed concurrently.

[0091] The asynchronous node FOR node is a loop node (the FOR node implements the logic of the for statement in structured programming), and the loop body is the part from the approval request node to the return true value node, and the concurrency attribute of the loop node is configured as concurrent execution. The way to configure the concurrency attribute parameter is to check the concurrency option, and of course other methods are not excluded. For example, a form requires multiple approvers to approve it, and the approvers are USER1, USER2, and USER3. These three approvers USER1, USER2, and USER3 are the three values ​​that the loop variable USERS of the loop node can take. When the process orchestration engine executes to the loop node, it generates three secondary branches under the branch to which the loop node belongs, and uses the three secondary branches to concurrently execute the loop body when the loop variable takes USER1, USER2, and USER3 respectively.

[0092] if Figure 4 If the concurrency attribute of the loop node in is configured as non-concurrent execution, that is, the concurrency option is not checked, the process orchestration engine will not generate secondary branches for the branch to which the loop node belongs. The branch to which the loop node belongs will execute the loop body when the loop variable is USER1, USER2, and USER3 respectively.

[0093] The above example illustrates the loop node through the FOR node. However, in structured programming, the for statement is not the only one that can implement a loop. For example, the while statement can also implement a loop. Therefore, in some implementations, the loop node can also include a WHILE node, which can be analyzed similarly to the FOR node.

[0094] As mentioned above, a process instance may include one or more branches, which may be generated when a loop node whose concurrency attribute is configured to be executed concurrently is executed.

[0095] The following diagram describes the execution process of the loop nodes with two concurrent attributes:

[0096] See also Figure 5 The illustrated embodiment of the present application provides a schematic diagram of the execution process of a loop node whose concurrency attribute is configured as non-concurrent execution.

[0097] Figure 5 The business process in includes nodes 1 to 3, where node 2 is a loop node, and the concurrency attribute is configured as non-concurrent execution. The values ​​of the loop variable i in node 2 are i=1, i=2, and i=3, and the branch to which node 2 belongs is 1000 (referring to the branch identifier 1000). When the process orchestration engine executes to node 2, it uses branch 1000 to which node 2 belongs to execute the loop body when i=1, i=2, and i=3 in sequence (the loop body is not shown in the figure). Note that since node 2 does not generate a branch at this time, branch 1000 to which node 2 belongs can be considered to be the process instance itself. It is not difficult to see that if the concurrency attribute of the loop node is configured as non-concurrent execution, then the execution of the loop node is no different from that of the non-loop node, and both are executed serially.

[0098] See also Figure 6 The illustrated embodiment of the present application provides a schematic diagram of the execution process of a loop node whose concurrency attributes are configured to be executed concurrently.

[0099] Figure 6The business process in includes nodes 1 to 4, wherein node 2 is a loop node, and the concurrency attribute is configured as non-concurrent execution. The loop body of node 2 includes node 3. The values ​​of the loop variable i in the loop node are i=1, i=2, and i=3, that is, the total number of values ​​of the loop variable is 3, so that three secondary branches are generated under the branch to which node 2 belongs. If the branch to which the loop node belongs is represented as 1000, then the three secondary branches can be 1000-1, 1000-2, and 1000-3 respectively. The loop body of node 2 when i=1 is executed by using secondary branch 1000-1; the loop body of node 2 when i=2 is executed by using secondary branch 1000-2; and the loop body of node 2 when i=3 is executed by using secondary branch 1000-3; and the execution mode is that the three secondary branches execute the corresponding loop bodies concurrently.

[0100] In the above implementation process, the nodes in the business process include loop nodes. The concurrency attribute of the loop node can be configured as concurrent execution and non-concurrent execution. The concurrency attribute of the loop node can be set according to needs. When the concurrency attribute of the loop node is configured as concurrent execution, multiple secondary branches will be generated to execute the loop body concurrently, thereby improving the execution efficiency and performance of the loop node.

[0101] Optionally, in an embodiment of the present application, if the concurrency attribute of the loop node is configured as concurrent execution, the execution result of the loop node is obtained according to the execution result corresponding to each secondary branch. In specific implementation, corresponding rules can be set according to actual needs to map the execution results corresponding to each secondary branch to the execution result of the loop node. For example, the execution results of each branch can be weighted, counted, etc., so that the execution logic of the loop node can better express the needs of the actual business.

[0102] Please continue to see Figure 4 , Continuing with the above embodiment, the approvers are USER1, USER2 and USER3, and the three secondary branches execute the loop bodies corresponding to USER1, USER2 and USER3 respectively, and obtain the execution results corresponding to each secondary branch, that is, the approval results of the three approvers. The execution result of the loop node can be determined according to the approval results of the three approvers and the preset conditions. For example, if the preset condition is that the number of approved people is greater than the preset threshold (for example, two-thirds), the execution result of the loop node is considered to be approved; if the number of approved people is not greater than the preset threshold, the execution result of the loop node is considered to be unapproved.

[0103] Optionally, in an embodiment of the present application, if the concurrency attribute of the loop node is configured for concurrent execution, the loop termination conditions include: (1) all secondary branches are executed, (2) any secondary branch executes an instruction that requires the loop to be terminated early, or (3) any secondary branch times out; after the loop node is executed, the generated secondary branch is destroyed, and the branch to which the loop node belongs is used to continue executing the nodes in the business process.

[0104] For condition (1), for example, Figure 4 For example, if the three sub-branches all return the approval results of the corresponding approvers, it means that the three sub-branches have been executed.

[0105] For condition (2), if any secondary branch executes an instruction that requires the loop to end early, such as a break instruction, the current loop will be terminated immediately. These instructions can correspond to specific nodes during scheduling.

[0106] For condition (3), any secondary branch execution timeout means that the execution time of any secondary branch exceeds the preset time period. Condition (3) is mainly used for the case where the loop body contains asynchronous nodes (because the external actions corresponding to asynchronous nodes are prone to timeout), but it can also be used for loop bodies containing only synchronous nodes. Among them, the preset time period can be configured internally by the process orchestration engine, or it can be configured by the user as a parameter of the loop node.

[0107] After the loop end condition is reached, the loop node is considered to have been executed. At this time, the secondary branches under the branch to which the generated loop node belongs are destroyed, the resources occupied by the secondary branches are released, and the branch to which the loop node belongs is used to continue executing the nodes in the business process. For example, refer to Figure 6 After node 2 is executed, the secondary branches 1000-1, 1000-2, and 1000-3 are all destroyed, and the currently executed branch becomes 1000 again, and node 4 is continued to be executed using branch 1000. Of course, if there are no other nodes after the loop node, the execution of the business process can also be terminated. In addition, if some special instructions are encountered in the loop body, such as the termination instruction, the execution of the business process may also be terminated directly instead of continuing to execute the nodes after the loop node.

[0108] In the above implementation process, there are multiple ways to end the loop, so that the execution logic of the loop node can better express the actual business needs. After the loop node is executed, the generated secondary branches are destroyed in time, the memory, CPU, network connection and other resources occupied by the branches are released, and the branches to which the loop node belongs are used to continue to execute the nodes in the business process, which can reduce the consumption of system resources during the execution of the business process.

[0109] Optionally, in an embodiment of the present application, the generation rules of the branch identifier of a node in a business process include: if the node is not a child node of a loop node whose concurrency attribute is configured for concurrent execution, the branch identifier of the node is consistent with the process instance identifier; if the node is a child node of a loop node whose concurrency attribute is configured for concurrent execution, the branch identifier of the node is generated based on the branch identifier of the loop node closest to the node in the parent node of the child node and whose concurrency attribute is configured for concurrent execution, and the loop sequence number corresponding to the node; the loop sequence number corresponding to the node is the sequence number of the current value of the loop variable corresponding to the branch to which the node belongs among all values.

[0110] First, let's explain the definition of child nodes here: all nodes under a node are called its child nodes, regardless of whether they are direct subordinates. For example, the loop body of loop node A contains three nodes, and these three nodes are all child nodes of the loop node; further, assuming that one of these three nodes is also a loop node, denoted as loop node B, and loop node B contains four child nodes, then these four child nodes are not direct subordinates of loop node A, but can also be considered as child nodes of loop node A. Accordingly, any child node of loop node A can call loop node A its parent node.

[0111] Since only loop nodes whose concurrency attributes are configured for concurrent execution will generate new branches, if a node is not a child node of any loop node whose concurrency attributes are configured for concurrent execution, it is still in the main branch of the process instance, rather than in a secondary branch generated during the running of the process instance. Therefore, the branch identifier of the node can be set to be consistent with the process instance identifier.

[0112] Please continue to see Figure 6 Nodes 1, 2, and 4 are not child nodes of the loop node whose concurrency attribute is configured for concurrent execution, so their branch identifiers are the same as the identifier of the process instance, which is 1000.

[0113] If the concurrency attribute of a loop node is configured as concurrent execution, the branch identifier of the child node directly under the loop node can be generated according to the branch identifier of the loop node and the loop sequence number corresponding to the child node. If a child node directly under the loop node is also a loop node, and the concurrency attribute is also configured as concurrent execution, the branch identifier of the child node directly under the child node can also be derived in a similar manner; if a child node directly under the loop node is also a loop node, but the concurrency attribute is configured as non-concurrent execution, or it is a non-loop node, the branch identifier of the child node directly under the child node is consistent with the branch identifier of the child node. By analogy, the branch identifier of each node in the business process can be obtained.

[0114] This process can be simply summarized as follows: in the path from a top-level node to a lower-level child node, if a loop node whose concurrency attribute is configured for concurrent execution is encountered, a new branch identifier needs to be derived for the child nodes of the loop node, otherwise the current branch identifier remains unchanged.

[0115] Therefore, if a node is a child node of a loop node whose concurrency attribute is configured as concurrent execution, it can be traced back layer by layer from the direct parent node of the node. According to the definition of child nodes above, all nodes on the traceback path can be called the parent nodes of the node. Among these parent nodes, the loop node that is closest to the node and whose concurrency attribute is configured as concurrent execution is the loop node used to derive the branch identifier of the node.

[0116] Please continue to see Figure 6 , node 2 is a loop node, and the concurrency attribute of the loop node is configured as concurrent execution, where node 3 is a child node in the loop body of node 2. The following takes node 3 of the first branch (the leftmost branch) as an example to illustrate the generation rule of branch identifiers: the loop node closest to node 3 of the first branch among the parent nodes of node 3 of the first branch is node 2, and node 2 is a loop node whose concurrency attribute is configured as concurrent execution, so the branch identifier 1000 of node 2 is obtained; then the loop sequence number of node 3 of the first branch is obtained: the loop sequence number corresponding to node 3 of the first branch is the sequence number of the current value of the loop variable corresponding to the branch to which the node belongs among all values, for example, the current value of the loop variable is 2, and all values ​​include 2, 4 and 6; then the sequence number of the current value of the loop variable among all values ​​can be 1.

[0117] After obtaining the branch identifier of node 2 as 1000 and the cyclic sequence number corresponding to node 3 of the first branch as 1, the branch identifier of the first branch node 3 is generated according to the branch identifier of node 2 and the cyclic sequence number corresponding to node 3 of the first branch. For example, the branch identifier of node 2 1000 and the cyclic sequence number corresponding to the first branch node 3 can be concatenated to generate the branch identifier of node 3 of the first branch, such as Figure 6 The branch identifier 1000-1 is obtained by connecting the node 2 with a horizontal line. The branch identifier of the node 2 and the circular sequence number corresponding to the first branch node 3 can also be calculated in a preset manner to obtain the branch identifier of the first branch node 3.

[0118] See also Figure 7 A schematic diagram of the execution process of a nested loop node provided in an embodiment of the present application is shown.

[0119] As mentioned above, the child nodes of a loop node refer to all nodes in the loop body corresponding to the loop node. In an optional embodiment, the child nodes of a loop node may also include the loop node, such as Figure 7 As shown, the child nodes of loop node 2 include node 3, node 4 and node 5; wherein node 3 is also a loop node, the child nodes of node 3 include node 4, and the concurrency attributes of node 2 and node 3 are both configured for concurrent execution.

[0120] The following takes node 4 of the first branch (the leftmost branch) as an example to illustrate the generation rule of the branch identifier: node 4 of the first branch is the leftmost node 4. First, the parent nodes of node 4 of the first branch are determined, including node 3 and node 2 of the first branch. Since node 4 of the first branch has multiple parent nodes, it is also necessary to determine the parent node closest to node 4 of the first branch from the parent nodes, which is node 3 of the first branch, and obtain the branch identifier of node 3 of the first branch as 1000-1. Then obtain the cyclic sequence number of node 4 of the first branch as 1. Based on the branch identifier 1000-1 of node 3 of the first branch and the cyclic sequence number 1 of node 4 of the first branch, the branch identifier of node 4 of the first branch can be generated, for example, 1000-1-1. As for how to obtain the branch identifier of node 3 of the first branch, please refer to the above. Figure 6 In actual business process execution, the branch identifier of a node can be determined only when the node is executed. When node 4 of the first branch is executed, node 3 of the first branch has obviously been executed, so the branch identifier of node 3 of the first branch is known at this time.

[0121] In the above implementation process, the branch identifier corresponding to the node is generated according to the rule. Such a branch identifier can not only identify the branch where the node is located, but also reflect the parent relationship between nodes, which is convenient for managing the nodes in the process. Figure 6 In the example, combined with the generation rule of the branch identifier, according to the branch identifier 1000-1 of node 3 and the branch identifier 1000 of node 2, it can be known that node 3 is a child node of node 2 and belongs to the first branch generated by node 2.

[0122] In a business process, each node usually includes input and output, and the output of a node is generally the execution result of the node. In a business process, a node with a later execution order can reference the execution result of a node with an earlier execution order as its input. The following takes the first node and the second node as an example to illustrate how to resolve the reference to the node execution result. Assume that the business process includes the first node and the second node, where the execution order of the first node is before the second node. Obviously, the first node and the second node are just general references and do not represent two specific nodes.

[0123] Optionally, in an embodiment of the present application, each time a node is executed, the node identifier, process instance identifier, branch identifier and execution result of the node are associated and stored after the node is executed, for example, they can be stored in a database for subsequent reading and use.

[0124] If the parameters configured for the second node include a reference to the execution result of the first node, the step of obtaining the execution result of the first node includes: obtaining the node identifier and process instance identifier of the first node; in reverse order of the execution order of the business process, taking the second node as the starting point, querying the nodes in the business process that are executed before the second node, and determining the branch identifier of each queried node according to the branch identifier generation rule and the branch identifier of the second node during the query process; until the node identifier of the queried node is the node identifier of the first node, the branch identifier of the first node is determined as the branch identifier of the queried node; obtaining the execution result of the first node stored in association with the node identifier, process instance identifier and branch identifier of the first node (when executing to the second node, the first node has obviously been executed and its execution result has been saved).

[0125] Among them, the parameters configured by the second node can be regarded as the input of the second node, and the reference to the execution result of the first node included in the parameters means that the execution result of the first node (all or part) is used as the value of the configuration parameters of the second node. For example, the task corresponding to the first node is to obtain the user's email address, and its execution result is the obtained user's email address; the task corresponding to the second node is to send an email to the above user. Therefore, when configuring the parameters of the second node, it is necessary to reference the execution result of the first node, because the email address must be known to send an email. When the process orchestration engine executes the second node, it can parse the reference to obtain the execution result of the first node, and then assign the execution result of the first node to the second node, thereby completing the task of sending an email to the user corresponding to the second node.

[0126] See also Figure 8 FIG. 1 is a schematic diagram showing the execution result of the reference node provided by the embodiment of the present application. Figure 8 As shown, the above-mentioned method of referencing the execution result of the first node includes referencing based on the node identifier of the first node and a preset reference symbol, such as Figure 8 On the right side, $1.email address, where “$” is a reference symbol, 1 is the node identifier of the first node, $1 represents the execution result of the first node, and the email address represents a specific data item in the execution result (other data items are not excluded).

[0127] The following describes the steps of obtaining the execution result of the first node:

[0128] First, obtain the node identifier and process instance identifier of the first node whose execution result needs to be referenced. If the first node and the second node are in the same process instance, the process instance identifier of the first node is consistent with the process instance identifier of the second node. Since the second node needs to reference the execution result of the first node, it is obvious that the node identifier of the first node is known, otherwise it cannot be configured in the parameters of the second node.

[0129] Then, in the reverse order of the business process execution order, starting from the second node, the nodes in the business process execution order before the second node are queried. The purpose of the query is to determine the branch identifier of the first node according to the generation rule of the branch identifier and the branch identifier of the second node. The query process can be understood in conjunction with the examples below. Then, according to the node identifier, process instance identifier and branch identifier of the first node, the execution result of the first node stored in association with it is read.

[0130] For example, Figure 7 As shown, node 4 is used as the second node, node 2 is used as the first node, and the parameter configuration of node 4 needs to reference the execution result of node 2. Figure 7 There are 9 nodes 4 in total. For simplicity, only the leftmost node 4 is taken as an example. The node ID of node 4 is 4, the branch ID is 1000-1-1, and the process instance ID is 1000; the node ID of node 2 is 2, the process instance ID is 1000, and the branch ID is currently unknown because when executing to node 4, it is not known where node 2 is in the business process.

[0131] The nodes in the business process that are executed before node 4 are queried in sequence. The leftmost node 3 can be queried first, and it is found that node 3 is a loop node whose concurrency attribute is configured as concurrent execution, and is the direct parent node of node 4; according to the generation rule of branch identifiers, the branch identifier 1000-1-1 of node 4 can be used to reversely deduce the branch identifier 1000-1 of node 3; and it is found that the node identifier of node 3 is 3, and the node identifier to be referenced is 2, so node 3 is not the first node to be referenced.

[0132] It should be noted here that although Figure 7 There are three nodes 3 in the table, but for the leftmost node 4, only the leftmost node 3 will be queried, and the two rightmost nodes 3 will not be queried. In other words, if the leftmost node 4 references the execution result of node 3, it will only reference the execution result of the leftmost node 3.

[0133] Continue to query in the reverse order of the business process execution sequence. The queried node is node 2. It is found that node 2 is a loop node whose concurrent attribute is configured for concurrent execution and is the direct parent node of node 3. According to the generation rule of branch identifiers, the branch identifier 1000 of node 2 can be reversely deduced using the branch identifier 1000-1 of node 3 (or the branch identifier 1000-1-1 of node 4). It is found that the node identifier of node 2 is 2, and the node identifier to be referenced is also 2, so node 2 is the first node to be referenced. Therefore, the branch identifier of the first node can be determined as the branch identifier of the queried node, which is 1000.

[0134] After determining through the above steps that the branch identifier of the first node is 1000, the node identifier is 2, and the process instance identifier is 1000, the execution result of the first node stored in association with the node identifier, process instance identifier, and branch identifier of the first node is obtained, and then the second node is executed.

[0135] It can be understood that when it is found that the node identifier of the queried node is the node identifier of the first node, the query can be stopped without continuing to query the nodes in reverse order.

[0136] In an optional embodiment, a variable may be defined to store the execution result of the first node. The scope of the variable may be the entire process or a node after the first node in the execution order, so that the variable stored in the execution result of the first node is accessible to the second node. Figure 8 , a node for setting variables can be inserted between the first node and the second node. By executing the node, a variable is created. The variable name is "email address" and the variable value is the email address in the execution result of the first node.

[0137] When configuring the parameters of the second node, you can include a reference to a variable, for example, you can directly fill in the name of the variable (or other reference syntax), and the process orchestration engine can obtain the value of the variable by parsing the reference of the variable, thereby achieving the same effect as directly referencing the execution result of the first node. Figure 8 For example, for the second node, you can fill in #email address in the recipient column, where "#" is a reference symbol, indicating that it is followed by a variable name. The process orchestration engine can then find the previously defined variable based on the variable name "email address", obtain the value of the variable as the value of the recipient parameter of the second node, and execute the email sending task corresponding to the second node based on the value.

[0138] In the above implementation process, the execution result of the predecessor node (for example, the first node) can be obtained through the node identifier and process instance identifier of the predecessor node (for example, the first node), as well as the generation rule of the branch identifier, so that the subsequent node (for example, the second node) in the business process can refer to the execution result of the predecessor node as input during the execution process, thereby enriching the input type of the node and enabling the execution logic of the node to better express the actual business needs.

[0139] Optionally, in addition to referencing the execution result of the predecessor node, the child node of the loop node can also reference the loop variable. The reference method can refer to the reference to the execution result or variable in the previous text, and will not be repeated here.

[0140] Optionally, in an embodiment of the present application, if the external action corresponding to the asynchronous node is an action in which the user submits data on the target page, the step of executing the asynchronous node in step S120 includes: obtaining the node identifier, process instance identifier and branch identifier of the asynchronous node; concatenating the node identifier, process instance identifier and branch identifier of the asynchronous node to generate the address of the target page; notifying the user who executes the external action corresponding to the asynchronous node of the address of the target page in a preset manner; and receiving data submitted by the user on the target page, which data includes business data, the node identifier, process instance identifier and branch identifier of the asynchronous node.

[0141] After obtaining the data submitted by the user, the process orchestration engine can continue to execute the node after the asynchronous node in the business process (if any). Alternatively, if a timeout mechanism is set for the asynchronous node, the process orchestration engine can also force the execution of subsequent nodes after the asynchronous node times out.

[0142] The following describes in detail the steps for executing an asynchronous node. First, the process orchestration engine obtains the node identifier, process instance identifier, and branch identifier of the asynchronous node. Since the execution of each node is completely under the control of the process orchestration engine, the process orchestration engine can obtain the attributes of each node.

[0143] Then the process orchestration engine concatenates the node identifier, process instance identifier and branch identifier of the asynchronous node according to the preset rules to generate the address of the target page. It should be noted that, in addition to the node identifier, process instance identifier and branch identifier of the asynchronous node, the address of the target page may also include other information, such as the protocol used to access the web page, the IP address and the path where the page is saved. The address of the target page refers to a unique identifier used to identify and locate a web page, such as the URL (Uniform Resource Locator) of the target page.

[0144] Next, the process orchestration engine notifies the user who executes the external action corresponding to the asynchronous node of the address of the target page in a preset manner. For example, the external action corresponding to the asynchronous node requires user A to fill in the information items in the personal information filling page and submit the filled personal information. The personal information filling page here is a target page. After obtaining the address of the target page, the address of the target page can be notified to user A by obtaining user A's information, sending information to user A, or adding user A's to-do items.

[0145] After user A receives the address of the target page through the terminal device he uses, he clicks on the address of the target page, opens the target page, fills in personal information on the target page, and then submits the data on the target page. These data will be submitted to the process orchestration engine. The data content includes business data, node identifiers of asynchronous nodes, process instance identifiers, and branch identifiers. Among them, the business data is the personal information filled in by user A on the target page, while the node identifier, process instance identifier, and branch identifier are carried in the address of the target page. User A may not perceive the submission of these three data. It is understandable that in different business scenarios, business data can also be other data, such as the approval results and approval opinions submitted by the user after reviewing the content on the target page.

[0146] In the above implementation process, the node identifier, process instance identifier and branch identifier of the asynchronous node are spliced ​​to generate the address of the target page, and the address of the target page is notified to the user, so that when the user submits data on the target page, the node identifier, process instance identifier and branch identifier of the asynchronous node can be submitted together, and the branch under the process instance to which the asynchronous node belongs can be located through these identifiers, so as to continue to execute the subsequent nodes of the asynchronous node. That is, through the above implementation process, support for asynchronous nodes is realized at the execution level (the node selection operation has realized support for asynchronous nodes at the interface level), thereby effectively enhancing the compatibility and usability of the process orchestration engine.

[0147] Optionally, in an embodiment of the present application, a node pointer is set for each branch in each process instance, and the node pointer points to the currently executed node in the branch. After receiving the data submitted by the user on the target page, the method also includes: obtaining the node identifier, process instance identifier and branch identifier of the asynchronous node from the data submitted by the user; determining the target node pointer based on the process instance identifier and the branch identifier, the target node pointer refers to the node pointer corresponding to the process instance and the branch to which the asynchronous node belongs; if the node identifier of the asynchronous node is consistent with the node identifier of the node pointed to by the target node pointer, then continue to execute the node after the asynchronous node in the business process.

[0148] The process orchestration engine sets a node pointer for each branch in the process instance (the process instance itself is also considered a branch). The node pointer points to the node currently being executed in the branch. After each node is executed, the value of the node pointer is updated to point to the next node in the branch. The process orchestration engine will then execute the next node. If the branch is destroyed, the corresponding node pointer can also be released together.

[0149] In the execution step of the asynchronous node, after the user submits data on the target page, the process orchestration engine can determine the target node pointer based on the process instance identifier and branch identifier in the data submitted by the user. The target node pointer refers to the node pointer corresponding to the process instance and branch to which the asynchronous node belongs. The process instance to which the asynchronous node belongs is determined based on the process instance identifier submitted by the user, and the branch to which the asynchronous node belongs is determined based on the branch identifier submitted by the user. The target node pointer points to the currently executing node in the branch to which it belongs.

[0150] If the node identifier of the asynchronous node is consistent with the node identifier of the node pointed to by the target node pointer, it means that the branch to which the target node pointer belongs has just executed to the position of the asynchronous node, and then the execution process is suspended and is waiting for the user to submit data. The data submitted by the user is exactly the data corresponding to the external action that the asynchronous node is waiting for, so the process orchestration engine can continue to execute the node after the asynchronous node in the business process. If the node identifier of the asynchronous node is inconsistent with the node identifier of the node pointed to by the target node pointer, an exception can be thrown.

[0151] In the above implementation process, the node pointer points to the node currently being executed in the branch. The process instance identifier and branch identifier in the data submitted by the user are used to determine the target node pointer, and by comparing the node identifiers, it is determined whether to continue execution. This makes it easier to control and manage the flow of execution logic between nodes in the process instance, ensuring the correctness and reliability of process execution.

[0152] Optionally, the process orchestration engine can also determine the process instance and branch to which the asynchronous node belongs based on the process instance identifier and branch identifier in the data submitted by the user, and locate the current asynchronous node in the branch based on the node identifier in the data submitted by the user, and then continue to execute downward. That is, the node pointer may not be checked, and the node pointer may not even be implemented.

[0153] Optionally, in an embodiment of the present application, the target page includes a form page or an approval page. If the target page corresponding to an asynchronous node is a form page, it can also be called a form node; if the target page corresponding to an asynchronous node is an approval page, it can also be called an approval node.

[0154] The target page refers to the page where the user submits data, and the form page can be a page for collecting user input data, which can form the user's form. The form page can include input controls corresponding to each field in the form, for receiving user input, such as text boxes, drop-down lists, check boxes, radio buttons, etc. The user can enter form data on the form page, and submit the form data and each identifier of the form node in the form page address to the process orchestration engine.

[0155] An approval page is a page used to process and manage approval tasks. The approval page is used to display applications or tasks to be approved, and provides an interface for approvers to make decisions on these requests. For example, the interface may include buttons such as "Approve" and "Reject" and a text box for approval opinions. Users can fill in approval opinions and approval results on the approval page, and submit the approval opinions, approval results, and the various identifiers of the approval node in the approval page address to the process orchestration engine. Optionally, some approval pages also allow users to enter some data other than approval opinions and approval results. Approval pages can also be regarded as special cases of form pages.

[0156] In the above implementation process, the target page corresponding to the asynchronous node includes a form page or an approval page. Different forms of target pages can implement different businesses, which is conducive to improving the availability of the process orchestration engine, especially making it applicable to some enterprise scenarios, because in enterprises, filling out forms and approvals are common businesses.

[0157] For example, in combination with the loop nodes in the business process, the embodiments of the present application can realize a complex and flexible approval process. For example, by including an approval node in the loop node and setting the concurrency attribute of the loop node to non-concurrent execution, a serial approval process can be realized; by setting the concurrency attribute of the loop node to concurrent execution, a parallel approval process can be realized; by nesting the loop nodes, a more complex approval process can be realized.

[0158] In the embodiments of the present application, an entity may refer to a definition of data, such as defining which fields are contained in a data table. A form is a form of presentation of an entity. For example, different users are allowed to see different fields in a data table, so different forms can be formed based on the same entity. A form instance is a form containing actual data. Different form instances can be distinguished by a form instance identifier, which can be represented as an EntityData ID.

[0159] Optionally, in an embodiment of the present application, if the target page is a form page of a new form (i.e., a form without data), the execution process of the asynchronous node is as described above. After receiving the form data submitted by the user, the process orchestration engine can assign a form instance identifier to it. Of course, it is not excluded that the user specifies the form instance identifier (in the node parameters). If the user specifies the form instance identifier, the form instance identifier can be submitted to the process orchestration engine together with the form data.

[0160] If the target page is the form page of an edited form, the node identifier, process instance identifier and branch identifier of the asynchronous node are concatenated to generate the address of the target page, including: obtaining the form instance identifier corresponding to the edited form; concatenating the node identifier, process instance identifier, branch identifier and form instance identifier of the asynchronous node to generate the address of the target page; wherein, the form instance identifier is used to query the form data of the edited form, and the form data is used to render the target page; the data submitted by the user on the target page includes: the updated form data, the node identifier of the asynchronous node, the process instance identifier, the branch identifier and the form instance identifier.

[0161] Among them, the target page is the form page of the edited form and can include the following situations: the first situation, for example, the form data submitted by the user needs to be modified or re-edited, then the data submitted by the user is used as the data in the form page of the edited form; the second situation, the edited form is a previously stored form, for example, an approval form requires approval from multiple people or a data form requires filling in by multiple people, and the subsequent filling is approved or filled in based on the previous data. After each person approves or fills in, the updated data is saved, and the edited form is used as the form to be presented on the target page of the next user.

[0162] If the target page is a form page of an edited form, when generating the address of the target page, the form instance identifier corresponding to the edited form needs to be spliced ​​into the address of the target page. The process of generating the address of the target page is described in detail below. Obtain the form instance identifier corresponding to the edited form. The form instance identifier corresponding to the edited form is generated after the form is submitted for the first time. The form instance identifier can be generated by the user or automatically generated after the process orchestration engine obtains the data submitted by the user for the target page. Subsequent processing of the edited form can use the form instance identifier generated after the form is submitted for the first time.

[0163] The form instance identifier can be used to query the form data of the edited form, and the form data is used to render the target page so that the user can know the content of the edited form. Taking the edited form in the first case as an example, the user needs to modify the form data that has been submitted. After the user submits the data for the first time, the form instance identifier of the form is generated. After the address of the form page of the edited form is notified to the user, the user clicks on the address, and the process orchestration engine can query the form data submitted by the user for the first time through the form instance identifier spliced ​​in the address, so that the form page of the edited form can be rendered based on the form data and the page can be returned to the user, and the user can modify the form data on this basis.

[0164] Correspondingly, if the target page is a form page of an edited form, the data submitted by the user on the target page includes: updated form data, node identifier of the asynchronous node, process instance identifier, branch identifier and form instance identifier. After receiving the data submitted by the user, the process orchestration engine can continue to execute subsequent nodes in the business process. For details, please refer to the previous content and will not be repeated. In addition, the process orchestration engine can also manage the updated form data based on the form instance identifier submitted by the user from the target page.

[0165] In the above implementation process, when the target page is a form page of an edited form, the form instance identifier can be spliced ​​into the address of the target page, and the form data can be presented to the user on the target page, so that the user can re-edit it based on the edited form to achieve reuse of the form data.

[0166] Optionally, in an embodiment of the present application, after the process orchestration engine generates the address of the target page, it needs to notify the user of the address of the target page so that the user can enter the target page based on the address of the target page and perform the corresponding external action. The preset methods of notifying the user include: the first method: obtaining the user information of the user who performs the external action corresponding to the asynchronous node, sending notification information to the user based on the user information, and the notification information includes the address of the target page; the second method: obtaining the user's to-do list, generating a target representative item according to the address of the target page; the target representative item is used to instruct the user to enter the target page; the target representative item is added to the user's to-do list; the third method: obtaining the user's data list; generating an interactive button based on the address of the target page, the interactive button is used to instruct the user to enter the target page; and the interactive button is added to the user's data list.

[0167] The first method is to send information to the user, which carries the address of the target page. Specifically, for example, the user information of the user is obtained; the user is the user who performs the external action corresponding to the asynchronous node; the user information is the user's account on the social platform, the user's mobile phone number or the user's email address, etc., which can receive messages. After obtaining the user information, a notification message including the address of the target page is sent to the user.

[0168] The second method is to generate a user's to-do list based on the address of the target page. For example, a user's to-do list is obtained. The to-do list may be a to-do list of the user in a task management system, or a to-do list of the user in a personal workflow. For example, the to-do list may include one or more to-do items, each of which may be a text description of the to-do item, and the text description also includes a page address corresponding to the to-do item to be completed.

[0169] The process orchestration engine can generate a target to-do item based on the address of the target page. The text description of the target to-do item can be composed of information such as the purpose of the target page, the content of the target page, and the name of the user who wants to use the target page. This information can be queried from the database by the process orchestration engine.

[0170] After generating the target to-do item, the process orchestration engine can add the target to-do item to the user's to-do list and send a reminder message to the user. The user clicks the page address corresponding to the target to-do item to enter the target page and complete the external actions such as filling in the form or approving data corresponding to the asynchronous node.

[0171] The third method is to add a button to the user's data list to enter the target page. For example, obtain the user's data list, which can be located in the user's system. The user can see the data list by entering a specific page in the system. Add an interactive button to the user's data list. The interactive button is used to instruct the user to enter the target page. Correspond the interactive button to the address of the target page. Create an interactive button response event by writing code so that the corresponding target page will be opened when the user clicks the interactive button.

[0172] Fig. 9 A schematic diagram of a data table containing interactive buttons provided in an embodiment of the present application. Fig. 9 It shows a data list that an approver can see. Every time an approval information is generated in the system, an item will be added to the data list. The last column of the item is an interactive button, which corresponds to the approval page. After the approver clicks the button, he can access the page and execute the external action corresponding to the approval node.

[0173] In the above implementation process, various and flexible ways of notifying users are provided, and the corresponding way can be selected according to the specific application scenario and the page requirements of the target page, so that the user can obtain the address of the target page and enter the target page to complete the external action corresponding to the asynchronous node.

[0174] Optionally, in an embodiment of the present application, if the external action corresponding to the asynchronous node is an action of a third party to call back the target function, the step of executing the asynchronous node in step S120 includes: storing the node identifier, process instance identifier and branch identifier of the asynchronous node in association with the function identifier of the target function corresponding to the asynchronous node; sending the function identifier to the third party by calling an interface provided by the third party; in response to the third party's call to the target function through the function identifier, determining the node identifier, process instance identifier and branch identifier of the asynchronous node stored in association with the function identifier according to the function identifier of the called target function.

[0175] Among them, the external action corresponding to the asynchronous node can also be an action of a third-party callback target function. The callback function is a function that is called when a specific event occurs. For example, the target function can be a WebHook type function, and of course it can also be a function of its type defined by the process orchestration engine.

[0176] The following uses the WebHook function as an example to illustrate the steps of executing an asynchronous node. WebHook includes a function identifier, which is used to identify different WebHook functions. The function identifier of a WebHook can be represented by a WebHook id. Before executing an asynchronous node, the process orchestration engine first associates the node identifier, process instance identifier, and branch identifier of the asynchronous node with the function identifier of the target function corresponding to the asynchronous node, for example, in a database.

[0177] Next, the process orchestration engine obtains an interface provided by a third party, which may be an interface with specific functions, such as a message push interface, etc. The third party may be software that needs to call a WebHook function. Based on the description or requirements of the interface provided by the third party, the interface is called, and the calling parameters include the WebHook id.

[0178] After the third party receives the WebHook id, it calls (calls back) the WebHook based on the WebHook id. In response to the third party's call to the WebHook through the WebHook id, the process orchestration engine queries the node identifier, process instance identifier, and branch identifier of the asynchronous node associated with the WebHook id according to the WebHook id of the called WebHook function.

[0179] In the above process, the process orchestration engine only needs to pass the WebHook ID to the third party without passing the node ID, process instance ID, and branch ID, making the asynchronous node execution more efficient and concise.

[0180] After obtaining the queried data, the process orchestration engine can continue to execute the node after the asynchronous node in the business process (if any). Alternatively, if a timeout mechanism is set for the asynchronous node, the process orchestration engine can also force execution of subsequent nodes after the asynchronous node times out.

[0181] In the above implementation process, the external action corresponding to the asynchronous node can also be the action of the third party to call back the target function. By sending the function identifier to the third party, the node identifier, process instance identifier and branch identifier of the asynchronous node associated with the function identifier are determined according to the function identifier of the called target function. Through these identifiers, the branch under the process instance to which the asynchronous node belongs can be located, so as to continue to execute the subsequent nodes of the asynchronous node. That is, through the above implementation process, support for asynchronous nodes is realized at the execution level (the node selection operation has realized support for asynchronous nodes at the interface level).

[0182] In addition, it can be seen that the asynchronous nodes in the embodiments of the present application can support external actions in various application scenarios (for example, filling out forms, approvals, and other actions performed by people, and function callback actions performed by machines), so as to better meet the diverse orchestration requirements of actual business processes and effectively enhance the compatibility and usability of the process orchestration engine.

[0183] Optionally, in an embodiment of the present application, a node pointer is set for each branch in each process instance, and the node pointer points to the currently executed node in the branch. After determining the node identifier, process instance identifier and branch identifier of the asynchronous node saved in association with the function identifier, the method also includes: determining the target node pointer based on the process instance identifier and branch identifier of the asynchronous node, and the target node pointer refers to the node pointer corresponding to the process instance and the branch to which the asynchronous node belongs; if the node identifier of the asynchronous node is consistent with the node identifier of the node pointed to by the target node pointer, then continue to execute the node after the asynchronous node in the business process.

[0184] The node pointer has been explained in the previous article and will not be repeated here. After the process orchestration engine determines the node ID, process instance ID and branch ID of the asynchronous node stored in association with the function ID, it can determine the target node pointer based on the process instance ID and branch ID of the asynchronous node. The target node pointer refers to the node pointer corresponding to the process instance and branch to which the asynchronous node belongs. The process instance to which the asynchronous node belongs is determined based on the process instance ID submitted by the user, and the branch to which the asynchronous node belongs is determined based on the branch ID submitted by the user.

[0185] Compare the node ID of the asynchronous node queried according to the function ID with the node ID of the node pointed to by the target node pointer. If the node ID of the asynchronous node is consistent with the node ID of the node pointed to by the target node pointer, it means that the branch to which the target node pointer belongs has just executed to the position of the asynchronous node, and then the execution process is suspended and is waiting for the third party to call back the target function. The third party calls the target function corresponding to the asynchronous node. The external action that the asynchronous node is waiting for has been completed, so the process orchestration engine can continue to execute the node after the asynchronous node in the business process. If the node ID of the asynchronous node is inconsistent with the node ID of the node pointed to by the target node pointer, an exception can be thrown.

[0186] In the above implementation process, by comparing the node identifier of the asynchronous node and whether the node identifier of the node pointed to by the target node pointer is consistent, it is determined whether to continue executing the node after the asynchronous node, which facilitates the control and management of the flow of execution logic between nodes in the process instance, ensuring the correctness and reliability of the process execution.

[0187] Optionally, the process orchestration engine can also determine the process instance and branch to which the asynchronous node belongs based on the process instance identifier and branch identifier queried using the function identifier, and locate the current asynchronous node in the branch based on the node identifier queried using the function identifier, and then continue to execute downward. That is, the node pointer may not be checked, and the node pointer may not even be implemented.

[0188] See also Fig.10 The schematic diagram of the structure of the process orchestration device provided in the embodiment of the present application is shown; the embodiment of the present application provides a process orchestration device 200, including:

[0189] The orchestration module 210 is used to generate the business process to be orchestrated in response to the node selection operation and the node parameter configuration operation based on the interface; wherein the node selection operation supports the selection of synchronous nodes and asynchronous nodes, the synchronous nodes represent tasks that can be executed without waiting for external actions, and the asynchronous nodes represent tasks that need to wait for external actions to be executed;

[0190] The execution module 220 is used to execute the nodes in the business process in sequence according to the order of the nodes in the business process.

[0191] Optionally, in an embodiment of the present application, in a process orchestration device, attributes of a node include a node identifier, a process instance identifier, and a branch identifier; wherein the node identifier is used to identify different nodes in a business process; each time a business process runs, a process instance is generated, and the process instance identifier is used to identify the process instance to which the node belongs; the process instance includes one or more branches, and the branch identifier is used to identify the branch to which the node belongs; a branch is a concurrent execution branch in a process instance.

[0192] Optionally, in an embodiment of the present application, the process orchestration device, if the external action corresponding to the asynchronous node is the action of the user submitting data on the target page, the execution module is also used to obtain the node identifier, process instance identifier and branch identifier of the asynchronous node; splice the node identifier, process instance identifier and branch identifier of the asynchronous node to generate the address of the target page; notify the user who executes the external action corresponding to the asynchronous node of the address of the target page in a preset manner; receive the data submitted by the user on the target page; the data includes business data, the node identifier, process instance identifier and branch identifier of the asynchronous node.

[0193] Optionally, in an embodiment of the present application, a process orchestration device is provided with a node pointer for each branch in a process instance, and the node pointer points to the currently executed node in the branch, and also includes: a first pointer judgment module, used to obtain the node identifier, process instance identifier and branch identifier of the asynchronous node from the data submitted by the user; determine the target node pointer based on the process instance identifier and the branch identifier, the target node pointer refers to the node pointer corresponding to the process instance and the branch to which the asynchronous node belongs; if the node identifier of the asynchronous node is consistent with the node identifier of the node pointed to by the target node pointer, then continue to execute the node after the asynchronous node in the business process.

[0194] Optionally, in an embodiment of the present application, in the process orchestration device, the target page includes a form page or an approval page.

[0195] Optionally, in an embodiment of the present application, the process orchestration device, if the target page is a form page of an edited form, the execution module is also used to obtain the form instance identifier corresponding to the edited form; the node identifier of the asynchronous node, the process instance identifier, the branch identifier and the form instance identifier are spliced ​​to generate the address of the target page; wherein the form instance identifier is used to query the form data of the edited form, and the form data is used to render the target page; the data submitted by the user on the target page includes: the updated form data, the node identifier of the asynchronous node, the process instance identifier, the branch identifier and the form instance identifier.

[0196] Optionally, in an embodiment of the present application, the preset method of the process orchestration device for notifying the user of the external action corresponding to the asynchronous node includes: a first method: obtaining user information of the user who executes the external action corresponding to the asynchronous node, and sending notification information to the user based on the user information, wherein the notification information includes the address of the target page; a second method: obtaining the user's to-do list, and generating a target representative item according to the address of the target page; the target representative item is used to instruct the user to enter the target page; the target representative item is added to the user's to-do list; a third method: obtaining the user's data list; generating an interactive button based on the address of the target page, and the interactive button is used to instruct the user to enter the target page; and adding the interactive button to the user's data list.

[0197] Optionally, in an embodiment of the present application, the process orchestration device, if the external action corresponding to the asynchronous node is an action of a third party to call back the target function; the execution module is also used to store the node identifier, process instance identifier and branch identifier of the asynchronous node in association with the function identifier of the target function corresponding to the asynchronous node; send the function identifier to the third party by calling an interface provided by the third party; in response to the third party's call to the target function through the function identifier, determine the node identifier, process instance identifier and branch identifier of the asynchronous node stored in association with the function identifier according to the function identifier of the called target function.

[0198] Optionally, in an embodiment of the present application, a process orchestration device is provided with a node pointer for each branch in a process instance, and the node pointer points to a node currently being executed in the branch. A second pointer judgment module is used to determine a target node pointer based on a process instance identifier and a branch identifier of an asynchronous node, and the target node pointer refers to a node pointer corresponding to the process instance and the branch to which the asynchronous node belongs; if the node identifier of the asynchronous node is consistent with the node identifier of the node pointed to by the target node pointer, then the node after the asynchronous node in the business process continues to be executed.

[0199] Optionally, in an embodiment of the present application, the process orchestration device, the nodes include loop nodes, the loop nodes are nodes that need to repeatedly execute sub-nodes in the loop body until the loop end condition is met; the parameters of the loop node include concurrency attributes; the execution module is also used to, when executing to the loop node, if the concurrency attribute of the loop node is configured for concurrent execution, generate the same number of secondary branches as the total number of values ​​of the loop variable of the loop node under the branch to which the loop node belongs; and use the secondary branches to concurrently execute the loop body under each value of the loop variable; when executing to the loop node, if the concurrency attribute of the loop node is configured for non-concurrent execution, use the branch to which the loop node belongs to repeatedly execute the loop body according to the change of the loop variable.

[0200] Optionally, in an embodiment of the present application, in the process orchestration device, if the concurrency attribute of the loop node is configured as concurrent execution, the execution result of the loop node is obtained according to the execution result corresponding to each secondary branch.

[0201] Optionally, in an embodiment of the present application, the process orchestration device also includes a branch destruction module, which is used to, if the concurrency attribute of the loop node is configured for concurrent execution, then the loop end conditions include: the execution of each secondary branch is completed, any secondary branch executes an instruction that requires the loop to be terminated early, or any secondary branch executes timeout; after the loop node is executed, the generated secondary branch is destroyed, and the branch to which the loop node belongs is used to continue executing the node in the business process.

[0202] Optionally, in an embodiment of the present application, in a process orchestration device, a generation rule for a node's branch identifier includes: if the node is not a child node of a loop node whose concurrency attribute is configured for concurrent execution, the node's branch identifier is consistent with the process instance identifier; if the node is a child node of a loop node whose concurrency attribute is configured for concurrent execution, the node's branch identifier is generated based on the branch identifier of the loop node that is closest to the node in the parent node of the child node and whose concurrency attribute is configured for concurrent execution, and the loop sequence number corresponding to the node; the loop sequence number corresponding to the node is the sequence number of the current value of the loop variable corresponding to the branch to which the node belongs among all values.

[0203] Optionally, in an embodiment of the present application, the business process includes a first node and a second node, wherein the execution order of the first node is before that of the second node; the node identifier, process identifier, branch identifier and execution result of the node are associated and stored after the node is executed; if the parameters configured by the second node include a reference to the execution result of the first node, the process orchestration device also includes an execution result acquisition module, which is used to obtain the node identifier and process identifier of the first node; in reverse order of the execution order of the business process, with the second node as the starting point, the nodes in the business process whose execution order is before the second node are queried, and during the query process, the branch identifier of each queried node is determined according to the generation rule of the branch identifier and the branch identifier of the second node; until the node identifier of the queried node is the node identifier of the first node, the branch identifier of the first node is determined as the branch identifier of the queried node; and the execution result of the first node stored in association with the node identifier, process identifier and branch identifier of the first node is obtained.

[0204] It should be understood that the device corresponds to the above-mentioned process orchestration method embodiment and can execute the various steps involved in the above-mentioned method embodiment. The specific functions of the device can be found in the above description. To avoid repetition, the detailed description is appropriately omitted here. The device includes at least one software function module that can be stored in a memory in the form of software or firmware or solidified in the operating system (OS) of the device.

[0205] See also Fig.11 The electronic device 300 provided in the embodiment of the present application includes: a processor 310 and a memory 320, wherein the memory 320 stores machine-readable instructions executable by the processor 310, and when the machine-readable instructions are executed by the processor 310, the above method is executed.

[0206] An embodiment of the present application further provides a storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the above method is executed.

[0207] Among them, the storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable red-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, disk or optical disk.

[0208] In several embodiments provided by the embodiments of the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to the multiple embodiments of the embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and a part of the module, program segment or code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0209] In addition, the functional modules in each embodiment of the present application can be integrated together to form an independent part, or each module can exist separately, or two or more modules can be integrated to form an independent part.

[0210] The above description is only an optional implementation manner of the embodiments of the present application, but the protection scope of the embodiments of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or replacements within the technical scope disclosed in the embodiments of the present application, which should be covered within the protection scope of the embodiments of the present application.

Claims

1. A process orchestration method, characterized in that: include: Generates the business process to be orchestrated in response to a node selection operation and a node parameter configuration operation based on the interface; wherein the node selection operation supports selecting synchronous nodes and asynchronous nodes, wherein the synchronous nodes represent tasks that can be executed without waiting for external actions, and the asynchronous nodes represent tasks that need to wait for external actions to be executed; Execute the nodes in the business process in sequence according to the order of the nodes in the business process; The attributes of the node include a node identifier, a process instance identifier, and a branch identifier; wherein the node identifier is used to identify different nodes in the business process; each time the business process runs, a process instance is generated, and the process instance identifier is used to identify the process instance to which the node belongs; the process instance includes one or more branches, and the branch identifier is used to identify the branch to which the node belongs; the branch is a concurrent execution branch in the process instance; If the external action corresponding to the asynchronous node is an action of a user submitting data on a target page, the steps of executing the asynchronous node include: obtaining the node identifier, process instance identifier, and branch identifier of the asynchronous node; concatenating the node identifier, process instance identifier, and branch identifier of the asynchronous node to generate the address of the target page; notifying the user who executes the external action corresponding to the asynchronous node of the address of the target page in a preset manner; receiving data submitted by the user on the target page; the data including business data, the node identifier, process instance identifier, and branch identifier of the asynchronous node; A node pointer is provided for each branch in the process instance, and the node pointer points to the currently executed node in the branch. After receiving the data submitted by the user on the target page, the method further includes: obtaining the node identifier, process instance identifier and branch identifier of the asynchronous node from the data submitted by the user; determining a target node pointer based on the process instance identifier and the branch identifier, the target node pointer being the node pointer corresponding to the process instance and the branch to which the asynchronous node belongs; if the node identifier of the asynchronous node is consistent with the node identifier of the node pointed to by the target node pointer, then continuing to execute the node after the asynchronous node in the business process; If the external action corresponding to the asynchronous node is an action of a third party to call back the target function; the steps of executing the asynchronous node include: storing the node identifier, process instance identifier and branch identifier of the asynchronous node in association with the function identifier of the target function corresponding to the asynchronous node; sending the function identifier to the third party by calling the interface provided by the third party; in response to the third party calling the target function through the function identifier, determining the node identifier, process instance identifier and branch identifier of the asynchronous node stored in association with the function identifier according to the function identifier of the called target function.

2. The method according to claim 1, characterized in that The target page includes a form page or an approval page.

3. The method according to claim 2, characterized in that If the target page is a form page of an edited form, then the node identifier, process instance identifier, and branch identifier of the asynchronous node are concatenated to generate the address of the target page, including: Obtain the form instance identifier corresponding to the edited form; The node identifier, process instance identifier, branch identifier and form instance identifier of the asynchronous node are concatenated to generate the address of the target page; wherein the form instance identifier is used to query the form data of the edited form, and the form data is used to render the target page; The data submitted by the user on the target page includes: updated form data, the node identifier of the asynchronous node, the process instance identifier, the branch identifier and the form instance identifier.

4. The method according to claim 1, wherein The preset method of notifying the user of the external action corresponding to the asynchronous node includes: The first method is: obtaining user information of a user who executes the external action corresponding to the asynchronous node, and sending notification information to the user based on the user information, wherein the notification information includes the address of the target page; The second method is to obtain the user's to-do list, generate a target representative item according to the address of the target page; the target representative item is used to instruct the user to enter the target page; and add the target representative item to the user's to-do list; The third method is: obtaining the user's data list; generating an interactive button based on the address of the target page, wherein the interactive button is used to instruct the user to enter the target page; and adding the interactive button to the user's data list.

5. The method according to claim 1, characterized in that A node pointer is set for each branch in the process instance, and the node pointer points to the currently executed node in the branch. After determining the node identifier, process instance identifier, and branch identifier of the asynchronous node stored in association with the function identifier, the method further includes: Determine a target node pointer based on the process instance identifier and the branch identifier of the asynchronous node, where the target node pointer refers to a node pointer corresponding to the process instance and the branch to which the asynchronous node belongs; If the node identifier of the asynchronous node is consistent with the node identifier of the node pointed to by the target node pointer, then the node following the asynchronous node in the business process continues to be executed.

6. The method according to claim 1, wherein The node includes a loop node, which is a node that needs to repeatedly execute child nodes in a loop body until a loop end condition is satisfied; the parameters of the loop node include a concurrency attribute; When executing the loop node, if the concurrency attribute of the loop node is configured as concurrent execution, generating, under the branch to which the loop node belongs, a number of secondary branches equal to the total number of values ​​of the loop variable of the loop node; and concurrently executing the loop body under each value of the loop variable by utilizing the secondary branch; When the loop node is executed, if the concurrency attribute of the loop node is configured as non-concurrent execution, the loop body is repeatedly executed according to the change of the loop variable by utilizing the branch to which the loop node belongs.

7. The method according to claim 6, characterized in that If the concurrency attribute of the loop node is configured as concurrent execution, the execution result of the loop node is obtained according to the execution result corresponding to each secondary branch.

8. The method according to claim 6, characterized in that If the concurrency attribute of the loop node is configured as concurrent execution, the loop end conditions include: each secondary branch is executed, any of the secondary branches executes an instruction that requires the loop to end early, or any of the secondary branches times out. After the execution of the loop node is completed, the generated secondary branch is destroyed, and the node in the business process is continued to be executed using the branch to which the loop node belongs.

9. The method according to claim 6, characterized in that The generation rules of the branch identifier of the node include: If the node is not a child node of a loop node whose concurrency attribute is configured to be executed concurrently, the branch identifier of the node is consistent with the process instance identifier; If the node is a child node of a loop node whose concurrency attribute is configured for concurrent execution, the branch identifier of the node is generated based on the branch identifier of the loop node closest to the node in the parent node of the child node and whose concurrency attribute is configured for concurrent execution, and the loop sequence number corresponding to the node; the loop sequence number corresponding to the node is the sequence number of the current value of the loop variable corresponding to the branch to which the node belongs among all values.

10. The method according to claim 9, characterized in that The business process includes a first node and a second node, wherein the execution order of the first node is before the second node; the node identifier, process instance identifier, branch identifier of the node and the execution result of the node are associated and stored after the node is executed; If the parameters configured by the second node include a reference to the execution result of the first node, the step of obtaining the execution result of the first node includes: Obtaining the node identifier and process instance identifier of the first node; In reverse order of the execution order of the business process, starting from the second node, querying nodes in the business process that are executed before the second node, and determining the branch identifier of each queried node according to a branch identifier generation rule and the branch identifier of the second node during the query process; until the node identifier of the queried node becomes the node identifier of the first node, determining the branch identifier of the first node as the branch identifier of the queried node; Obtain an execution result of the first node stored in association with the node identifier, process instance identifier, and branch identifier of the first node.

11. A process arrangement device, characterized in that: include: An orchestration module, configured to generate the business process to be orchestrated in response to interface-based node selection and node parameter configuration operations; wherein the node selection operation supports selecting synchronous nodes and asynchronous nodes, wherein the synchronous nodes represent tasks that can be executed without waiting for external actions, and the asynchronous nodes represent tasks that need to wait for external actions before execution; An execution module, configured to execute the nodes in the business process in sequence according to the order of the nodes in the business process; The attributes of the node include a node identifier, a process instance identifier, and a branch identifier; wherein the node identifier is used to identify different nodes in the business process; each time the business process runs, a process instance is generated, and the process instance identifier is used to identify the process instance to which the node belongs; the process instance includes one or more branches, and the branch identifier is used to identify the branch to which the node belongs; the branch is a concurrent execution branch in the process instance; If the external action corresponding to the asynchronous node is an action of the user submitting data on the target page, the execution module is further used to obtain the node identifier, process instance identifier and branch identifier of the asynchronous node; splice the node identifier, process instance identifier and branch identifier of the asynchronous node to generate the address of the target page; notify the user who executes the external action corresponding to the asynchronous node of the address of the target page in a preset manner; receive the data submitted by the user on the target page; the data includes business data, the node identifier of the asynchronous node, the process instance identifier and the branch identifier; The process orchestration device is provided with a node pointer for each branch in the process instance, and the node pointer points to the currently executed node in the branch. The process orchestration device also includes a first pointer judgment module, which is used to obtain the node identifier, process instance identifier and branch identifier of the asynchronous node from the data submitted by the user; determine the target node pointer based on the process instance identifier and the branch identifier, and the target node pointer refers to the node pointer corresponding to the process instance and the branch to which the asynchronous node belongs; if the node identifier of the asynchronous node is consistent with the node identifier of the node pointed to by the target node pointer, then continue to execute the node after the asynchronous node in the business process; If the external action corresponding to the asynchronous node is an action of a third party to call back the target function; the execution module is also used to store the node identifier, process instance identifier and branch identifier of the asynchronous node in association with the function identifier of the target function corresponding to the asynchronous node; send the function identifier to the third party by calling the interface provided by the third party; in response to the third party calling the target function through the function identifier, determine the node identifier, process instance identifier and branch identifier of the asynchronous node stored in association with the function identifier according to the function identifier of the called target function.

12. An electronic device, characterized in that: include: A processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and when the machine-readable instructions are executed by the processor, the method according to any one of claims 1 to 10 is performed.

13. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 10 is executed.

Citation Information

Patent Citations

  • Business process management method and device, electronic equipment and storage medium

    CN111695827A

  • Orchestration test method and device, electronic equipment and readable storage medium

    CN116107869A