Workflow debugging method and system
By decomposing the workflow into flow segments and tuning in a sandbox environment, the problem that existing tools are difficult to meet the tuning requirements is solved, and flexible tuning and efficient design of the workflow is realized.
Patent Information
- Application Number
- PCT/CN2024/078369
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-08-15
- Filing Date
- 2024-02-23
- Publication Date
- 2025-01-02
AI Technical Summary
Existing workflow surveillance tools are difficult to meet users' surveillance needs, especially when the workflow has not been designed or relies on the external environment, resulting in design efficiency and inefficiency.
Provide a workflow regulating method and system, by obtaining the regulating requirements from the workflow design interface, decompose the workflow into an independently adjustable flow segment, and perform regulating in a sandbox operating environment, supporting remote online regulating and simulate data processing to improve the flexibility and efficiency of tuning.
It realizes flexible tuning of workflows, improves tuning efficiency and user experience, helps users quickly discover design errors and optimizes workflow design, and makes full use of server resources.
Smart Images

Figure CN2024078369_02012025_PF_FP_ABST
Abstract
Description
Workflow debugging method and system
[0001] This application claims priority to the Chinese patent application with application number 202310776859.0 filed with the State Intellectual Property Office of China on June 28, 2023, priority to the Chinese patent application with invention name “Method and device for business flow debugging”, priority to the Chinese patent application with application number 202311027172.3 filed with the State Intellectual Property Office of China on August 15, 2023, priority to the Chinese patent application with invention name “Method and system for workflow debugging”, all contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of debugging technology, and more specifically, to a method and system for workflow debugging. Background Art
[0003] A workflow is an abstract, general description of the business rules governing a workflow and its various steps. Essentially, a workflow is a pipeline tool developed by users based on real-world business scenarios for deploying models or applications. As business scenarios continue to expand, user-created workflows are becoming increasingly complex, and the need for workflow debugging is also increasing.
[0004] Current workflow debugging tools are limited by various factors and struggle to meet user debugging needs. For example, during the workflow design phase, users cannot deploy the workflow to the runtime environment for debugging because the workflow is not yet complete or some nodes that rely on the external environment are temporarily unavailable. This significantly impacts workflow design efficiency.
[0005] Therefore, how to improve the commissioning efficiency has become an urgent problem to be solved.
[0006] Summary of the Invention
[0007] The present application provides a workflow debugging method and system, which are conducive to flexible debugging of workflows, thereby improving debugging efficiency and enhancing user experience.
[0008] In a first aspect, a workflow debugging method is provided, which is applied to a cloud platform, and the cloud platform is used to provide workflow design services. The method includes: obtaining a debugging requirement related to a first workflow from a workflow design interface, the debugging requirement indicating a flow segment to be debugged in the first workflow, the flow segment including one or more nodes in the first workflow, and when the flow segment includes multiple nodes, the flow segment also includes a connection relationship between the multiple nodes, and the connection relationship between the multiple nodes indicates the execution order of the multiple nodes; sending relevant information of the flow segment to a sandbox operating environment, the relevant information of the flow segment indicating the flow segment and the starting input of the flow segment; receiving an input debugging instruction; debugging the flow segment according to the debugging instruction in the sandbox operating environment; and outputting debugging information, the debugging information indicating the update of the operating status during the debugging process.
[0009] In the solution of the embodiment of the present application, a flow segment debugging service is provided to users, and the flow segment selected by the user is sent to the sandbox running environment, so that the user can debug the segment in the workflow, which is conducive to improving the flexibility of debugging, thereby improving the user experience, and at the same time helping to improve the debugging efficiency.
[0010] In addition, the solution of the embodiment of the present application can support remote online debugging, which is conducive to fully utilizing the resources on the server side and further improving the debugging efficiency.
[0011] Exemplarily, the relevant information of the stream segment may include the stream segment itself.
[0012] In combination with the first aspect, in some implementations of the first aspect, the method further includes: converting the flow segment into a second workflow, the relevant information of the flow segment indicating the second workflow and a starting input of the flow segment.
[0013] Exemplarily, converting the flow segment into the second workflow may include: adding an end node after part or all of the branches of the flow segment.
[0014] In the solution of the embodiment of the present application, the flow segment can be converted into a regular workflow. In this way, in the subsequent debugging process, it can be debugged as a regular workflow, thereby reusing the existing workflow debugging method, which is conducive to reducing costs and expanding the application scenarios of the solution.
[0015] In combination with the first aspect, in certain implementations of the first aspect, the starting input of the stream segment is starting simulation data, and the method also includes: adding a starting simulation node before the starting node of the stream segment; setting the starting simulation data on the starting simulation node to obtain a processed stream segment, and the relevant information of the stream segment indicates the processed stream segment.
[0016] The number of start nodes of a flow segment can be one or more. For example, a start simulation node is added before each start node of the flow segment.
[0017] The starting mock data is the input data of the starting node of the stream segment.
[0018] Illustratively, the starting simulation data may be system-generated.
[0019] If the flow fragment is converted into a workflow in the processing method, this will help to ensure the legitimacy of the converted workflow.
[0020] In combination with the first aspect, in certain implementations of the first aspect, the method further includes: acquiring initial simulation data from a design interface of the workflow.
[0021] The starting simulation data may be user input.
[0022] In combination with the first aspect, in some implementations of the first aspect, the method further includes: performing a semantic validity check on the stream segment, and if the check passes, sending relevant information of the stream segment to the sandbox operating environment.
[0023] In combination with the first aspect, in some implementations of the first aspect, the method further includes: acquiring setting information of a breakpoint, where the breakpoint is located inside the stream segment, and relevant information of the stream segment indicates the setting information of the breakpoint.
[0024] In combination with the first aspect, in some implementations of the first aspect, the method further includes: obtaining relevant information of simulated piling, where the relevant information of the stream segment indicates relevant information of the simulated piling.
[0025] For example, the relevant information of the mock piling may include the location of the mock piling.
[0026] In the embodiment of the present application, providing a debugging function for mock piling operations is conducive to further improving the flexibility of debugging, thereby improving user experience.
[0027] In combination with the first aspect, in certain implementations of the first aspect, the stream segment is debugged in the sandbox operating environment according to the debugging instruction, including: creating a running instance (instance) in the sandbox operating environment, the running instance corresponding to the stream segment; operating the running instance according to the input debugging instruction, and the debugging information indicates the update status of the running status of the running instance.
[0028] In combination with the first aspect, in some implementations of the first aspect, the method further includes: after the commissioning is completed, clearing the flow segment from the sandbox operating environment.
[0029] In a second aspect, a system for workflow debugging is provided, including: a console module, used to obtain debugging requirements related to a first workflow from a workflow design interface, the debugging requirements indicating a flow segment to be debugged in the first workflow, the flow segment including one or more nodes in the first workflow, and when the flow segment includes multiple nodes, the flow segment also includes a connection relationship between the multiple nodes, and the connection relationship between the multiple nodes indicates the execution order of the multiple nodes; a management module, used to send relevant information of the flow segment to a sandbox operating environment, the relevant information of the flow segment indicates the flow segment and the starting input of the flow segment; the console module is also used to receive input debugging instructions; the debugging module is used to debug the flow segment according to the debugging instructions in the sandbox operating environment; the console module is also used to output debugging information, and the debugging information indicates the update of the operating status during the debugging process.
[0030] In combination with the second aspect, in some implementations of the second aspect, the management module is further configured to: convert the flow segment into a second workflow, wherein the relevant information of the flow segment indicates the second workflow and a starting input of the flow segment.
[0031] In combination with the second aspect, in certain implementations of the second aspect, the starting input of the stream segment is starting simulation data, and the management module is also used to: add a starting simulation node before the starting node of the stream segment; set the starting simulation data on the starting simulation node to obtain a processed stream segment, and the relevant information of the stream segment indicates the processed stream segment.
[0032] In combination with the second aspect, in certain implementations of the second aspect, the console module is further configured to: obtain initial simulation data from a design interface of the workflow.
[0033] In combination with the second aspect, in some implementations of the second aspect, the management module is further used to: perform semantic legitimacy verification on the stream segment, and if the verification passes, send relevant information of the stream segment to the sandbox operating environment.
[0034] In combination with the second aspect, in certain implementations of the second aspect, the debugging module is specifically used to: create a running instance in the sandbox running environment, the running instance corresponding to the stream segment; operate the running instance according to the input debugging instructions, and the debugging information indicates the update status of the running status of the running instance.
[0035] In combination with the second aspect, in some implementations of the second aspect, the debugging module is further configured to: after the debugging is completed, clear the flow segment from the sandbox execution environment.
[0036] It should be understood that the expansion, limitation, explanation and description of the relevant content in the above-mentioned first aspect also apply to the same content in the second aspect.
[0037] In a third aspect, a computing device cluster is provided, comprising at least one computing device, each computing device including a processor and a memory. The processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster performs the method of the first aspect and any implementation of the first aspect.
[0038] In a fourth aspect, a computer-readable medium is provided, comprising computer program instructions. When the computer program instructions are executed by a computing device cluster, the computing device cluster executes the method in the first aspect and any one of the implementations of the first aspect.
[0039] In a fifth aspect, a computer program product comprising instructions is provided. When the instructions are executed by a computing device cluster, the computing device cluster executes the method in the above-mentioned first aspect and any one of the implementations of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 is a schematic diagram of a workflow.
[0041] FIG2 is a schematic flowchart of a workflow debugging method according to an embodiment of the present application.
[0042] FIG3 is a schematic diagram of an interactive operation according to an embodiment of the present application.
[0043] FIG4 is a schematic diagram of adding a starting mock node according to an embodiment of the present application.
[0044] FIG5 is a schematic diagram of a second workflow according to an embodiment of the present application.
[0045] FIG6 is a schematic diagram of another workflow debugging method according to an embodiment of the present application.
[0046] FIG7 is a schematic block diagram of a system for workflow debugging according to an embodiment of the present application.
[0047] FIG8 is a schematic block diagram of a computing device according to an embodiment of the present application.
[0048] FIG9 is a schematic block diagram of a computing device cluster according to an embodiment of the present application.
[0049] FIG10 is a schematic block diagram of another computing device cluster according to an embodiment of the present application. DETAILED DESCRIPTION
[0050] The technical solution in this application will be described below with reference to the accompanying drawings.
[0051] This application will present various aspects, embodiments, or features around systems including multiple devices, components, modules, etc. It should be understood and appreciated that each system may include additional devices, components, modules, etc., and / or may not include all of the devices, components, modules, etc. discussed in conjunction with the figures. Furthermore, combinations of these aspects may also be used.
[0052] In the embodiments of the present application, “corresponding” and “relevant” may sometimes be used interchangeably. It should be noted that when the distinction between them is not emphasized, the meanings they intend to express are consistent.
[0053] The business scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. A person skilled in the art will appreciate that, with the evolution of network architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are equally applicable to similar technical problems.
[0054] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in yet other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0055] In this application, "at least one" means one or more, and "more" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: including the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0056] Workflow, also known as business flow, is an abstract and general description of the business rules between the workflow and its various operation steps.
[0057] Essentially, a workflow is a pipeline tool that developers use to deploy models or applications based on real-world business scenarios. Within a workflow, individual business logic elements can be referred to as tasks, tasks, activities, or tasks. A workflow can be represented as a graph structure, such as a directed acyclic graph (DAG). A DAG consists of a description of nodes and the relationships between them. Each piece of business logic can be considered a node. The lines connecting nodes describe these relationships and indicate the order in which tasks are executed.
[0058] Figure 1 shows a schematic diagram of a workflow. The first node in the workflow is the starting node. The direction indicated by the arrow represents the execution order. The last node indicated by the arrow in Figure 1 is the end node of the workflow, and the identification type of the node is "end node". It should be understood that the number of nodes, the connections between the nodes, etc. in Figure 1 are examples and do not constitute a limitation on the solutions of the embodiments of the present application. For example, only one end node is shown in the workflow shown in Figure 1. In other possible scenarios, a workflow may include multiple end nodes.
[0059] Generally speaking, a workflow can exist in two states: design time and runtime time. When designing a workflow, users describe the nodes and the relationships between them, defining the execution content and order of the nodes. This workflow design operation is collectively referred to as the workflow's design state. After finalizing the entire workflow, users can solidify the workflow for subsequent scheduling and execution. The state of a workflow's scheduled execution is collectively referred to as the workflow's runtime state. Workflow provides a visual way to run the workflow.
[0060] Current workflow debugging tools (debuggers) are limited by various reasons and are unable to meet users' debugging needs.
[0061] In view of this, embodiments of the present application provide a workflow debugging method for debugging workflow fragments in a workflow, which facilitates flexible workflow debugging and improves debugging efficiency. During the process of workflow design, the solution of embodiments of the present application helps users promptly discover errors or defects in workflow design, thereby improving the efficiency and accuracy of workflow design.
[0062] In the solution of the embodiment of the present application, the workflow segment may also be referred to as a flow segment for short.
[0063] The solution of the embodiment of the present application can be applied to various workflow debugging scenarios.
[0064] For example, in a possible debugging scenario, the business flow has not yet been designed. By adopting the solution of the embodiment of the present application, part or all of the completed design content can be used as the flow segment to be debugged, and the flow segment can be debugged, which is conducive to flexible debugging of the workflow and improves the debugging efficiency. This can help users to promptly discover errors or defects in the currently completed design, so that users can adjust or modify it as soon as possible.
[0065] For example, in a possible debugging scenario, some nodes require external dependencies, for example, they need to connect to certain connectors and data sources, but the external dependencies cannot be introduced or are inconvenient to introduce at present. By adopting the solution of the embodiment of the present application, the design content that does not require external dependencies can be used as a flow segment, and the flow segment can be debugged. Alternatively, by adopting the solution of the embodiment of the present application, the design content including nodes that require external dependencies can be used as a flow segment, and the nodes that require external dependencies can be processed, and then the flow segment can be debugged. This is conducive to achieving flexible debugging of the workflow and improving debugging efficiency. This can help users to promptly discover errors or defects in the currently completed design, so that users can adjust or modify it as soon as possible.
[0066] For example, in one possible commissioning scenario, the service flow is relatively complex, and commissioning the entire service flow may be time-consuming. Using the solution of the embodiments of the present application, some of the design content can be used as flow segments for commissioning, which facilitates flexible commissioning of the workflow and improves commissioning efficiency.
[0067] For example, in a possible debugging scenario, the user modifies part of the content in the business flow. The solution of the embodiment of the present application can be used to use the modified design content as a flow segment and debug the flow segment, which is conducive to flexible debugging of the workflow and improves debugging efficiency.
[0068] It should be understood that the above is only an example, and the solution of the embodiment of the present application can also be applied to other debugging scenarios, and the embodiment of the present application is not limited to this.
[0069] The solution of the embodiment of the present application can be applied to the scenario of local commissioning, and can also be applied to the scenario of remote commissioning.
[0070] Figure 2 illustrates a workflow commissioning method provided by an embodiment of the present application. Method 200 can be executed by a workflow commissioning system. This system can be deployed in a user's local environment, meaning that method 200 can be applied in local commissioning scenarios. Alternatively, this system can be applied to a cloud platform that provides workflow design services. This cloud platform includes a client and a server, meaning that method 200 can be applied in remote commissioning scenarios.
[0071] As shown in FIG2 , method 200 includes the following steps.
[0072] 210. Acquire a debugging requirement related to the first workflow from a workflow design interface. The debugging requirement indicates a flow segment to be debugged in the first workflow.
[0073] The commissioning requirements associated with the first workflow can also serve as information indicating a flow segment to be commissioned in the first workflow. The flow segment includes one or more nodes in the first workflow. If the flow segment includes multiple nodes, the flow segment also includes the connection relationships between the multiple nodes. In other words, the flow segment also includes the edges between the multiple nodes.
[0074] The flow segment can be any segment in the first workflow.
[0075] The first workflow may also be referred to as an original workflow, that is, a workflow designed by a user.
[0076] The “first” in the first workflow is only used to indicate that the workflow is designed by the user and does not have any other limiting effect.
[0077] The first workflow is a workflow in the design state. The first workflow can be a workflow that has not yet been designed, for example, as shown in Figure 3. Alternatively, the first workflow can also be a workflow that has been designed, for example, as shown in Figure 1.
[0078] Exemplarily, the test requirement may be obtained through a user input operation. For example, step 210 may include: receiving a first input operation from the user. Based on the first input operation, the stream segment to be tested may be determined.
[0079] The following is an example of the process of obtaining the commissioning requirement.
[0080] Users can design workflows in the interactive interface, which can be used to obtain user input.
[0081] This interactive interface, also known as a user interface, is a workflow design interface and is a visual graphical interface. A workflow can be represented as a graph structure. Specifically, in the user interface, a first workflow can be represented by one or more nodes and edges between them. An edge between two nodes, i.e., the connection between the two nodes, indicates the execution order of the two nodes.
[0082] Exemplarily, step 210 may include: receiving a first input operation performed by a user on an interactive interface, wherein the interactive interface displays a first workflow. The first input operation may be used to determine the workflow segment.
[0083] The user can operate on the interactive interface to select a stream segment to be debugged, and the stream segment can be determined according to the user's input operation.
[0084] In actual applications, one or more operation modes may be set so that the user can select a flow segment from the first workflow.
[0085] For example, the user's first input operation may include a click operation on at least one node in the first workflow. The clicked node is a node in the workflow segment. That is, the user can select the workflow segment by clicking on it in the interactive interface.
[0086] For another example, the user's first input operation may include a user selecting a first area. The segment in the first area of the first workflow is the flow segment. The user can select the flow segment by performing a selection operation in the interactive interface. FIG3 shows a schematic diagram of a selection operation. The segment in the dashed box in FIG3 is the flow segment.
[0087] For another example, the user's first input operation can be performed using a mouse, that is, the user clicks or selects the stream segment using the mouse. Alternatively, the user's first input operation can be performed using a touch screen, that is, the user clicks or selects the stream segment using a touch operation on the touch screen.
[0088] It should be understood that the above is only an example, and the embodiment of the present application does not limit the specific implementation method of the first input operation.
[0089] In a scenario where method 200 is applied to remote commissioning, step 210 may be performed by a client, for example, by controlling the display of the first workflow in the interactive interface and receiving a first input operation from the user.
[0090] For example, the client may be a client browser. In other words, the user interface may be displayed on a web page of the browser.
[0091] For another example, the client may be client software, or a client application (APP). In other words, the user interface may be displayed on a page of the client software.
[0092] For example, if the method 200 is applied to a remote debugging scenario, the client can obtain the user's debugging requirements based on interaction with the user and initiate a debugging request to the server, where the debugging request indicates the stream segment.
[0093] 220. Send the relevant information of the stream segment to the sandbox operating environment.
[0094] For example, if the method 200 is applied to a remote debugging scenario, step 230 may be performed by the server. After receiving the debugging request, the server may send the relevant information of the stream segment to the sandbox operating environment.
[0095] In a possible implementation, the relevant information of the stream segment may include the stream segment itself.
[0096] In another possible implementation, step 220 may include: processing the stream segment; and sending the processed stream segment to the sandbox execution environment.
[0097] In this case, the relevant information of the stream segment may include the processed stream segment.
[0098] Furthermore, the relevant information of the stream segment may also indicate the start input of the stream segment.
[0099] The specific processing method can be found in the following text and will not be described in detail here.
[0100] 230 , debugging the stream segment in the sandbox operating environment.
[0101] If the stream segment is processed in step 220 , step 230 may also be understood as debugging the processed stream segment.
[0102] For example, if the method 200 is applied to a remote debugging scenario, step 230 may be performed by the server side. The server side starts debugging the stream segment in a sandbox operating environment.
[0103] In step 230, the stream segment may be interactively debugged in the sandbox runtime environment.
[0104] Optionally, step 230 may include: receiving an input debugging instruction; debugging the stream segment according to the debugging instruction in the sandbox running environment; and outputting debugging information, where the debugging information indicates an update of the running status during the debugging process.
[0105] In the solution of the embodiment of the present application, a flow segment debugging service is provided to the user, and the flow segment selected by the user is sent to the sandbox operating environment, so that the user can debug the segment in the workflow, which is conducive to improving the flexibility of debugging, thereby improving the user experience, and at the same time helping to improve the debugging efficiency. For example, using the solution of the embodiment of the present application, the user can flexibly select the flow segment for debugging, avoiding the situation where the workflow cannot be debugged due to incomplete business flow design or unavailable external dependencies, thereby improving the user experience. For another example, using the solution of the embodiment of the present application, the user can flexibly select the flow segment for debugging. This is conducive to helping users quickly locate and correct errors or defects in the workflow design process, etc., and is conducive to assisting users in achieving fast and accurate design of workflows.
[0106] In addition, the solution of the embodiment of the present application can support remote online debugging, which is conducive to fully utilizing the resources on the server side and further improving the debugging efficiency.
[0107] Illustratively, during the debugging process, the initial input of the stream segment may be mock data.
[0108] Optionally, the method 200 may further include step 211 (not shown in the figure).
[0109] 211, get the initial mock data.
[0110] Exemplarily, the initial mock data may be input by a user.
[0111] Optionally, step 211 may include: acquiring initial mock data from a design interface of the workflow.
[0112] In a scenario where method 200 is applied to remote debugging, step 211 can be performed by the client, i.e., the client obtains the initial mock data entered by the user. In this case, the debugging request initiated by the client to the server can also indicate the initial mock data. Accordingly, the relevant information of the stream segment sent to the sandbox environment can indicate the initial mock data.
[0113] Alternatively, the initial mock data can be system-generated. For example, the system can generate the initial mock data based on default values or user historical data. Alternatively, the system can also generate it intelligently based on the scenario. The embodiments of this application do not limit the method for generating the initial mock data.
[0114] For example, if method 200 is applied to a remote debugging scenario, step 211 can be performed by the server, that is, the server generates the starting mock data. The relevant information of the stream segment sent to the sandbox operating environment can indicate the stream segment of the starting mock data. Alternatively, step 211 can be performed by the client, that is, the client generates the starting mock data. In this case, the debugging request initiated by the client to the server can indicate the starting mock data. Accordingly, the relevant information of the stream segment sent to the sandbox operating environment can indicate the starting mock data.
[0115] It should be understood that the above is only an example, and the initial mock data can also be obtained through other methods, which are not limited in the embodiments of the present application.
[0116] The following uses Examples 1 to 3 as examples to illustrate the process of processing stream segments.
[0117] Example 1:
[0118] Optionally, processing the stream segment may include: performing semantic validity verification on the stream segment.
[0119] For example, if the semantic validity check passes, the processed stream segment can be sent to the sandbox environment. If no other processing is performed on the stream segment, then if the semantic validity check passes, the stream segment can be sent to the sandbox environment. If the semantic validity check fails, the commissioning process can be terminated and relevant information about the stream segment will not be sent to the sandbox environment. Furthermore, a prompt message can be output to inform the user that the stream segment cannot be commissioned.
[0120] Example 2:
[0121] Optionally, processing the stream segment may include: adding a starting mock node before the starting node of the stream segment; and setting the starting mock data on the starting mock node to obtain a processed stream segment. In this case, the relevant information of the stream segment may indicate the processed stream segment, i.e., the stream segment to which the starting mock node is added and the starting mock data is set, thereby achieving indication of the stream segment and the starting mock data.
[0122] The start node of the flow segment refers to the first node to be executed in the flow segment. The start mock data is the input data of the start node of the flow segment.
[0123] If the stream segment includes multiple starting nodes, starting mock nodes can be added before each of the multiple starting nodes, and the starting mock data corresponding to each starting node can be set on the corresponding starting mock node. The starting mock data corresponding to a starting node is the input data of the starting node. The starting mock node corresponding to a starting node is the starting mock node added before the starting node. For ease of description, the embodiment of the present application is mainly explained by taking the example of a stream segment including one starting node, and does not limit the solution of the embodiment of the present application.
[0124] In order to meet the validity of the workflow, the starting input of the workflow needs to be set on the starting node of the workflow.
[0125] Figure 4 shows a schematic diagram of adding a starting mock node. For example, as shown in Figure 4, the stream segment originally includes a starting node. A mock node (i.e., the starting mock node) is added before the stream segment as the starting node. That is, the starting mock node becomes the new starting node, and the starting mock data is set on the starting node.
[0126] If the flow fragment is subsequently converted into a workflow, this helps to ensure the legitimacy of the converted workflow.
[0127] Should be understood that the above steps are optional steps.For example, if the original starting node of this stream segment is the actual starting node of the first workflow, then there is no need to add a starting mock node, and the starting mock data are set on this starting node.If the part starting node in the multiple original starting nodes that this stream segment comprises is the actual starting node of the first workflow, then there is no need to add a starting mock node before this part of the starting nodes, and the starting mock data corresponding to this part of the starting nodes are respectively set on this part of the starting nodes.Add starting mock nodes respectively before the remaining starting nodes of this stream segment, and the starting mock data corresponding to the remaining starting nodes are respectively set on the corresponding starting mock nodes.
[0128] Example 3:
[0129] Optionally, processing the stream segment may include converting the stream segment into a second workflow. Accordingly, the relevant information of the stream segment may indicate the second workflow and a starting input of the stream segment.
[0130] In this case, the relevant information of the flow segment sent to the sandbox execution environment may include the second workflow.
[0131] The "second" in "second workflow" is only used to limit the workflow to be converted from flow fragments and has no other limiting effect.
[0132] The second workflow can be a complete workflow. Based on the validity of the workflow, the last node of all branches of the workflow must be an end node. The last node of a branch is the last node executed in that branch. The end node can also be understood as the node marked as "end".
[0133] Exemplarily, converting the flow segment into the second workflow may include: adding an end node after part or all of the branches of the flow segment.
[0134] This helps to ensure the legitimacy of the converted second workflow.
[0135] For example, if the last node of some branches in the flow segment is the actual end node in the first workflow, there is no need to add end nodes for these branches. You can add end nodes only for the remaining branches. If the last node of all branches in the flow segment is not the actual end node in the first workflow, you can add end nodes after all branches.
[0136] It should be understood that the above steps are optional. For example, if the last nodes of all branches in the flow segment are the actual end nodes in the first workflow, then there is no need to add an end node.
[0137] Furthermore, processing the flow segment may further include: performing a workflow validity check on the second workflow.
[0138] Content that meets the workflow's legality check can be considered a successfully converted workflow. That is, if the workflow passes the legality check, the second workflow is a successfully converted workflow. If the workflow fails the legality check, the second workflow is a failed conversion workflow. The relevant information of the flow segment sent to the sandbox runtime environment may include the second successfully converted workflow. Furthermore, if the workflow fails the legality check, a prompt message can be output to inform the user that the flow segment cannot be debugged.
[0139] Example 2 and Example 3 can be used in combination. In this case, the starting input of the second workflow is the starting mock data. Figure 5 shows a schematic diagram of the second workflow. As shown in Figure 5, in Example 3, the stream segment processed in Example 2 can be converted into a second workflow, and the starting node of the second workflow is the starting mock node, and the starting mock data is set on the starting mock node. Accordingly, the relevant information of the stream segment can indicate the second workflow with the starting mock data set.
[0140] In the solution of the embodiment of the present application, the flow segment can be converted into a regular workflow. In this way, in the subsequent debugging process, it can be debugged as a regular workflow, thereby reusing the existing workflow debugging method, which is conducive to reducing costs and expanding the application scenarios of the solution.
[0141] It should be understood that the above is only an example. In other implementations, a dedicated debugging tool may be designed for the stream segment. In this case, the original stream segment may be directly sent to the sandbox operating environment.
[0142] Examples 1 to 3 can be used in combination. For example, first execute the solution in Example 1. If the semantic validity check passes, then execute the solutions in Examples 2 and 3, and then issue the processed stream segments. For another example, first execute the solutions in Examples 2 and 3, then execute the solution in Example 1. If the semantic validity check passes, then issue the processed stream segments. The above are only examples, and the embodiments of this application do not limit the processing order of Examples 1 to 3.
[0143] The output of the last node of all branches of the flow segment can be returned to the user as the output result of the second workflow. For example, the result of the second workflow can be returned to the user interface and displayed through the user interface.
[0144] Furthermore, the method 200 may further include obtaining breakpoint setting information, and sending the breakpoint setting information to the sandbox execution environment. The breakpoint is located within the stream segment.
[0145] Exemplarily, the breakpoint setting information may include the location of the breakpoint, etc.
[0146] The number of breakpoints can be one or more, which is not limited in the present embodiment.
[0147] Breakpoints can be set at any node in a flow segment.
[0148] Optionally, the interactive interface in step 210 may also be used to obtain breakpoint setting information.
[0149] Exemplarily, the interactive interface may be used to receive a second input operation from the user, where the second input operation is used to determine breakpoint setting information.
[0150] The user can operate on the interactive interface to select a node on which a breakpoint needs to be set to add a breakpoint, and the setting information of the breakpoint can be determined according to the user's second input operation.
[0151] For example, the second input operation of the user may include the user clicking one or more nodes in the flow segment with the right button of the mouse, and selecting “Add Breakpoint” from the displayed tab.
[0152] It should be understood that the above is only an example, and the embodiments of the present application do not limit the setting method of the breakpoints.
[0153] For example, if method 200 is applied to a remote debugging scenario, the breakpoint setting information can be obtained by the client and sent to the server. For example, the debugging request can also be used to indicate the breakpoint setting information. Alternatively, the breakpoint setting information can also be sent independently by the client to the server.
[0154] Furthermore, the method 200 may further include obtaining information related to mock stubbing, where the location of the mock stubbing is related to the stream segment. In this case, the information related to the stream segment may further include information related to the mock stubbing.
[0155] For example, the relevant information of the mock piling may include the location of the mock piling.
[0156] The location of the mock piling is the node where the mock piling operation is performed. The nodes of the mock piling operation can be one or more. This embodiment of the application does not limit this.
[0157] For example, the mock stubbing location may be located within a flow segment, and the node of the mock stubbing operation may include any node of the flow segment.
[0158] Alternatively, the mock stub locations may include nodes outside the flow fragment that the nodes in the flow fragment depend on.
[0159] Optionally, the interactive interface in step 210 can also be used to obtain relevant information about mock stubbing.
[0160] Exemplarily, the interactive interface may be used to receive a third input operation from the user, where the third input operation is used to determine relevant information for mock stubbing.
[0161] The user can operate on the interactive interface to perform a mock piling operation, and information of the mock piling operation can be determined according to the user's third input operation.
[0162] For example, the third input operation of the user may include the user clicking one or more nodes in the flow segment with the right button of the mouse, and selecting “mock stubbing operation” from the displayed tab.
[0163] It should be understood that the above is only an example, and the embodiments of the present application do not limit the specific implementation method of the mock piling operation.
[0164] The following is an exemplary description of the processing flow of stream segments in the case of mock stubbing operation.
[0165] Optionally, processing the stream segment may include replacing the input of node #1 with mock data #1 to obtain a replaced stream segment, where the input of node #1 depends on the output of node #2, and node #2 is a node for the mock stubbing operation. Accordingly, the relevant information of the stream segment sent to the sandbox execution environment indicates mock data #1.
[0166] If the user performs a mock stubbing operation, the output of the node of the mock stubbing operation (for example, node #2) can be replaced with mock data #1.
[0167] Node #2 may be a node within the stream segment, or may be a node outside the stream segment.
[0168] The number of mock data #1 and the number of nodes in the mock stubbing operation are the same. Mock data #1 and the nodes in the mock stubbing operation have a one-to-one correspondence.
[0169] For example, mock data #1 may be input by a user.
[0170] For example, if method 200 is applied to a remote debugging scenario, the client can obtain mock data #1 input by the user. The mock stubbing related information can also include mock data #1. The debugging request initiated by the client to the server can also indicate mock data #1.
[0171] Alternatively, the mock data #1 may be system generated.
[0172] For example, if method 200 is applied to a remote debugging scenario, mock data #1 may be generated by the server.
[0173] It should be understood that the above is only an example, and mock data #1 can also be obtained through other methods, which is not limited in this embodiment of the present application.
[0174] The above-mentioned processing flow related to the mock stubbing operation can be used in combination with Examples 1 to 3. For example, the above-mentioned processing flow related to the mock stubbing operation can be used in combination with Example 3, for example, to convert the replaced flow segment into a second workflow. That is, the input of node #1 in the second workflow is mock data #1.
[0175] Exemplarily, replacing the input of node #1 with mock data #1 may include: replacing node #2 with mock node #1, and setting mock data #1 on mock node #1.
[0176] That is, if the mock stubbing node is located in the stream segment, the node of the mock stubbing operation can be replaced with mock node #1, and mock data #1 can be set to mock node #1.
[0177] The mock nodes used to replace the nodes in the mock stubbing operation can be referred to as mock nodes #1. The data used to replace the output of mock nodes #1 can be referred to as mock data #1.
[0178] The number of mock nodes #1 is the same as the number of nodes in the mock stubbing operation. The mock nodes #1 correspond one to one with the nodes in the mock stubbing operation.
[0179] In this way, the second workflow includes mock node #1 and no longer includes the mock stubbing node.
[0180] Step 230 is described below.
[0181] Optionally, interactive debugging of the stream segments may include the following steps.
[0182] 231. Create a running instance. The running instance corresponds to the stream segment.
[0183] 232 , interactive debugging is performed based on the running instance.
[0184] Exemplarily, the running instance may be the running instance of the stream segment. In this case, in step 232, interactive debugging is performed based on the running instance of the stream segment.
[0185] Exemplarily, the running instance may be a running instance of a processed stream segment. In this case, in step 232, interactive debugging is performed based on the running instance of the processed stream segment.
[0186] For example, the second workflow may be delivered to the sandbox runtime environment in step 220. The following provides an exemplary description of step 230 based on this.
[0187] In step 231, a running instance of the second workflow may be created in the sandbox running environment. In step 232, interactive debugging is performed based on the running instance of the second workflow.
[0188] Exemplarily, step 232 may include steps (1) to (3).
[0189] (1) Obtain the debugging instructions.
[0190] Illustratively, the debugging instruction may include any one or more of the following: an instruction to add a breakpoint, an instruction to execute a single-step operation, an instruction to execute to the next breakpoint, and the like.
[0191] Exemplarily, the debugging instruction may be an instruction input by the user after the interactive debugging is started.
[0192] For example, if the method 200 is applied to a remote debugging scenario, the client may obtain a debugging instruction input by a user and send the debugging instruction to the server.
[0193] Alternatively, the debugging instruction may be a user-entered instruction before initiating interactive debugging. For example, the debugging instruction may be breakpoint setting information. In step 220, the client may send relevant information about the stream segment to the sandbox runtime environment. The relevant information about the stream segment may include the breakpoint setting information.
[0194] (2) Operate the running instance according to the input debugging instructions.
[0195] Perform corresponding operations on the running instance based on the debugging instructions, such as adding breakpoints, single-stepping, or running to the next breakpoint.
[0196] (3) Outputting debugging information, where the debugging information indicates the update of the running status of the running instance.
[0197] When the running status of the running instance is updated, for example, when it runs to a breakpoint or when the breakpoint data is updated, the update can be returned to the user to prompt the user of the current running status.
[0198] For example, if method 200 is applied to a remote debugging scenario, the running instance can be run in a sandbox running environment on the server side, and the debugging information can be sent to the client, which can provide it to the user through a user interface.
[0199] Furthermore, after the commissioning is completed, the stream segment can be cleared from the sandbox operating environment.
[0200] The judgment conditions for the end of commissioning can be set as needed.
[0201] For example, the completion of a flow segment operation can end the current debugging process.
[0202] For another example, when a user input instruction to end the debugging is obtained, the current debugging process can be ended.
[0203] When method 200 is applied to a remote debugging scenario, communication is required between the client and the server.
[0204] Real-time communication can be used between the client and the server.
[0205] Optionally, the client and server communicate via WebSocket.
[0206] Real-time communication helps ensure client and server state synchronization, enabling real-time interactive commissioning. Specifically, information such as user commands and commissioning requests received by the client can be promptly transmitted to the server. Commissioning information from the server can also be promptly reported to the client. This improves commissioning efficiency, reduces latency, and enhances user experience.
[0207] It should be understood that the above is only an example, and in other possible implementations, other real-time communication methods may also be used. In addition, in some possible implementations, real-time communication may not be used between the client and the server. For example, the server may push debugging information to the client through server-send events (SSE). For another example, the client may send instructions to the server through the secure hypertext transfer protocol (HTTPs). The embodiments of the present application do not limit the specific method of communication.
[0208] Figure 6 shows a schematic diagram of another workflow debugging method provided by an embodiment of the present application. The process shown in Figure 6 may be a specific implementation of method 200. To avoid repetition, some descriptions of the process shown in Figure 6 are appropriately omitted.
[0209] As shown in FIG. 6 , the system 300 may include a workflow console 310 , a workflow manager 320 , and a workflow sandbox operating environment 330 .
[0210] The workflow sandbox runtime environment can also be called the workflow sandbox runtime (workflowsandboxruntime).
[0211] In one possible implementation, the workflow console 310, workflow manager 320, and workflow sandbox runtime environment 330 can be three modules deployed on the same device. In this case, the workflow debugging system 300 can also be referred to as a workflow debugging apparatus 300, which can be applied to local workflow debugging scenarios. In this case, communication between the workflow console 310, workflow manager 320, and workflow sandbox runtime environment 330 can be implemented based on internal device communication methods, for example, via a bus.
[0212] In another possible implementation, the workflow console 310, the workflow manager 320 and the workflow sandbox operating environment 330 can be deployed in different devices. The system 300 can be applied to the scenario of remote debugging of workflows. Among them, the workflow console 310 can be deployed in a local device. In other words, the workflow console 310 is deployed on the client. The workflow manager 320 and the workflow sandbox operating environment 330 can be deployed in a remote device. In other words, the workflow manager 320 and the workflow sandbox operating environment 330 can be deployed on the server side. The workflow manager 320 and the workflow sandbox operating environment 330 can be deployed on the same remote device or on different remote devices. For example, if the server side adopts a layered architecture, the workflow manager 320 and the workflow sandbox operating environment 330 can be deployed in different layers. The specific architecture of the server side in the embodiment of the present application is not limited.
[0213] The workflow console 310 may be used to provide a user interface, receive user input operations to obtain relevant information, and send the relevant information to the workflow manager 320 .
[0214] The workflow console 310 can be configured to obtain a commissioning request related to the first workflow input by the user and send the commissioning request to the workflow manager 320. The commissioning request indicates the workflow segment. For example, the workflow console 310 can determine the workflow segment based on the first input operation of the user in the interactive interface and send the workflow segment to the workflow manager 320.
[0215] Optionally, the workflow console 310 can also be used to obtain initial mock data and send the initial mock data to the workflow manager 320. For example, the workflow console 310 can obtain initial mock data input by the user and send a commissioning request to the workflow manager 320. The commissioning request also indicates the initial mock data.
[0216] Optionally, the workflow console 310 may also be used to obtain breakpoint setting information and send the breakpoint setting information to the workflow manager 320 .
[0217] For example, the workflow console 310 may also be used to obtain breakpoint setting information and send a debugging request to the workflow manager 320. The debugging request may also indicate the breakpoint setting information.
[0218] Optionally, the workflow console 310 can also be used to obtain information related to the mock stubbing operation and send the information related to the mock stubbing operation to the workflow manager 320. For example, the workflow console 310 can obtain the initial mock data input by the user and send a commissioning request to the workflow manager 320. The commissioning request also indicates information related to the mock stubbing operation.
[0219] Furthermore, during the interactive debugging process, the workflow console 310 can also be used to obtain debugging instructions input by the user and send the debugging instructions to the workflow manager 320. For example, breakpoint setting information can be sent to the workflow manager 320 as a debugging instruction.
[0220] The workflow manager 320 may be configured to process the flow segments and send the processed flow segments to the sandbox execution environment 330 .
[0221] Optionally, the workflow manager 320 may be configured to verify the semantic validity of the flow segments.
[0222] Optionally, the workflow manager 320 may be configured to add a starting mock node before the starting node of the flow segment and set the starting mock data on the starting mock node. Alternatively, the workflow manager 320 may be configured to set the starting mock data on the starting node of the flow segment, where the starting node of the flow segment is the starting node of the first workflow.
[0223] Optionally, the workflow manager 320 may be configured to convert the flow segment into a workflow, ie, a second workflow.
[0224] The processed stream segments can be debugged in the sandbox operating environment 330 .
[0225] Specifically, a running instance of the processed stream segment may be created in the sandbox running environment 330 , and then interactive debugging may be performed on the running instance through the debugging service.
[0226] Exemplarily, the workflow manager 320 may send the second workflow to the sandbox runtime environment 330 , create a running instance of the second workflow in the sandbox runtime environment 330 , and then interactively debug the running instance through the debugging service.
[0227] The user's debugging instructions can be sent to the workflow manager 320 through the workflow console 310. The workflow manager 320 then sends the debugging instructions to the sandbox runtime environment 330. The debugging service can perform corresponding operations on the running instance based on the debugging instructions. The updated running status of the running instance can be reported to the workflow manager 320, which then sends it to the workflow console 310 and displays it to the user through the user interface.
[0228] The specific description of the execution content of each of the above modules / units can be referred to method 200 or method 300, which will not be described in detail here.
[0229] The workflow debugging method 300 performed by the system 300 may include the following steps.
[0230] S31, the workflow console 310 obtains a debugging requirement.
[0231] Step S31 corresponds to step 210 in method 200 .
[0232] The user can operate on the user interface provided by the workflow console 310 to select the segment to be debugged, i.e., the flow segment, from the workflow currently displayed in the user interface (i.e., the first workflow). For example, the user can click on the flow segment with a mouse or select a flow segment with a box. The workflow console 310 can determine the flow segment based on the user's operation.
[0233] It should be understood that the above is only an example, and for other methods of obtaining the commissioning requirements, reference can be made to the relevant descriptions of step 210 and step 220 above.
[0234] Furthermore, the user may also input starting mock data as the starting input of the flow segment. The workflow console 310 may also be used to obtain starting mock data.
[0235] It should be understood that the above is only an example, and other methods for obtaining the initial mock data can refer to the relevant description in the above method 200.
[0236] Furthermore, the user can also set breakpoints for any node on the user interface. The workflow console 310 can also be used to obtain breakpoint setting information.
[0237] For a detailed description of the breakpoint setting information, please refer to the relevant description in the above method 200, which will not be repeated here.
[0238] Furthermore, the user can also perform a mock stubbing operation on any node on the user interface. The workflow console 310 can also be used to obtain relevant information of the mock stubbing operation.
[0239] For a detailed description of the relevant information of the mock piling operation, please refer to the relevant description in the above method 200, which will not be repeated here.
[0240] S32: The workflow console 310 sends a debugging request to the workflow manager 320. The debugging request indicates the flow segment to be debugged.
[0241] Exemplarily, the test request may include the stream segment to be tested.
[0242] For example, after selecting a flow segment, the user can perform a one-key operation, such as clicking a related control, to trigger the workflow console 310 to send the flow segment to the workflow manager 320 .
[0243] Furthermore, the commissioning request may also indicate starting mock data.
[0244] Exemplarily, the debugging request may further include initial mock data.
[0245] For example, after selecting a flow segment and inputting initial mock data, the user can perform a one-key operation, such as clicking a related control, to cause the workflow console 310 to send the flow segment and initial mock data to the workflow manager 320 .
[0246] The specific communication method by which the workflow console 310 sends the commissioning request to the workflow manager 320 can be set as needed.
[0247] Taking the scenario of remote debugging of a workflow as an example, for example, the workflow console 310 can send the flow segment and the starting mock data to the workflow manager 320 via WebSocket.
[0248] S33: The workflow manager 320 processes the flow segment indicated by the commissioning request to obtain a second workflow.
[0249] After receiving the commissioning request, the workflow manager 320 may process the flow segment indicated by the commissioning request.
[0250] Exemplarily, the processing procedure of the workflow manager 320 may include the following steps.
[0251] S33-1, perform semantic validity check on the stream segment.
[0252] For example, step S33 - 1 may be executed by a manager controller 321 in the workflow manager 320 .
[0253] For the relevant description of S33-1, please refer to Example 1 in the previous text and will not be repeated here.
[0254] S33-2, add a starting mock node before the stream segment, and set the starting mock data to the starting mock node.
[0255] For example, step S33 - 2 may be performed by the manager controller 321 in the workflow manager 320 .
[0256] For the relevant description of S33-2, please refer to Example 2 in the previous text and will not be repeated here.
[0257] S33-3, set the input of the last node of the flow segment to the return result.
[0258] For example, step S33 - 3 may be performed by the manager controller 321 in the workflow manager 320 .
[0259] S33-4, converting the flow segment into a workflow (ie, the second workflow).
[0260] For example, step S33 - 4 may be performed by a flow converter 322 in the workflow manager 320 .
[0261] For the relevant description of S33-4, please refer to Example 3 in the previous text and will not be repeated here.
[0262] It should be understood that steps S33 - 1 to S33 - 4 are all optional steps, and for related descriptions, refer to method 200 .
[0263] Furthermore, if the user performs a mock stubbing operation in the user interface, step S33 may also include: replacing the mock stubbing node with mock data. A detailed description can refer to method 200 above and will not be repeated here. For example, this step may be performed by stream converter 322.
[0264] S34 , the workflow manager 320 sends the second workflow to the sandbox execution environment 330 .
[0265] The specific communication method between the workflow manager 320 and the sandbox operating environment 330 can be set as needed.
[0266] Taking the scenario of remote debugging of workflows as an example, if the workflow manager 320 and the sandbox operating environment 330 are deployed in different remote devices, for example, the workflow manager 320 can send the second workflow to the sandbox operating environment 330 via WebSocket; if the workflow manager 320 and the sandbox operating environment 330 are deployed in the same remote device, for example, the workflow manager 320 can send the second workflow to the sandbox operating environment 330 via the communication party inside the device, such as a bus.
[0267] The data and information required for debugging can be collected in the sandbox operating environment.
[0268] S35 , creating a workflow instance (workflowinstance) 332 of the second workflow in the sandbox runtime environment 330 , ie, a running instance.
[0269] As shown in the figure, the sandbox execution environment 330 can receive information from the workflow manager 320 through the WebSocket server 333 and return the information of the sandbox execution environment 330 to the workflow manager 320.
[0270] In the sandbox operating environment 330, the debugging service (debugservice) 331 can be used to start interactive debugging. The debugging service (debugservice) is used to debug the workflow. For example, the debugging service 331 can implement debugging based on the following components: CamelDebugger, Camel InternalProcessor, and Camel Flow Routes. It should be understood that the above is only an example, and the debugging service can also implement debugging through other components. The embodiments of the present application do not limit the specific debugging method of the flow.
[0271] S36 , the debugging service 331 performs corresponding operations on the workflow instance 332 according to the user's debugging instructions, such as adding breakpoints, single-step running, running to the next breakpoint, etc.
[0272] Exemplarily, the user's debugging instruction may be acquired by the workflow console 310 and sent to the workflow manager 320 , and then sent to the sandbox operating environment 330 by the workflow manager 320 .
[0273] S37: The workflow instance 332 reports the debugging information to the workflow manager 320. The debugging information includes updates of the running status, for example, running to a breakpoint or updating breakpoint data.
[0274] The specific communication method between the workflow manager 320 and the sandbox operating environment 330 can be set as needed.
[0275] Taking the scenario of remote debugging of workflow as an example, if the workflow manager 320 and the sandbox operating environment 330 are deployed in different remote devices, for example, the workflow instance 332 can send the debugging information to the workflow manager 320 via WebSocket; if the workflow manager 320 and the sandbox operating environment 330 are deployed in the same remote device, for example, the workflow instance 332 can send the debugging information to the workflow manager 320 via the communication method within the device, such as a bus.
[0276] S38 , the workflow manager 320 sends the debugging information to the workflow console 310 .
[0277] The workflow manager 320 can push the debugging information to the user interface of the workflow console 310 in real time to provide feedback to the user.
[0278] The specific communication method between the workflow manager 320 and the sandbox operating environment 330 can be set as needed.
[0279] Taking the scenario of remote debugging of a workflow as an example, the workflow manager 320 can send debugging information to the workflow console 310 via WebSocket.
[0280] It should be understood that method 300 is merely an example and does not limit the solutions of the embodiments of the present application. For example, the communication method between the various modules can also adopt other communication methods besides WebSocket. Other implementation methods can refer to method 200 and will not be repeated here.
[0281] The apparatus of the embodiment of the present application is described below with reference to Figures 7 to 10. It should be understood that the apparatus described below can execute the method of the aforementioned embodiment of the present application. To avoid unnecessary repetition, repeated descriptions are appropriately omitted when introducing the apparatus of the embodiment of the present application.
[0282] Figure 7 is a schematic block diagram of a workflow debugging system according to an embodiment of the present application. The system 2000 shown in Figure 7 can be used to execute the method shown in Figure 2 or Figure 6. The system 2000 includes a console module 2030, a management module 2010, and a debugging module 2020.
[0283] A console module is used to obtain debugging requirements related to a first workflow from a workflow design interface, where the debugging requirements indicate a flow segment to be debugged in the first workflow, where the flow segment includes one or more nodes in the first workflow, and when the flow segment includes the multiple nodes, the flow segment also includes a connection relationship between the multiple nodes, where the connection relationship between the multiple nodes indicates an execution order of the multiple nodes.
[0284] For example, the console module 2030 may be the workflow console 310 in FIG. 6 .
[0285] The management module 2010 is configured to send relevant information of the stream segment to the sandbox execution environment, where the relevant information of the stream segment indicates the stream segment and the start input of the stream segment.
[0286] Exemplarily, the management module 2010 may be the workflow manager 320 in FIG. 6 .
[0287] The console module 2030 may also be used to receive input debugging instructions.
[0288] The debugging module 2020 is used to debug the stream segment according to the debugging instruction in the sandbox operating environment.
[0289] The console module 2030 is further configured to output debugging information, where the debugging information indicates the update status of the operating status during the debugging process.
[0290] Exemplarily, the sandbox operating environment may be the workflow sandbox operating environment 330 in Figure 6. The debugging module 2020 may be implemented by the debugging service 331 in Figure 6.
[0291] Optionally, the management module 2010 is further configured to convert the flow segment into a second workflow, wherein the relevant information of the flow segment indicates the second workflow and a starting input of the flow segment.
[0292] Optionally, the starting input is a starting simulation input, and the management module 2010 is also used to: add a starting simulation node before the starting node of the flow segment; set the starting simulation data on the starting simulation node to obtain a processed flow segment, and the relevant information of the flow segment indicates the processed flow segment.
[0293] Optionally, the console module 2030 is further configured to obtain initial simulation data from a design interface of the workflow.
[0294] Optionally, the management module 2010 is further configured to perform semantic validity verification on the stream segment, and if the verification passes, send relevant information of the stream segment to the sandbox operating environment.
[0295] Optionally, the debugging module 2020 is further used to: create a running instance in the sandbox running environment, the running instance corresponds to the stream segment; operate the running instance according to the input debugging instruction, and the debugging information indicates the update status of the running state of the running instance.
[0296] Optionally, the debugging module 2020 is further configured to: after the debugging is completed, clear the stream segment from the sandbox operating environment.
[0297] For a detailed description, please refer to the method 200 mentioned above, which will not be repeated here.
[0298] Each module in system 2000 can be implemented by software or hardware. For example, the implementation of management module 2010 will be described below using management module 2010 as an example. Similarly, the implementation of other modules can refer to the implementation of management module 2010.
[0299] As an example of a software functional unit, the management module 2010 may include code running on a computing instance. The computing instance may include at least one of a physical host (computing device), a virtual machine, and a container. Furthermore, the computing instance may be one or more. For example, the management module 2010 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code may be distributed in the same region or in different regions. Furthermore, the multiple hosts / virtual machines / containers used to run the code may be distributed in the same availability zone (AZ) or in different AZs, each AZ including one data center or multiple geographically close data centers. Typically, a region may include multiple AZs.
[0300] Similarly, multiple hosts / virtual machines / containers running the code can be distributed within the same virtual private cloud (VPC) or across multiple VPCs. Typically, a VPC is set up within a region. Cross-region communication between two VPCs within the same region, or between VPCs in different regions, requires a communication gateway within each VPC to interconnect the VPCs.
[0301] As an example of a hardware functional unit, the management module 2010 may include at least one computing device, such as a server. Alternatively, the management module 2010 may be implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD may be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0302] The multiple computing devices included in the management module 2010 can be distributed in the same region or in different regions. The multiple computing devices included in the management module 2010 can be distributed in the same AZ or in different AZs. Similarly, the multiple computing devices included in the management module 2010 can be distributed in the same VPC or in multiple VPCs. The multiple computing devices can be any combination of servers, ASICs, PLDs, CPLDs, FPGAs, GALs, and other computing devices.
[0303] It should be noted that, in other embodiments, the management module 2010 can be used to execute any step in the workflow debugging method, and other modules can be used to execute any step in the workflow debugging method. The steps that each module is responsible for implementing can be specified as needed, and all functions of the system 2000 are realized by implementing different steps in the workflow debugging method through each module.
[0304] This application also provides a computing device 1000. As shown in FIG8 , computing device 1000 includes a bus 1002, a processor 1004, a memory 1006, and a communication interface 1008. Processor 1004, memory 1006, and communication interface 1008 communicate with each other via bus 1002. Computing device 1000 can be a server or a terminal device. It should be understood that this application does not limit the number of processors and memories in computing device 1000.
[0305] Bus 1002 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, among others. Buses may be classified as address buses, data buses, control buses, and the like. For ease of illustration, FIG8 illustrates a single bus line, but this does not imply a single bus or type of bus. Bus 1004 may include a path for transmitting information between various components of computing device 1000 (e.g., memory 1006, processor 1004, and communication interface 1008).
[0306] The processor 1004 may include any one or more processors such as a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).
[0307] The memory 1006 may include volatile memory, such as random access memory (RAM). The processor 1004 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).
[0308] The memory 1006 stores executable program codes, and the processor 1004 executes the executable program codes to respectively implement the functions of the aforementioned modules, thereby implementing the workflow debugging method. That is, the memory 1006 stores instructions for executing the workflow debugging method.
[0309] The communication interface 1003 uses a transceiver module such as, but not limited to, a network interface card or a transceiver to implement communication between the computing device 1000 and other devices or a communication network.
[0310] Embodiments of the present application also provide a computing device cluster. The computing device cluster includes at least one computing device. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smartphone.
[0311] As shown in Figure 9, the computing device cluster includes at least one computing device 1000. The memory 1006 in one or more computing devices 1000 in the computing device cluster may store the same instructions for executing the workflow debugging method.
[0312] In some possible implementations, the memory 1006 of one or more computing devices 1000 in the computing device cluster may also store partial instructions for executing the workflow debugging method. In other words, the combination of one or more computing devices 1000 can jointly execute the instructions for executing the workflow debugging method.
[0313] It should be noted that the memory 1006 in different computing devices 1000 in the computing device cluster can store different instructions, each used to execute a portion of the functions of the workflow debugging system. For example, the instructions stored in the memory 1006 in different computing devices 1000 can implement the functions of one or more of the console module 2030, the management module 2010, and the debugging module 2020.
[0314] In some possible implementations, one or more computing devices in a computing device cluster may be connected via a network. The network may be a wide area network (WAN) or a local area network (LAN), among others. FIG10 illustrates a possible implementation. As shown in FIG10 , two computing devices 1000A and 1000B are connected via a network. Specifically, the network is connected via a communication interface in each computing device. In this type of possible implementation, the memory 1006 in the computing device 1000A stores instructions for executing the functions of the console module 2030. At the same time, the memory 1006 in the computing device 1000B stores instructions for executing the functions of the management module 2010 and the commissioning module 2020.
[0315] The connection method between the computing device clusters shown in Figure 10 may be based on the consideration that the workflow debugging method provided in this application may require data storage or security issues, so it is considered to entrust the functions implemented by the management module 2010 and the debugging module 2020 to the computing device 1000B for execution.
[0316] It should be understood that the functions of the computing device 1000A shown in FIG10 may also be completed by multiple computing devices 1000. Similarly, the functions of the computing device 1000B may also be completed by multiple computing devices 1000.
[0317] Embodiments of the present application also provide a computer program product containing instructions. The computer program product may be software or a program product containing instructions that can be run on a computing device or stored on any available medium. When the computer program product is run on at least one computing device, it causes the at least one computing device to perform a workflow debugging method.
[0318] The present application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that can be stored by a computing device or a data storage device such as a data center that contains one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive). The computer-readable storage medium includes instructions that instruct the computing device to execute the workflow debugging method.
[0319] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the protection scope of the technical solutions of the embodiments of the present application.
Claims
1. A workflow debugging method, characterized in that: Applied to a cloud platform, the cloud platform is used to provide workflow design services, the method includes: Acquire a debugging requirement related to the first workflow from a workflow design interface, wherein the debugging requirement indicates a flow segment to be debugged in the first workflow, wherein the flow segment includes one or more nodes in the first workflow, and when the flow segment includes the multiple nodes, the flow segment also includes a connection relationship between the multiple nodes, and the connection relationship between the multiple nodes indicates an execution order of the multiple nodes; Sending relevant information of the stream segment to the sandbox execution environment, wherein the relevant information of the stream segment indicates the stream segment and a starting input of the stream segment; Receiving input debugging instructions; commissioning the stream segment in the sandbox operating environment according to the commissioning instruction; Output the debugging information, where the debugging information indicates the update status of the running status during the debugging process.
2. The method according to claim 1, characterized in that: The method further comprises: The flow segment is converted into a second workflow, and the relevant information of the flow segment indicates the second workflow and a starting input of the flow segment.
3. The method according to claim 1 or 2, characterized in that: The initial input of the stream segment is initial simulation data, and the method further comprises: adding a start simulation node before the start node of the stream segment; The starting simulation data is set on the starting simulation node to obtain a processed stream segment, and the relevant information of the stream segment indicates the processed stream segment.
4. The method according to claim 3, characterized in that The method further comprises: The initial simulation data is obtained from a design interface of the workflow.
5. The method according to any one of claims 1 to 4, characterized in that The method further comprises: A semantic validity check is performed on the stream segment, and if the check passes, relevant information of the stream segment is sent to the sandbox operating environment.
6. The method according to any one of claims 1 to 5, characterized in that The debugging of the stream segment according to the debugging instruction in the sandbox operating environment includes: Creating a running instance in the sandbox running environment, wherein the running instance corresponds to the stream segment; The running instance is operated according to the debugging instruction, and the debugging information indicates the update status of the running state of the running instance.
7. The method according to any one of claims 1 to 6, characterized in that The method further comprises: After the debugging is completed, the stream segment is cleared from the sandbox operating environment.
8. A workflow debugging system, characterized in that: include: a console module, configured to obtain a debugging requirement related to a first workflow from a workflow design interface, wherein the debugging requirement indicates a flow segment to be debugged in the first workflow, wherein the flow segment includes one or more nodes in the first workflow, and when the flow segment includes the multiple nodes, the flow segment also includes a connection relationship between the multiple nodes, and the connection relationship between the multiple nodes indicates an execution order of the multiple nodes; A management module, configured to send relevant information of the stream segment to a sandbox operating environment, wherein the relevant information of the stream segment indicates the stream segment and a starting input of the stream segment; The console module is also used to receive input debugging instructions; A debugging module, used for debugging the stream segment according to the debugging instruction in the sandbox running environment; The console module is also used to output debugging information, where the debugging information indicates the update status of the running status during the debugging process.
9. The system according to claim 8, characterized in that The management module is also used for: The flow segment is converted into a second workflow, and the relevant information of the flow segment indicates the second workflow and a starting input of the flow segment.
10. The system according to claim 8 or 9, characterized in that The initial input of the stream segment is the initial simulation data, and The management module is also used for: adding a start simulation node before the start node of the stream segment; The starting simulation data is set on the starting simulation node to obtain a processed stream segment, and the relevant information of the stream segment indicates the processed stream segment.
11. The system according to claim 10, characterized in that The console module is also used to: The initial simulation data is obtained from a design interface of the workflow.
12. The system according to any one of claims 8 to 11, characterized in that The management module is also used for: A semantic validity check is performed on the stream segment, and if the check passes, relevant information of the stream segment is sent to the sandbox operating environment.
13. The system according to any one of claims 8 to 12, characterized in that The debugging module is specifically used for: Creating a running instance in the sandbox running environment, wherein the running instance corresponds to the stream segment; The running instance is operated according to the debugging instruction, and the debugging information indicates the update status of the running state of the running instance.
14. The system according to any one of claims 8 to 13, characterized in that The debugging module is also used for: After the debugging is completed, the stream segment is cleared from the sandbox operating environment.
15. A computing device cluster, characterized in that: comprising at least one computing device, each computing device comprising a processor and a memory; The processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster executes the method according to any one of claims 1 to 7.
16. A computer-readable storage medium, characterized in that: The method comprises computer program instructions, and when the computer program instructions are executed by a computing device cluster, the computing device cluster performs the method as claimed in any one of claims 1 to 7.
17. A computer program product comprising instructions, characterized in that When the instructions are executed by a computing device cluster, the computing device cluster is caused to perform the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Workflow adjusting and testing method and system
CN119226130A
Optimization processing method and device for workflow configuration and computer equipment
CN110689232A
Business process verification method and device and electronic equipment
CN112487416A
Equipment commissioning and testing method and device
CN113094253A
Development test production method and device based on authority and logic isolation
CN115905014A