Workflow adjusting and testing method and system
By obtaining the flow segments to be adjusted from the workflow design interface and performing the measurement in the sandbox environment, the problem of low workflow measurement efficiency in the existing technology is solved, and a flexible and rapid measurement process is realized, which improves the User experience and design efficiency.
Patent Information
- Application Number
- CN202311027172.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-06-28
- Filing Date
- 2023-08-15
- Publication Date
- 2024-12-31
AI Technical Summary
Existing workflow Investigation and Testing Tools are difficult to meet the user's Measurement needs, especially when the workflow has not been designed or external dependencies cannot be connected, which affects design efficiency.
Provide a workflow investigation method and system, which obtains the flow segments to be adjusted from the workflow design interface and sends them to the sandbox operating environment for adjustment, supports remote online adjustment, and is based on the adjustment instructions in the sandbox. Perform interactive tuning and output tuning information to update the operating status.
It improves the flexibility and efficiency of workflow inspection, helps users quickly discover design errors or defects, reduces inspection costs, and expands application scenarios.
Smart Images

Figure CN119226130A_ABST
Abstract
Description
[0001] This application claims the priority of the Chinese patent application filed with the China Patent Office on June 28, 2023, with application number 202310776859.0 and application name “Method and Device for Business Flow Adjustment”, all contents of which are incorporated by reference in 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] Workflow is an abstract and general description of the business rules between the workflow and its operation steps. Workflow is essentially a pipeline tool developed by users based on actual business scenarios to deploy models or applications. With the continuous expansion of business scenarios, the workflows created by users are becoming more and more complex, and the demand for workflow debugging is also increasing.
[0004] Currently, workflow debugging tools are limited by various reasons and cannot meet the debugging needs of users. For example, in the design stage of a workflow, users cannot deploy the workflow to the running environment for debugging because the workflow has not been designed yet or some nodes that depend on the external environment cannot be connected temporarily, which greatly affects the design efficiency of the workflow.
[0005] Therefore, how to improve the commissioning efficiency becomes an urgent problem to be solved. Summary of the invention
[0006] The present application provides a method and system for workflow debugging, which is conducive to realizing flexible debugging of workflows, thereby improving debugging efficiency and improving user experience.
[0007] 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 in the case where 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.
[0008] In the scheme 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 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.
[0009] 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.
[0010] Exemplarily, the relevant information of the stream segment may include the stream segment itself.
[0011] 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, and the relevant information of the flow segment indicates the second workflow and a starting input of the flow segment.
[0012] 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.
[0013] In the solution of the embodiment of the present application, the flow segment can be converted into a conventional workflow. In this way, in the subsequent debugging process, it can be debugged as a conventional workflow, so that the existing debugging method for the workflow can be reused, which is conducive to reducing costs and expanding the application scenarios of the solution.
[0014] 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.
[0015] 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.
[0016] The starting mock data is the input data of the starting node of the stream segment.
[0017] Illustratively, the starting simulation data may be system generated.
[0018] If the flow fragment is converted into a workflow in the processing method, this is helpful to ensure the legality of the converted workflow.
[0019] In combination with the first aspect, in some implementations of the first aspect, the method further includes: acquiring starting simulation data from a design interface of the workflow.
[0020] The starting simulation data may be user input.
[0021] In combination with the first aspect, in some implementations of the first aspect, the method further includes: performing a semantic legitimacy check on the stream segment, and if the check passes, sending relevant information of the stream segment to the sandbox operating environment.
[0022] 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.
[0023] In combination with the first aspect, in some implementations of the first aspect, the method further includes: acquiring relevant information of simulated piling, wherein the relevant information of the stream segment indicates relevant information of the simulated piling.
[0024] Exemplarily, the mock piling related information may include the mock piling location.
[0025] In the embodiment of the present application, a debugging function of a mock piling operation is provided, which is conducive to further improving the flexibility of debugging, thereby improving the user experience.
[0026] In combination with the first aspect, in certain implementations of the first aspect, the flow segment is debugged in the sandbox operating environment according to the debugging instruction, including: creating a running instance in the sandbox operating environment, the running instance corresponding to the flow segment; operating 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.
[0027] 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.
[0028] 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 in the case where 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; a debugging module, 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.
[0029] In combination with the second aspect, in some implementations of the second aspect, the management module is further used to: convert the flow segment into a second workflow, and the relevant information of the flow segment indicates the second workflow and the starting input of the flow segment.
[0030] In combination with the second aspect, in certain implementations of the second aspect, the starting input of the flow segment is starting simulation data, and the management module 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.
[0031] In combination with the second aspect, in some implementations of the second aspect, the console module is further used to: obtain starting simulation data from a design interface of the workflow.
[0032] 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.
[0033] 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 instruction, and the debugging information indicates the update status of the running status of the running instance.
[0034] In combination with the second aspect, in some implementations of the second aspect, the debugging module is further used to: after the debugging is completed, clear the flow segment from the sandbox running environment.
[0035] It should be understood that the expansion, limitation, explanation and description of the relevant contents in the above-mentioned first aspect also apply to the same contents in the second aspect.
[0036] In a third aspect, a computing device cluster is provided, including at least one computing device, each computing device including a processor and a memory. The processor of at least one computing device is used to execute instructions stored in the memory of at least one computing device, so that the computing device cluster executes the method in the first aspect and any one of the implementations of the first aspect.
[0037] According to 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 according to the first aspect and any one of the implementations of the first aspect.
[0038] 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
[0039] Figure 1 The following is a schematic diagram of a workflow.
[0040] Figure 2 The present invention is a schematic flowchart of a workflow debugging method according to an embodiment of the present application.
[0041] Figure 3 A schematic diagram of an interactive operation according to an embodiment of the present application.
[0042] Figure 4 This is a schematic diagram of adding a starting mock node according to an embodiment of the present application.
[0043] Figure 5 A schematic diagram of a second workflow of an embodiment of the present application.
[0044] Figure 6 A schematic diagram of another workflow debugging method according to an embodiment of the present application.
[0045] Figure 7 It is a schematic block diagram of a system for workflow debugging in an embodiment of the present application.
[0046] Figure 8 A schematic block diagram of a computing device according to an embodiment of the present application.
[0047] Fig. 9 It is a schematic block diagram of a computing device cluster according to an embodiment of the present application.
[0048] Fig.10 It is a schematic block diagram of another computing device cluster according to an embodiment of the present application. DETAILED DESCRIPTION
[0049] The technical solution in this application will be described below in conjunction with the accompanying drawings.
[0050] The present application will present various aspects, embodiments or features around a system 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 devices, components, modules, etc. discussed in conjunction with the figures. In addition, combinations of these schemes may also be used.
[0051] In the embodiments of the present application, "corresponding (corresponding, relevant)" and "corresponding (corresponding)" can sometimes be used interchangeably. It should be pointed out that when the distinction between them is not emphasized, the meanings they intend to express are consistent.
[0052] 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 of ordinary skill in the art can 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 also applicable to similar technical problems.
[0053] References to "one embodiment" or "some embodiments" etc. described in this specification mean that a particular feature, structure or characteristic described in conjunction with the embodiment is included in one or more embodiments of the present application. Thus, the phrases "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear at different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0054] In the present application, "at least one" means one or more, and "plurality" 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 items 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.
[0055] Workflow, also known as business flow, is an abstract and general description of the business rules between the workflow and its various operation steps.
[0056] The essence of workflow is that developers develop pipeline tools for deploying models or applications based on actual business scenarios. In workflow, each business logic can be called a task, work, activity or business. Workflow can be represented as a graph structure, for example, a directed acyclic graph (DAG). A DAG consists of descriptions of nodes and the relationships between nodes. Each business logic can be used as a node. The lines between nodes are the descriptions of the relationships between nodes, which are used to indicate the execution order of tasks.
[0057] Figure 1 A schematic diagram of a workflow is shown. The first node in the workflow is the start node. The direction indicated by the arrow represents the execution order. Figure 1 The last node indicated by the arrow in is the end node of the workflow, and the identification type of the node is "end node". It should be understood that Figure 1 The number of nodes in the example, the connections between the nodes, etc. are all examples and do not constitute a limitation on the solutions of the embodiments of the present application. Figure 1 The workflow shown only shows one end node. In other possible scenarios, a workflow may include multiple end nodes.
[0058] Generally speaking, workflow can include two forms: design time and runtime time. When designing a workflow, users describe the nodes and the relationships between them, that is, define the execution content of the nodes and the execution order of the nodes. The design operations of the workflow can be collectively referred to as the design state of the workflow. After determining the entire workflow, users can solidify the workflow for subsequent scheduling and execution. The state of scheduling and executing the workflow can be collectively referred to as the runtime state of the workflow. Workflow provides a visual operation method.
[0059] The current workflow debugging tools (debuggers) are limited by various reasons and are difficult to meet the debugging needs of users.
[0060] In view of this, the embodiment of the present application provides a method for workflow debugging, which debugs the workflow fragment in the workflow, which is conducive to flexible debugging of the workflow and improves the debugging efficiency. In the process of workflow design by the user, the solution of the embodiment of the present application is conducive to helping the user to timely discover errors or defects in the workflow design, thereby improving the design efficiency and accuracy of the workflow.
[0061] In the solution of the embodiment of the present application, the workflow segment may also be referred to as a flow segment.
[0062] The solution of the embodiment of the present application can be applied to various workflow debugging scenarios.
[0063] 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.
[0064] For example, in a possible debugging scenario, some nodes require external dependencies, for example, some connectors and data sources need to be connected, and the external dependencies cannot be introduced or are inconvenient to introduce at present. The solution of the embodiment of the present application can be used as a flow segment for the design content that does not require external dependencies, and the flow segment can be debugged. Alternatively, the solution of the embodiment of the present application can be used as a flow segment for the design content including nodes that require external dependencies, and the nodes that require external dependencies can be processed, and then the flow segment can be debugged. In this way, it is conducive to realizing flexible debugging of the workflow and improving the debugging efficiency, which 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, the business flow is relatively complex, and debugging the entire business flow may require a high time cost. The solution of the embodiment of the present application can be used as a part of the design content as a flow segment, and the flow segment can be debugged, which is conducive to flexible debugging of the workflow and improves the debugging efficiency.
[0066] 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 debug the modified design content as a flow segment, which is conducive to flexible debugging of the workflow and improved debugging efficiency.
[0067] 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.
[0068] 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.
[0069] Figure 2 A method for workflow debugging provided by an embodiment of the present application is shown. Method 200 can be executed by a system for workflow debugging. The system can be deployed in the user's local environment, that is, method 200 can be applied to a local debugging scenario. Alternatively, the system can be applied to a cloud platform, which can be used to provide workflow design services. The cloud platform includes a client and a server, that is, method 200 can be applied to a remote debugging scenario.
[0070] like Figure 2 As shown, the method 200 includes the following steps.
[0071] 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.
[0072] The debugging requirements related to the first workflow can also be used as indication information of the flow segment to be debugged in the first workflow. The flow segment includes one or more nodes in the first workflow. In the case where the flow segment includes multiple nodes, the flow segment also includes the connection relationship between the multiple nodes. In other words, the flow segment also includes the edges between the multiple nodes.
[0073] The flow segment may be any segment in the first workflow.
[0074] The first workflow may also be referred to as an original workflow, that is, a workflow designed by a user.
[0075] The “first” in the first workflow is only used to indicate that the workflow is a workflow designed by the user and does not have any other limiting effect.
[0076] The first workflow is a workflow in the design state. The first workflow may be a workflow that has not yet been designed, for example, Figure 3 Alternatively, the first workflow may also be a designed workflow, for example, Figure 1 shown.
[0077] Exemplarily, the commissioning requirement may be obtained through an input operation of a user. For example, step 210 may include: receiving a first input operation of a user. According to the first input operation, a stream segment to be commissioned may be determined.
[0078] The following is an exemplary description of the process of obtaining the commissioning requirement.
[0079] Users can design workflows in the interactive interface, which can be used to obtain user input operations.
[0080] The interactive interface can also be called a user interface, i.e., a design interface of a workflow, which is a visual graphical interface. The workflow can be represented as a graph structure. That is, in the user interface, the first workflow can be represented by one or more nodes and edges between nodes. The edge between two nodes, i.e., the connection relationship between the two nodes, is used to indicate the execution order of the two nodes.
[0081] Exemplarily, step 210 may include: receiving a first input operation performed by a user on an interactive interface, wherein a first workflow is displayed in the interactive interface. The first input operation may be used to determine the workflow segment.
[0082] 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.
[0083] In actual applications, one or more operation modes may be set so that the user can select a flow segment from the first workflow.
[0084] For example, the first input operation of the user may include a click operation of the user on at least one node in the first workflow. The clicked node is a node in the flow segment. That is, the user can select the flow segment by performing a click operation on the interactive interface.
[0085] For another example, the first input operation of the user may include a box selection operation of the user on the 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 box selection operation on the interactive interface. Figure 3 A schematic diagram of a box selection operation is shown. Figure 3 The fragment in the dashed box is the stream fragment.
[0086] For another example, the user's first input operation can be implemented by a mouse, that is, the user can click or select a stream segment by a mouse. Alternatively, the user's first input operation can also be implemented by a touch screen, that is, the user can click or select a stream segment by a touch operation on the touch screen.
[0087] 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.
[0088] In the scenario where method 200 is applied to remote commissioning, step 210 may be performed by the client. For example, the client controls the display of the first workflow in the interactive interface and receives the first input operation of the user.
[0089] For example, the client may be a client browser. In other words, the user interface may be displayed in a web page of the browser.
[0090] For another example, the client may be client software, or a client application (APP). In other words, the user interface may be displayed in a page of the client software.
[0091] For example, if the method 200 is applied to a remote debugging scenario, the client can obtain the user's debugging requirements based on the interaction with the user, and initiate a debugging request to the server, wherein the debugging request indicates the stream segment.
[0092] 220, the relevant information of the stream segment is sent to the sandbox operating environment.
[0093] 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.
[0094] In a possible implementation manner, the relevant information of the stream segment may include the stream segment itself.
[0095] In another possible implementation, step 220 may include: processing the stream segment; and sending the processed stream segment to the sandbox operating environment.
[0096] In this case, the relevant information of the stream segment may include the processed stream segment.
[0097] Furthermore, the relevant information of the stream segment may also indicate the start input of the stream segment.
[0098] The specific processing method can be found in the following text and will not be described in detail here.
[0099] 230, debugging the stream segment in the sandbox operating environment.
[0100] If the stream segment is processed in step 220, step 230 can also be understood as debugging the processed stream segment.
[0101] 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 the sandbox operating environment.
[0102] In step 230, the flow segment may be interactively debugged in the sandbox runtime environment.
[0103] 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 status of the running state during the debugging process.
[0104] In the scheme of the embodiment of the present application, a debugging service for flow segments is provided to users, and the flow segments selected by users are sent to the sandbox operating environment, so that users can debug the segments 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 scheme of the embodiment of the present application, users can flexibly select flow segments 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 scheme of the embodiment of the present application, users can flexibly select flow segments 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 to achieve fast and accurate design of workflows.
[0105] 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.
[0106] Exemplarily, during the debugging process, the initial input of the stream segment may be mock data.
[0107] Optionally, method 200 may further include step 211 (not shown in the figure).
[0108] 211, get the starting mock data.
[0109] Exemplarily, the initial mock data may be input by a user.
[0110] Optionally, step 211 may include: acquiring initial mock data from a design interface of the workflow.
[0111] In the scenario where method 200 is applied to remote debugging, step 211 can be performed by the client, that is, the client obtains the starting mock data input by the user. In this case, the debugging request initiated by the client to the server can also 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.
[0112] Alternatively, the initial mock data may be generated by the system. For example, the system may generate the initial mock data according to default values or user historical data. Or the system may also generate it intelligently according to the scenario. The embodiment of the present application does not limit the method for generating the initial mock data.
[0113] For example, if method 200 is applied to a remote debugging scenario, step 211 can be executed 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 executed 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.
[0114] It should be understood that the above is only an example, and the initial mock data can also be obtained by other means, which is not limited in the embodiments of the present application.
[0115] The following uses Examples 1 to 3 as examples to illustrate the processing of stream segments.
[0116] Example 1:
[0117] Optionally, processing the stream segment may include: performing a semantic validity check on the stream segment.
[0118] Exemplarily, if the semantic legality check passes, the processed stream segment can be sent to the sandbox operating environment. If no other processing is performed on the stream segment, the stream segment can be sent to the sandbox operating environment if the semantic legality check passes. If the semantic legality check fails, the debugging process can be terminated and the relevant information of the stream segment is not sent to the sandbox operating environment. Furthermore, a prompt message can be output to prompt the user that the stream segment cannot be debugged.
[0119] Example 2:
[0120] 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, that is, the stream segment to which the starting mock node is added and the starting mock data is set, thereby achieving the indication of the stream segment and the starting mock data.
[0121] The start node of the stream segment refers to the first node executed in the stream segment. The start mock data is the input data of the start node of the stream segment.
[0122] If the number of starting nodes included in the stream segment is multiple, starting mock nodes can be added before the multiple starting nodes respectively, and the starting mock data corresponding to each starting node can be set on the corresponding starting mock node respectively. 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 that the stream segment includes a starting node, and does not limit the scheme of the embodiment of the present application.
[0123] In order to satisfy the validity of the workflow, the starting input of the workflow needs to be set on the starting node of the workflow.
[0124] Figure 4 A schematic diagram of adding a starting mock node is shown. Figure 4 As shown, the stream segment originally includes a starting node, and a mock node (ie, the starting mock node) is added before the stream segment as the starting node, that is, the starting mock node becomes a new starting node, and the starting mock data is set on the starting node.
[0125] If the flow fragment is subsequently converted into a workflow, this helps to ensure the legitimacy of the converted workflow.
[0126] It should be understood that the above steps are optional steps. For example, if the original starting node of the 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 is set on the starting node. If some of the starting nodes in the multiple original starting nodes included in the stream segment are the actual starting nodes of the first workflow, then there is no need to add a starting mock node before the part of the starting nodes, and the starting mock data corresponding to the part of the starting nodes are respectively set on the part of the starting nodes. Add starting mock nodes respectively before the remaining starting nodes of the stream segment, and the starting mock data corresponding to the remaining starting nodes are respectively set on the corresponding starting mock nodes.
[0127] Example 3:
[0128] 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 the starting input of the stream segment.
[0129] In this case, the relevant information of the flow segment sent to the sandbox execution environment may include the second workflow.
[0130] The "second" in the "second workflow" is only used to limit that the workflow is obtained by converting the flow fragment, and has no other limiting effect.
[0131] The second workflow can be a complete workflow. Based on the legitimacy of the workflow, the last node of all branches of the workflow needs to be an end node. The last node of a branch is the last node executed in the branch. The end node can also be understood as a node marked as "end".
[0132] 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.
[0133] This helps to ensure the legitimacy of the converted second workflow.
[0134] 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, and end nodes can be added 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, end nodes can be added after all branches.
[0135] It should be understood that the above steps are optional steps. 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.
[0136] Furthermore, processing the flow segment may also include: performing a workflow validity check on the second workflow.
[0137] The content that complies with the workflow's legality check can be regarded as a workflow that has been successfully converted. That is, if the workflow passes the legality check, the second workflow is a workflow that has been successfully converted. If the workflow fails the legality check, the second workflow is a workflow that has failed to be converted. The relevant information of the flow segment sent to the sandbox operating environment may include the second workflow that has been successfully converted. Furthermore, if the workflow fails the legality check, a prompt message can be output to prompt the user that the flow segment cannot be debugged.
[0138] 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 A schematic diagram of a second workflow is shown. Figure 5 As shown, in Example 3, the processed stream segment in Example 2 can be converted into a second workflow, 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.
[0139] In the solution of the embodiment of the present application, the flow segment can be converted into a conventional workflow. In this way, in the subsequent debugging process, it can be debugged as a conventional workflow, so that the existing debugging method for the workflow can be reused, which is conducive to reducing costs and expanding the application scenarios of the solution.
[0140] 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.
[0141] Examples 1 to 3 can be used in combination. For example, the solution in Example 1 is executed first, and if the semantic legality check passes, the solutions in Examples 2 and 3 are executed, and then the processed stream segments are issued. For another example, the solutions in Examples 2 and 3 are executed first, and then the solution in Example 1 is executed, and if the semantic legality check passes, the processed stream segments are issued. The above are only examples, and the embodiments of the present application do not limit the processing order of Examples 1 to 3.
[0142] 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.
[0143] Furthermore, the method 200 may also include obtaining setting information of a breakpoint, and sending the setting information of the breakpoint to the sandbox operating environment. The breakpoint is located inside the stream segment.
[0144] Exemplarily, the setting information of the breakpoint may include the location of the breakpoint and the like.
[0145] The number of breakpoints may be one or more, which is not limited in the present embodiment.
[0146] Breakpoints can be set at any node in a flow segment.
[0147] Optionally, the interactive interface in step 210 may also be used to obtain breakpoint setting information.
[0148] Exemplarily, the interactive interface may be used to receive a second input operation of the user. The second input operation is used to determine the setting information of the breakpoint.
[0149] 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.
[0150] 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.
[0151] It should be understood that the above is only an example, and the embodiment of the present application does not limit the setting method of the breakpoint.
[0152] Exemplarily, 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.
[0153] Furthermore, the method 200 may also include obtaining relevant information of mock stubbing, where the position of the mock stubbing is related to the stream segment. In this case, the relevant information of the stream segment may also include relevant information of the mock stubbing.
[0154] Exemplarily, the mock piling related information may include the mock piling location.
[0155] The mock piling location is the node where the mock piling operation is performed. The mock piling operation node can be one or more nodes. This embodiment of the application does not limit this.
[0156] Exemplarily, the location of the mock stubbing may be located in the flow segment. The node of the mock stubbing operation may include any node of the flow segment.
[0157] Alternatively, the mock stub locations may include nodes outside the flow fragment that the nodes in the flow fragment depend on.
[0158] Optionally, the interactive interface in step 210 can also be used to obtain relevant information about mock stubbing.
[0159] Exemplarily, the interactive interface may be used to receive a third input operation of the user. The third input operation is used to determine relevant information of the mock stubbing.
[0160] The user can operate on the interactive interface to perform the mock stubbing operation, and information of the mock stubbing operation can be determined according to the user's third input operation.
[0161] 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.
[0162] 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.
[0163] The following is an exemplary description of the processing flow of the stream segment in the case of the mock stubbing operation.
[0164] Optionally, processing the stream segment may include: replacing the input of node #1 with mock data #1 to obtain a replaced stream segment, in which the input of node #1 depends on the output of node #2, and node #2 is a node of the mock stubbing operation. Accordingly, the relevant information of the stream segment sent to the sandbox operating environment indicates mock data #1.
[0165] If the user performs a mock stubbing operation, the output of the node of the mock stubbing operation (eg, node #2) can be replaced with mock data #1.
[0166] Node #2 may be a node within the stream segment, or may be a node outside the stream segment.
[0167] The number of mock data #1 is the same as the number of nodes in the mock stubbing operation. The mock data #1 corresponds to the nodes in the mock stubbing operation one by one.
[0168] Exemplarily, mock data #1 may be input by a user.
[0169] For example, if method 200 is applied to a remote debugging scenario, the client may obtain mock data #1 input by the user. The relevant information of the mock stubbing may also include mock data #1. The debugging request initiated by the client to the server may also indicate mock data #1.
[0170] Alternatively, the mock data #1 may be system generated.
[0171] For example, if the method 200 is applied to a remote debugging scenario, the mock data #1 may be generated by the server.
[0172] 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 the embodiments of the present application.
[0173] The above processing flow related to the mock stubbing operation can be used in combination with Examples 1 to 3. Exemplarily, the above processing flow related to the mock stubbing operation can be used in combination with Example 3, for example, converting the replaced stream segment into a second workflow. That is, the input of node #1 in the second workflow is mock data #1.
[0174] 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.
[0175] 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.
[0176] The mock nodes used to replace the nodes of the mock stubbing operation can all be referred to as mock nodes #1. The data used to replace the output of mock nodes #1 can all be referred to as mock data #1.
[0177] The number of mock nodes #1 is the same as the number of nodes for mock stubbing operations. Mock nodes #1 correspond one-to-one to the nodes for mock stubbing operations.
[0178] In this way, the second workflow includes mock node #1 and no longer includes mock stubbing nodes.
[0179] Step 230 is described below.
[0180] Optionally, interactively debugging the stream segments may include the following steps.
[0181] 231, create a running instance. The running instance corresponds to the stream segment.
[0182] 232, interactive debugging is performed based on the running instance.
[0183] 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.
[0184] 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.
[0185] For example, the second workflow may be sent to the sandbox operating environment in step 220. Based on this, step 230 is exemplarily described below.
[0186] 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.
[0187] Exemplarily, step 232 may include steps (1) to (3).
[0188] (1) Obtain the commissioning instructions.
[0189] Exemplarily, the debugging instruction may include any one or more of the following: an instruction to add a breakpoint, an instruction to run in a single step, an instruction to run to the next breakpoint, etc.
[0190] Exemplarily, the debugging instruction may be an instruction input by a user after the interactive debugging is started.
[0191] For example, if the method 200 is applied to a remote debugging scenario, the debugging instruction input by the user may be obtained by the client, and the client sends the debugging instruction to the server.
[0192] Alternatively, the debugging instruction may be an instruction input by the user before the interactive debugging is started. For example, the debugging instruction may be breakpoint setting information. In step 220, the client may send relevant information of the stream segment to the sandbox operating environment. The relevant information of the stream segment may include the breakpoint setting information.
[0193] (2) Operate the running instance according to the input debugging instructions.
[0194] Perform corresponding operations on the running instance based on the debugging instructions, such as adding breakpoints, single-step running, or running to the next breakpoint.
[0195] (3) Output debugging information, where the debugging information indicates the update status of the running state of the running instance.
[0196] When the running state of the running instance is updated, for example, when it runs to a breakpoint or the breakpoint data is updated, the update can be returned to the user to prompt the user of the current running status.
[0197] 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, and the client can provide it to the user through a user interface.
[0198] Furthermore, after the commissioning is completed, the stream segment can be cleared from the sandbox operating environment.
[0199] The judgment conditions for the end of commissioning can be set as needed.
[0200] For example, the end of the flow segment operation can end the current debugging process.
[0201] For another example, when an instruction to end the debugging is obtained from the user, the current debugging process may be ended.
[0202] When method 200 is applied to a remote debugging scenario, communication is required between the client and the server.
[0203] Real-time communication can be used between the client and the server.
[0204] Optionally, the client and server communicate via WebSocket.
[0205] The use of real-time communication is conducive to ensuring the synchronization of the client and server states and realizing real-time interactive commissioning. Specifically, the user's instructions and commissioning requests obtained by the client can be sent to the server in a timely manner. The commissioning information on the server can be reported to the client in a timely manner. This is conducive to improving commissioning efficiency, reducing latency, and improving user experience.
[0206] 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.
[0207] Figure 6 A schematic diagram of another workflow debugging method provided in an embodiment of the present application is shown. Figure 6 The process shown may be a specific implementation of method 200. To avoid repetition, Figure 6 Some descriptions are omitted appropriately in the process shown.
[0208] like Figure 6 As shown, the system 300 may include a workflow console 310 , a workflow manager 320 , and a workflow sandbox operating environment 330 .
[0209] The workflow sandbox runtime environment can also be called workflow sandbox runtime.
[0210] In a possible implementation, the workflow console 310, the workflow manager 320, and the workflow sandbox operating environment 330 may be three modules deployed on the same device. In this case, the system 300 for workflow debugging may also be referred to as the device 300 for workflow debugging, and the device 300 may be applied to the scenario of local debugging of workflows. In this case, the communication between the workflow console 310, the workflow manager 320, and the workflow sandbox operating environment 330 may be implemented based on the communication mode within the device, for example, communication may be implemented through a bus.
[0211] 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 of the embodiment of the present application is not limited.
[0212] 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 .
[0213] The workflow console 310 may be used to obtain a debugging requirement related to the first workflow input by the user, and send the debugging request to the workflow manager 320. The debugging request indicates the flow segment. For example, the workflow console 310 may determine the flow segment according to the first input operation of the user in the interactive interface, and send the flow segment to the workflow manager 320.
[0214] 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 the 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.
[0215] 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 .
[0216] For example, the workflow console 310 may also be used to obtain the setting information of the breakpoint and send a debugging request to the workflow manager 320. The debugging request also indicates the setting information of the breakpoint.
[0217] Optionally, the workflow console 310 can also be used to obtain relevant information of the mock stubbing operation, and send the relevant information of 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 relevant information of the mock stubbing operation.
[0218] Furthermore, during the interactive debugging process, the workflow console 310 can also be used to obtain the debugging instructions input by the user and send the debugging instructions to the workflow manager 320. For example, the setting information of the breakpoint can be sent to the workflow manager 320 as the debugging instructions.
[0219] The workflow manager 320 may be used to process the flow segments and send the processed flow segments to the sandbox operating environment 330 .
[0220] Optionally, the workflow manager 320 may be used to verify the semantic validity of the flow segments.
[0221] Optionally, the workflow manager 320 can be used 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 can be used to set the starting mock data on the starting node of the flow segment, and the starting node of the flow segment is the starting node of the first workflow.
[0222] Optionally, the workflow manager 320 may be used to convert the flow segment into a workflow, ie, a second workflow.
[0223] The processed stream segments may be debugged in the sandbox operating environment 330 .
[0224] 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.
[0225] Exemplarily, the workflow manager 320 may send the second workflow to the sandbox operating environment 330 , in which a running instance of the second workflow may be created, and then interactive debugging may be performed on the running instance through the debugging service.
[0226] The user's debugging instructions can be sent to the workflow manager 320 through the workflow console 310, and the workflow manager 320 then sends the debugging instructions to the sandbox operating environment 330. The debugging service can perform corresponding operations on the running instance according to the debugging instructions. The update of the running state of the running instance can be reported to the workflow manager 320, and sent by the workflow manager 320 to the workflow console 310, and displayed to the user through the user interface.
[0227] 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.
[0228] The workflow debugging method 300 performed by the system 300 may include the following steps.
[0229] S31, the workflow console 310 obtains a debugging requirement.
[0230] Step S31 corresponds to step 210 in method 200 .
[0231] The user can operate on the user interface provided by the workflow console 310 to select a segment that needs to be debugged, i.e., a flow segment, from the workflow (i.e., the first workflow) displayed in the current user interface. For example, the user can select the flow segment by clicking the mouse or by boxing the flow segment. The workflow console 310 can determine the flow segment according to the user's operation.
[0232] It should be understood that the above is only an example, and other methods for obtaining the commissioning requirements can refer to the relevant descriptions of step 210 and step 220 in the above text.
[0233] 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.
[0234] It should be understood that the above is only an example, and other ways of obtaining the initial mock data can refer to the relevant description in the above method 200.
[0235] 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.
[0236] For a detailed description of the breakpoint setting information, please refer to the related description in the above method 200, which will not be repeated here.
[0237] 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.
[0238] For a detailed description of the relevant information of the mock piling operation, please refer to the relevant description in the previous method 200, which will not be repeated here.
[0239] S32, the workflow console 310 sends a commissioning request to the workflow manager 320. The commissioning request indicates the flow segment to be commissioned.
[0240] Exemplarily, the tuning request may include the stream segment to be tuned.
[0241] 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 .
[0242] Furthermore, the debugging request may also indicate starting mock data.
[0243] Exemplarily, the debugging request may further include initial mock data.
[0244] 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, so that the workflow console 310 sends the flow segment and the initial mock data to the workflow manager 320 .
[0245] The specific communication method by which the workflow console 310 sends the commissioning request to the workflow manager 320 can be set as required.
[0246] Taking the scenario of remote debugging of a workflow as an example, for example, the workflow console 310 can send the flow fragment and the starting mock data to the workflow manager 320 via WebSocket.
[0247] S33: The workflow manager 320 processes the flow segment indicated by the commissioning request to obtain a second workflow.
[0248] After receiving the commissioning request, the workflow manager 320 may process the flow segment indicated by the commissioning request.
[0249] Exemplarily, the processing procedure of the workflow manager 320 may include the following steps.
[0250] S33-1, perform semantic validity check on the stream segment.
[0251] For example, step S33 - 1 may be executed by a manager controller 321 in the workflow manager 320 .
[0252] For the relevant description of S33-1, please refer to Example 1 in the previous text and will not be repeated here.
[0253] S33-2, add a starting mock node before the stream segment, and set the starting mock data to the starting mock node.
[0254] For example, step S33 - 2 may be performed by the manager controller 321 in the workflow manager 320 .
[0255] For the relevant description of S33-2, please refer to Example 2 in the previous text and will not be repeated here.
[0256] S33-3, set the input of the last node of the flow segment to return the result.
[0257] For example, step S33 - 3 may be performed by the manager controller 321 in the workflow manager 320 .
[0258] S33-4, converting the flow segment into a workflow (ie, a second workflow).
[0259] For example, step S33 - 4 may be performed by a flow converter 322 in the workflow manager 320 .
[0260] For the relevant description of S33-4, please refer to Example 3 in the previous text, which will not be repeated here.
[0261] It should be understood that steps S33 - 1 to S33 - 4 are all optional steps, and the relevant descriptions refer to method 200 .
[0262] Further, 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. For a specific description, reference may be made to the above method 200, which will not be repeated here. For example, this step may be performed by the stream converter 322.
[0263] S34 , the workflow manager 320 sends the second workflow to the sandbox execution environment 330 .
[0264] The specific communication method between the workflow manager 320 and the sandbox operating environment 330 can be set as needed.
[0265] 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 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.
[0266] The data and information required for debugging can be collected in the sandbox operating environment.
[0267] S35 , creating a workflow instance 332 of the second workflow in the sandbox operating environment 330 , ie, a running instance.
[0268] As shown in the figure, in the sandbox operating environment 330 , information from the workflow manager 320 can be received through a WebSocket server (sever) 333 , and the information of the sandbox operating environment 330 can be returned to the workflow manager 320 .
[0269] In the sandbox operating environment 330, the debugging capability of the debugging service 331 can be used to start interactive debugging. The debugging service is used to debug the workflow. For example, the debugging service 331 can implement debugging based on the following components: camel debugger, camel internal processor, 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 specific debugging method of the flow is not limited in the embodiment of the present application.
[0270] S36, the debugging service 331 performs corresponding operations on the workflow instance 332 according to the user's debugging instruction, such as adding breakpoints, single-step running, running to the next breakpoint, etc.
[0271] 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 .
[0272] S37, the workflow instance 332 reports the debugging information to the workflow manager 320. The debugging information includes the update of the running state, for example, running to a breakpoint or updating the breakpoint data.
[0273] The specific communication method between the workflow manager 320 and the sandbox operating environment 330 can be set as needed.
[0274] 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.
[0275] S38 , the workflow manager 320 sends the debugging information to the workflow console 310 .
[0276] The workflow manager 320 may push the debugging information to the user interface of the workflow console 310 in real time to provide feedback to the user.
[0277] The specific communication method between the workflow manager 320 and the sandbox operating environment 330 can be set as needed.
[0278] 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.
[0279] It should be understood that method 300 is only an example and does not limit the solution of the embodiment of the present application. For example, the communication method between each module can also adopt other communication methods other than WebSocket. Other implementation methods can refer to method 200 and will not be repeated here.
[0280] Combine the following Figures 7 to 10 The device of the embodiment of the present application is described. It should be understood that the device described below can execute the method of the embodiment of the present application, and in order to avoid unnecessary repetition, repeated descriptions are appropriately omitted when introducing the device of the embodiment of the present application.
[0281] Figure 7 It is a schematic block diagram of a system for workflow debugging according to an embodiment of the present application. Figure 7 The system 2000 shown can be used to perform Figure 2 or Figure 6 The system 2000 includes a console module 2030 , a management module 2010 and a debugging module 2020 .
[0282] A console module is used 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, and the flow segment includes one or more nodes in the first workflow. 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.
[0283] For example, the console module 2030 may be Figure 6 The workflow console 310 in .
[0284] The management module 2010 is used to send relevant information of the stream segment to the sandbox operating environment, where the relevant information of the stream segment indicates the stream segment and the starting input of the stream segment.
[0285] For example, the management module 2010 may be Figure 6 The workflow manager 320 in .
[0286] The console module 2030 may also be used to receive input debugging instructions.
[0287] The debugging module 2020 is used to debug the stream segment according to the debugging instruction in the sandbox running environment.
[0288] The console module 2030 is also used to output debugging information, where the debugging information indicates the update status of the running status during the debugging process.
[0289] Exemplarily, the sandbox operating environment can be Figure 6 The workflow sandbox operating environment 330 in the debugging module 2020 can be Figure 6 The commissioning service 331 is implemented in.
[0290] Optionally, the management module 2010 is further used to: convert the flow segment into a second workflow, and the relevant information of the flow segment indicates the second workflow and the starting input of the flow segment.
[0291] 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.
[0292] Optionally, the console module 2030 is further configured to obtain initial simulation data from a design interface of the workflow.
[0293] Optionally, the management module 2010 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.
[0294] Optionally, the debugging module 2020 is also 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.
[0295] Optionally, the debugging module 2020 is further used to: after the debugging is completed, clear the flow segment from the sandbox operating environment.
[0296] For a detailed description, please refer to the method 200 in the previous text, which will not be repeated here.
[0297] Each module in the system 2000 may be implemented by software or hardware. For example, the management module 2010 is taken as an example to introduce the implementation of the management module 2010. Similarly, the implementation of other modules may refer to the implementation of the management module 2010.
[0298] As an example of a software functional unit, the management module 2010 may include code running on a computing instance. Among them, the computing instance may include at least one of a physical host (computing device), a virtual machine, and a container. Further, the above-mentioned 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 (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 data centers with similar geographical locations. Among them, usually a region may include multiple AZs.
[0299] Similarly, multiple hosts / virtual machines / containers used to run the code can be distributed in the same virtual private cloud (VPC) or in multiple VPCs. Usually, a VPC is set up in a region. For cross-region communication between two VPCs in the same region and between VPCs in different regions, a communication gateway needs to be set up in each VPC to achieve interconnection between VPCs through the communication gateway.
[0300] As an example of a hardware functional unit, the management module 2010 may include at least one computing device, such as a server, etc. Alternatively, the management module 2010 may also be a device 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.
[0301] 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 computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.
[0302] 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.
[0303] The present application also provides a computing device 1000. Figure 8 As shown, computing device 1000 includes: bus 1002, processor 1004, memory 1006 and communication interface 1008. Processor 1004, memory 1006 and communication interface 1008 communicate through bus 1002. Computing device 1000 can be a server or a terminal device. It should be understood that the present application does not limit the number of processors and memories in computing device 1000.
[0304] The bus 1002 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8 The bus 1004 may include a path for transmitting information between various components of the computing device 1000 (eg, the memory 1006, the processor 1004, and the communication interface 1008).
[0305] The processor 1004 may include any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).
[0306] The memory 1006 may include a volatile memory, such as a random access memory (RAM). The processor 1004 may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid state drive (SSD).
[0307] 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.
[0308] 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.
[0309] The embodiment of the present application also provides 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 smart phone.
[0310] like Fig. 9 As shown, 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.
[0311] 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 may jointly execute the instructions for executing the workflow debugging method.
[0312] It should be noted that the memory 1006 in different computing devices 1000 in the computing device cluster can store different instructions, which are respectively used to execute part 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 modules in the console module 2030, the management module 2010 and the debugging module 2020.
[0313] In some possible implementations, one or more computing devices in the computing device cluster may be connected via a network, which may be a wide area network or a local area network. Fig.10 A possible implementation is shown. Fig.10 As shown, 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 debugging module 2020.
[0314] Fig.10 The connection method between the computing device clusters shown may be considered to be that the workflow debugging method provided in this application may require data storage or security issues, so it is considered to hand over the functions implemented by the management module 2010 and the debugging module 2020 to the computing device 1000B for execution.
[0315] It should be understood that Fig.10 The functions of the computing device 1000A shown in FIG. 1000A 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.
[0316] The embodiment of the present application also provides a computer program product including instructions. The computer program product may be software or a program product including instructions that can be run on a computing device or stored in any available medium. When the computer program product is run on at least one computing device, the at least one computing device is enabled to perform a workflow debugging method.
[0317] The embodiment of 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 containing 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 hard disk). The computer-readable storage medium includes instructions that instruct the computing device to perform a method for workflow commissioning.
[0318] 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 it. 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 cause the essence of the corresponding technical solutions to deviate 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, the relevant information of the stream segment indicating 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
Cited By
Workflow debugging method and system
EP4715600A1
Workflow debugging method and system
WO2025001207A1
