A process orchestration method, system, medium and computer program product
By using annotation methods in business program code to dynamically orchestrate business processes, the problem that process engines in the existing technology cannot meet the complex and flexible and changeable business process orchestration, and the dynamic orchestration and real-time effectiveness of business processes is achieved, reducing maintenance and understanding costs.
Patent Information
- Application Number
- CN202111571273.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-21
- Publication Date
- 2025-07-08
- Estimated Expiration
- 2041-12-21
AI Technical Summary
The process engines in the prior art cannot meet the complex and flexible and changeable business process orchestration needs, and need to frequently generate new process templates, resulting in the inability to take effect in real time and trial and error quickly, which increases maintenance and understanding costs.
By using annotation methods to annotate process elements in the code of the business program, the client generates intermediate files and reports them to the server. The server responds to the orchestration operation of the process elements, generates business process configuration information, and achieves dynamic orchestration and real-time effectiveness.
It realizes dynamic orchestration and real-time effectiveness of business processes, reduces manual maintenance costs and understanding costs, and meets the complex and flexible and changeable business process orchestration needs.
Smart Images

Figure CN114428613B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of computer technologies, and particularly to a process orchestration method, system, medium, and computer program product. Background Art
[0002] Due to the characteristics of high maintainability of processes, with the complexity of business, in order to improve the efficiency of business management, it is necessary to process the "business flow" into a business process in a process-oriented manner. However, business processes in different scenarios vary greatly, and business processes in the same scenario will change frequently as the business iterates and updates frequently. Therefore, it is necessary to frequently orchestrate processes to meet the requirements of new scenarios and new businesses.
[0003] Currently, in the prior art, a process engine is used to implement the process-oriented processing of the "business flow" to obtain a business process. However, since the process engine generates a business process based on a fixed process template, in the face of the requirements of new scenarios and new businesses, a new process template needs to be generated, and the process engine can generate a new business process based on the new process template.
[0004] It can be seen that the process engine in the prior art cannot meet the requirements of complex and flexible business process orchestration. Summary of the Invention
[0005] At least one embodiment of the present disclosure provides a process orchestration method, system, medium, and computer program product.
[0006] In a first aspect, an embodiment of the present disclosure provides a process orchestration method. Process elements are pre-annotated in the code of a business program in an annotation manner. The process orchestration method includes:
[0007] When the client compiles the code of the business program, it performs annotation processing on the code to generate an intermediate file including process elements;
[0008] When the client starts the business program after completion of compilation, it reports the process elements included in the intermediate file to the server;
[0009] The server generates business process configuration information corresponding to the orchestration operation in response to the orchestration operation on the process elements in the business process configuration page.
[0010] In some embodiments, annotating process elements in an annotation manner includes:
[0011] Annotating one or more process interfaces with first annotation information;
[0012] Annotating one or more process nodes with second annotation information.
[0013] In some embodiments, when the client compiles the code of the business program, annotation processing is performed on the code, and the generated intermediate file including process elements includes:
[0014] The client compiles the code of the business program through a compiler to obtain the abstract syntax tree of the code;
[0015] The compiler scans the process elements included in the abstract syntax tree through an annotation processing tool;
[0016] The annotation processing tool saves the scanned process elements into the intermediate file.
[0017] In some embodiments, after the compiler scans the process elements included in the abstract syntax tree through the annotation processing tool, the process orchestration method further includes:
[0018] The client enhances the process interfaces scanned by the annotation processing tool so that when the process interfaces are called, the parsing and execution of the business process can be completed.
[0019] In some embodiments, before the server responds to the orchestration operation on the process elements in the business process configuration page and generates the business process configuration information corresponding to the orchestration operation, the process orchestration method further includes:
[0020] The server responds to the operation of configuring the solution in the business process configuration page and generates the corresponding business solution;
[0021] The server responds to the operation of implementing the business solution in the industry in the business process configuration page and generates the corresponding business identity;
[0022] After the server generates the corresponding business identity, it executes the step of responding to the orchestration operation on the process elements in the business process configuration page and generating the business process configuration information corresponding to the orchestration operation, where the business process configuration information corresponds to the business identity.
[0023] In some embodiments, the process orchestration method further includes:
[0024] When the client runs the business program with the target business identity and calls the annotated process interface, the process interface performs the following steps:
[0025] Based on the target business identity, obtain the business process configuration information corresponding to the target business identity from the server;
[0026] Parse the business process configuration information to determine the multiple process nodes in the business process configuration information and the orchestration order of each process node;
[0027] Based on the orchestration order of each process node, call each process node.
[0028] In a second aspect, embodiments of the present disclosure further provide a process orchestration system, which pre-annotates process elements in the code of a business program in an annotation manner. The process orchestration system includes: a client and a server;
[0029] The client is configured to perform annotation processing on the code when compiling the code of the business program, and generate an intermediate file including process elements;
[0030] The client is further configured to report the process elements included in the intermediate file to the server when starting the business program after completion of compilation;
[0031] The server is configured to generate business process configuration information corresponding to the orchestration operation in response to an orchestration operation on the process elements in the business process configuration page.
[0032] In a third aspect, embodiments of the present disclosure further provide a system including at least one computing device and at least one storage device storing instructions. When the instructions are run by the at least one computing device, the at least one computing device is caused to execute the steps of the process orchestration method according to any one of the embodiments in the first aspect.
[0033] In a fourth aspect, embodiments of the present disclosure further provide a computer-readable storage medium. The computer-readable storage medium stores a program or instructions. When the program or instructions are run by at least one computing device, the at least one computing device is caused to execute the steps of the process orchestration method according to any one of the embodiments in the first aspect.
[0034] In a fifth aspect, embodiments of the present disclosure further provide a computer program product. The computer program product includes a computer program. The computer program is stored in a computer-readable storage medium. At least one processor of the computer reads and executes the computer program, so that the computer executes the steps of the process orchestration method according to any one of the embodiments in the first aspect.
[0035] It can be seen that in at least one embodiment of the present disclosure, by annotating process elements in the code of a business program in an annotation manner, in the face of the requirements of new scenarios and new services, the corresponding business processes can be dynamically orchestrated using the annotated process elements. Since the process elements are a true reflection of the capabilities in the code of the business program, the orchestrated business processes can directly run in the business program and take effect without restarting the business program. It can be seen that the present disclosure realizes the dynamic orchestration and real-time effectiveness of business processes and can meet the requirements of complex and flexible business process orchestration. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] To more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following will briefly introduce the accompanying drawings required for the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only some embodiments of the present disclosure. For those of ordinary skill in the art, other accompanying drawings can also be obtained based on these drawings.
[0037] Figure 1 It is a schematic diagram of process choreography and process execution based on a process engine in the prior art;
[0038] Figure 2 It is an exemplary flowchart of a process choreography method provided by an embodiment of the present disclosure;
[0039] Figure 3 It is an exemplary flowchart of another process choreography method provided by an embodiment of the present disclosure;
[0040] Figure 4 It is a schematic diagram of the operation process of a business process configuration page provided by an embodiment of the present disclosure;
[0041] Figure 5 It is a schematic diagram of a client executing a business process through a business program;
[0042] Figure 6 It is a schematic diagram of the architecture of a server and a client provided by an embodiment of the present disclosure;
[0043] Figure 7 It is a schematic diagram of a process choreography system provided by an embodiment of the present disclosure;
[0044] Figure 8 It is an exemplary block diagram of a system provided by an embodiment of the present disclosure, including at least one computing device and at least one storage device storing instructions. Detailed implementation manners
[0045] In order to more clearly understand the above objects, features, and advantages of the present disclosure, the following will further elaborate on the present disclosure in conjunction with the accompanying drawings and embodiments. It can be understood that the described embodiments are part of the embodiments of the present disclosure, rather than all of the embodiments. The specific embodiments described herein are only used to explain the present disclosure, rather than to limit the present disclosure. Based on the described embodiments of the present disclosure, all other embodiments obtained by those of ordinary skill in the art belong to the scope of protection of the present disclosure.
[0046] It should be noted that in this text, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations.
[0047] Figure 1 FIG. 1 shows a schematic diagram of process choreography and process execution based on a process engine in the prior art. Among them, the process engine can be SmartEngine or other types of process engines. As Figure 1 shown, the process of process choreography and process execution based on the process engine includes the following three steps 101 to 103:
[0048] In step 101, a process template is generated.
[0049] It can be understood that generating a process template belongs to the development stage of the business process.
[0050] On the editing page of the process template, the user can edit the process template by dragging and dropping. After the editing is completed, the user can trigger the generation button provided by the editing page. Then, the process engine generates a corresponding process template based on the editing data in the editing page in response to the trigger operation of the generation button.
[0051] The generated process template complies with the BPMN (Business Process Modeling Notation) standard.
[0052] In some embodiments, the editing page of the process template can be provided by the process engine or can be provided by a non-process engine.
[0053] In some embodiments, the generated process template is a file in XML (eXtensible Markup Language) format.
[0054] In step 102, the process template is configured in the business program.
[0055] It can be understood that configuring the process template in the business program belongs to the configuration stage of the business process.
[0056] After generating the process template, the user can configure the process template into the business program. For example, the user can configure the process template under the project engineering corresponding to the business program.
[0057] In step 103, the process template is parsed during the running process of the business program to drive the process to run.
[0058] It can be understood that step 103 belongs to the running stage of the business process.
[0059] It should be noted that the business program parses the XML file of the process template during the running process, rather than during the startup process.
[0060] It can be seen that in the face of the requirements of new scenarios and new services, new process templates need to be generated in the above process, and the new process templates need to be configured under the project engineering corresponding to the business program. After that, the new project engineering needs to be submitted to an open-source version control system (such as SVN, Git, etc.), and the business program needs to be restarted to take effect. Therefore, it cannot take effect in real time and cannot quickly try out errors, and cannot quickly support new scenarios and new services. At the same time, due to the large differences in the processes of different business types or scenarios, the maintenance cost is relatively high.
[0061] In addition, in the above process, the process definition required to generate the process template is defined on the editing page of the process template and has nothing to do with the specific business. Therefore, the process definition and the code logic of the business program are relatively independent (it can also be understood as relatively fragmented). Therefore, it is necessary to manually correspond the process and the code, and it cannot be guaranteed that the generated process template can run directly in the project engineering, which increases the manual maintenance cost and the understanding cost.
[0062] In addition, in the above process, it is necessary to configure the new process template under the project engineering corresponding to the business program, which increases the intrusion into the code of the business program.
[0063] Therefore, at least one embodiment of the present disclosure provides a process orchestration method, system, medium or computer program product. In at least one embodiment of the present disclosure, by using annotation methods to mark process elements in the code of the business program, in the face of the requirements of new scenarios and new services, the corresponding business processes can be dynamically orchestrated by using the marked process elements. Since the process elements are a true reflection of the capabilities in the code of the business program, the orchestrated business processes can run directly in the business program and take effect without restarting the business program. It can be seen that the present disclosure realizes the dynamic orchestration and real-time effect of business processes and can meet the requirements of complex and flexible business process orchestration.
[0064] Figure 2 FIG. is an exemplary flowchart of a process orchestration method provided by an embodiment of the present disclosure. The process orchestration method pre-marks process elements in the code of the business program by using annotation methods, wherein the code of the business program defines business-related capabilities (it can also be understood as functions). As Figure 2 shown, the process orchestration method may include but is not limited to the following steps 201 to step 203:
[0065] In step 201, when the client compiles the code of the business program, annotation processing is performed on the code to generate an intermediate file including process elements.
[0066] Among them, the client is a client independent of the business. The business program is a program related to the business in the business system. For example, if the business system is a shopping system, the business program may be an order placement program.
[0067] In this embodiment, the client can compile the code of the service program through a compiler to obtain the abstract syntax tree of the code. The abstract syntax tree (AST) abstractly represents the syntax structure of the code in a tree form, and each node on the tree represents a syntax structure in the code (such as packages, types, interfaces, modifiers, etc.).
[0068] For example, the client can compile the code of the service program through a Java compiler (Java Complier), perform lexical analysis and syntax analysis on the code to obtain the abstract syntax tree of the code. Among them, lexical analysis includes: converting the characters in the code (each keyword, variable, etc.) into a set of tokens, and a token is the smallest unit in the compilation process. Syntax analysis includes: constructing an abstract syntax tree from the set of tokens (tokens).
[0069] After constructing the abstract syntax tree of the code, the Java compiler can scan the process elements included in the abstract syntax tree through an annotation processing tool (Annotation Processing Tool, APT). Among them, the annotation processing tool is a command-line program for annotation processing. The annotation processing tool can process the objects of annotations, and those skilled in the art can adjust the annotation processing method of the annotation processing tool according to actual needs.
[0070] In this embodiment, the annotation processing method of the annotation processing tool is adjusted as follows: the annotation processing tool saves the scanned process elements to an intermediate file, where the intermediate file is associated with the service program.
[0071] It can be seen that in the embodiments of the present disclosure, by scanning process elements when compiling the code of the service program, any type of annotation can be obtained, such as local variables, which is information that cannot be scanned when the code of the service program is running.
[0072] In addition, in the embodiments of the present disclosure, by scanning process elements when compiling the code of the service program, problems can be discovered and solved in a timely manner, thereby reducing the startup time of the service program.
[0073] In step 202, when the client starts the service program after completion of compilation, it reports the process elements included in the intermediate file to the server.
[0074] In this embodiment, during the process of starting the service program, the client scans the intermediate file associated with the service program, parses the process elements included in the intermediate file, and then reports the process elements to the server.
[0075] Among them, the server is a server irrelevant to the service. After the server obtains the process elements reported by the client, it can persistently store the process elements.
[0076] In step 203, the server generates business process configuration information corresponding to the orchestration operation in response to the orchestration operation on the process elements in the business process configuration page.
[0077] Among them, the business process configuration page is a page provided by the server, and users can perform visual business process orchestration on the business process configuration page. For example, users can achieve business process orchestration by performing orchestration operations such as dragging different process elements on the business process configuration page.
[0078] It can be seen that in the embodiments of the present disclosure, by using annotation methods to mark process elements in the code of the business program, in the face of the requirements of new scenarios and new services, the corresponding business processes can be dynamically orchestrated using the marked process elements. Since the process elements are a true reflection of the capabilities in the code of the business program, the orchestrated business processes can directly run in the business program and take effect without restarting the business program. It can be seen that the present disclosure realizes the dynamic orchestration and real-time effectiveness of business processes and can meet the complex and flexible business process orchestration requirements.
[0079] In addition, in the embodiments of the present disclosure, by using annotation methods to mark process elements in the code of the business program, the process elements can be orchestrated on the business process configuration page, realizing the dynamic orchestration and real-time effectiveness of business processes, without generating process templates, thereby reducing the intrusion into the code of the business program.
[0080] Based on Figure 2 the process orchestration method shown, Figure 3 FIG. is an exemplary flowchart of another process orchestration method provided by the embodiments of the present disclosure. In this process orchestration method, one or more process interfaces are marked in advance in the code of the business program through first annotation information; one or more process nodes are marked through second annotation information. Among them, an annotation can be understood as a Java annotation, which is a kind of annotation mechanism introduced in JDK 5.0 (version 5.0 of the software development kit for the Java language).
[0081] For example, one or more process interfaces are marked in advance in the code of the business program through @FlowChain. Among them, @FlowChain is the first annotation information. Marking @FlowChain on the interface of the business program code indicates that the interface is a process interface. One or more process nodes are marked through @FlowNode. Among them, @FlowNode is the second annotation information. Marking @FlowNode on the implementation class (which can be understood as a kind of ability or function of the code) of the business program code indicates that the implementation class is a process node.
[0082] It can be seen that the process nodes in the business process are all true reflections of the capabilities in the business program code, solving the problem of the relative fragmentation between the process definition and the code logic of the business program, and eliminating the need for manual correspondence between the process and the code.
[0083] In addition, by annotating the process nodes in the business process code, the external exposure of the capabilities in the business program code (which can also be understood as the white-boxing and explicit manifestation of capabilities) is realized, solving the problem of difficult capability reuse in the business system.
[0084] As Figure 3 shown, the process choreography method may include, but is not limited to, the following steps 301 to 303:
[0085] In step 301, when the client compiles the code of the business program, annotation processing is performed on the code to generate an intermediate file including a process interface and process nodes.
[0086] In this embodiment, the client can compile the code of the business program through a Java compiler, convert the characters (each keyword, variable, etc.) in the code into a set of tokens, and construct an abstract syntax tree from the set of tokens.
[0087] After constructing the abstract syntax tree of the code, the Java compiler scans the process interface and process nodes included in the abstract syntax tree through an Annotation Processing Tool (APT). The annotation processing tool saves the scanned process interface and process nodes into the intermediate file, where the intermediate file is associated with the business program.
[0088] In step 302, when the client starts the business program after completion of compilation, it reports the process interface and process nodes included in the intermediate file to the server.
[0089] In this embodiment, during the process of starting the business program, the client scans the intermediate file associated with the business program, parses out the process interface and process nodes included in the intermediate file, and then reports the process interface and process nodes to the server.
[0090] After the server obtains the process interface and process nodes reported by the client, it can persistently store the process interface and process nodes.
[0091] In step 303, in response to the choreography operation on the process interface and / or process nodes in the business process configuration page, the server generates business process configuration information corresponding to the choreography operation.
[0092] Among them, the business process configuration page is a page provided by the server. Users can perform visual business process orchestration on the business process configuration page. For example, users can perform orchestration operations such as dragging and dropping different process interfaces and different process nodes on the business process configuration page to achieve business process orchestration.
[0093] It can be seen that in this embodiment, the optional process nodes and optional process interfaces displayed on the business process configuration page are both true reflections of the capabilities in the business program code. The business process orchestration actually orchestrates the capabilities in the business program code, solving the problem that the process definition and the code logic of the business program are relatively separated. There is no need to manually correspond the process and the code, ensuring that the generated business process can run directly in the business program, reducing the manual maintenance cost and the understanding cost.
[0094] In addition, different orchestrated business processes can be uniformly managed on the business process configuration page, thereby reducing the process maintenance cost.
[0095] Based on the process orchestration methods disclosed in the above embodiments, Figure 4 FIG. 4 is a schematic diagram of an operation process of a business process configuration page provided by an embodiment of the present disclosure. The operation process includes the following steps 401 to 403:
[0096] In step 401, the server generates a corresponding business solution in response to an operation of configuring a solution on the business process configuration page.
[0097] In this embodiment, the server can provide a solution template. Users can configure a solution based on the solution template on the business process configuration page. Among them, the solution template includes multiple solution configuration items, and each configuration item includes multiple fill-in values. For example, the order placement solution template includes an item of "whether to check inventory", and the item of "whether to check inventory" includes two fill-in values: yes and no. Another example is that the order placement solution template may also include configuration items such as "document number" and "document status".
[0098] It should be noted that the business solution generated in step 401 is a general solution for solving business problems. For example, the business solution is a general order placement solution for solving order placement problems, which is independent of specific industries and scenarios.
[0099] In step 402, the server generates a corresponding business identity in response to an operation of implementing the business solution in a specific industry on the business process configuration page.
[0100] In this embodiment, the user can implement the business solution in the business process configuration page for different industries, and customized solutions for different industries or different scenarios in the same industry can be obtained. For example, for the general order placement solution, inventory verification is not required in the first industry, so the selected value of the item "whether to verify inventory" can be set to "no" to obtain the customized order placement solution for the first industry; in the second industry, inventory verification is required, so the selected value of the item "whether to verify inventory" can be set to "yes" to obtain the customized order placement solution for the second industry.
[0101] In this embodiment, after the operation of implementing the business solution for different industries, the generated business identities include but are not limited to at least one of the following information: tenant information, account set information, and scenario information. Among them, tenant information can be understood as organizational information or enterprise information, and one tenant can have multiple roles and multiple users; account set information can be understood as industry information. For example, one business identity is: enterprise A1 + e-commerce + shopping platform B1; another business identity is: enterprise A2 + e-commerce + shopping platform B2.
[0102] In step 403, after generating the corresponding business identity, the server generates the business process configuration information corresponding to the orchestration operation in response to the orchestration operation of the process elements in the business process configuration page, where the business process configuration information corresponds to the business identity.
[0103] In this embodiment, for different business identities, different business processes can be orchestrated. For example, there are 10 process nodes related to the order placement process. For the business identity of enterprise A1 + e-commerce + shopping platform B1, 6 of these process nodes need to be orchestrated; for the business identity of enterprise A2 + e-commerce + shopping platform B2, 8 of these process nodes need to be orchestrated.
[0104] In this embodiment, the business process configuration information corresponding to the orchestrated business process is directly saved in the database of the server. For example, in the database of the server, one piece of business process configuration information corresponds to one business process, and the business process configuration information is stored in the database in the JSON (JavaScript Object Notation) format.
[0105] Compared with the requirements of new scenarios and new services in the prior art, it is necessary to generate new process templates, configure the new process templates under the project engineering corresponding to the business program, and then submit the new project engineering to an open-source version control system (such as SVN, Git, etc.), and restart the business program to take effect. Therefore, it cannot take effect in real time and cannot quickly try out errors, and cannot quickly support new scenarios and new services. In this embodiment, if the business process changes, the server can notify the client through MQ (Message Queue) messages, and the client pulls the latest business process and executes the latest business process through the business program. It can be seen that in this embodiment, the choreographed business process can take effect in real time without restarting the business program.
[0106] Based on the process choreography method and the operation process of the business process configuration page disclosed in the above embodiments, Figure 5 It is a schematic diagram of the client executing the business process through the business program. It should be noted that after the compiler scans the process elements included in the abstract syntax tree through the annotation processing tool, the client enhances the process interfaces scanned by the annotation processing tool so that the business process can be parsed and executed when the process interfaces are called.
[0107] When the client runs the business program with the target business identity, when calling the annotated process interface, the process interface executes as Figure 5 shown in the following steps 501 to 503:
[0108] In step 501, based on the target business identity, obtain the business process configuration information corresponding to the target business identity from the server.
[0109] In this embodiment, the corresponding relationship between the business identity and the business process configuration information is stored in the database of the server. Therefore, the business process configuration information corresponding to the target business identity can be requested from the server. Correspondingly, the server can determine the business process configuration information corresponding to the target business identity based on this corresponding relationship and send the business process configuration information to the client.
[0110] In step 502, parse the business process configuration information to determine multiple process nodes in the business process configuration information and the choreography order of each process node.
[0111] In this embodiment, the business process configuration information includes each process node constituting the business process and the choreography order of each process node. Therefore, by parsing the business process configuration information, multiple process nodes of the business process and the choreography order of each process node can be determined.
[0112] In step 503, based on the choreography order of each process node, call each process node.
[0113] In this embodiment, since the process node is a true reflection of the capabilities in the business program code, therefore, invoking the process node can implement the corresponding capabilities, that is, execute the capabilities of the process node. When all the process nodes of the business process are invoked, the execution of the business process is completed.
[0114] Based on the content disclosed in the above embodiments, Figure 6 It is a schematic diagram of the architecture of a server and a client.
[0115] In Figure 6 the client includes a development period, a compilation period, and a startup period.
[0116] In the development period, one or more process interfaces are marked in the code of the business program through first annotation information; one or more process nodes are marked through second annotation information.
[0117] In the compilation period, the client compiles the code of the business program through a Java compiler (Java Complier) to construct an abstract syntax tree of the code; furthermore, after constructing the abstract syntax tree of the code, the Java compiler scans the process elements (including process interfaces and process nodes) included in the abstract syntax tree through an annotation processing tool (Annotation Processing Tool, APT); thus, the annotation processing tool saves the scanned process elements to an intermediate file.
[0118] In the startup period, the client scans the intermediate file associated with the business program, parses the process elements included in the intermediate file; furthermore, reports the process elements to the server.
[0119] In some embodiments, during the compilation period, it further includes Figure 6 the following functions not shown in
[0120] In Figure 6 the server includes a solution service, an implementation service, and a process element service.
[0121] In this embodiment, the server provides a business process configuration page so that users can use the solution service, implementation service, and process element service provided by the server through the business process configuration page.
[0122] The process of the solution service is: the server generates a corresponding business solution in response to an operation of configuring a solution in the business process configuration page.
[0123] The process of the implementation service is: the server generates a corresponding business identity in response to an operation of implementing the business solution in the industry in the business process configuration page.
[0124] The process of the process element service is as follows: After the server generates the corresponding business identity, in response to the orchestration operation of the process element on the business process configuration page, it generates the business process configuration information corresponding to the orchestration operation, where the business process configuration information corresponds to the business identity.
[0125] In some embodiments, the client also includes Figure 6 a runtime not shown in the figure.
[0126] During the runtime, when the client runs the business program with the target business identity and calls the annotated process interface, the process interface performs the following steps: Based on the target business identity, obtain the business process configuration information corresponding to the target business identity from the server; Parse the business process configuration information to determine multiple process nodes in the business process configuration information and the orchestration order of each process node; Based on the orchestration order of each process node, call each process node.
[0127] Since the process node is a true reflection of the capabilities in the business program code, therefore, calling the process node can implement the corresponding capabilities, that is, execute the capabilities of the process node. When all the process nodes of the business process are called, the execution of the business process is completed.
[0128] It should be noted that for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art can understand that the embodiments of the present disclosure are not limited by the described action sequence, because according to the embodiments of the present disclosure, certain steps can be performed in other sequences or simultaneously. In addition, those skilled in the art can understand that the embodiments described in the specification are all optional embodiments.
[0129] Figure 7 The figure is a schematic diagram of a process orchestration system provided by an embodiment of the present disclosure. Process elements are pre-annotated in the code of the business program. In some embodiments, one or more process interfaces can be annotated with the first annotation information, and one or more process nodes can be annotated with the second annotation information.
[0130] As Figure 7 shown in the figure, the process orchestration system includes: a client 71 and a server 72;
[0131] The client 71 is used to perform annotation processing on the code when compiling the code of the business program to generate an intermediate file including process elements;
[0132] The client 71 is also used to report the process elements included in the intermediate file to the server when starting the business program after completion of compilation;
[0133] The server 72 is configured to generate business process configuration information corresponding to an orchestration operation in response to an orchestration operation on process elements in a business process configuration page.
[0134] In some embodiments, when the client 71 compiles the code of a business program, it performs annotation processing on the code to generate an intermediate file including process elements, which includes:
[0135] The client 71 compiles the code of the business program through a compiler to obtain an abstract syntax tree of the code; the compiler scans the process elements included in the abstract syntax tree through an annotation processing tool; the annotation processing tool saves the scanned process elements into the intermediate file.
[0136] In some embodiments, the client 71 is further configured to: after the compiler scans the process elements included in the abstract syntax tree through the annotation processing tool, enhance the process interfaces scanned by the annotation processing tool so that the business process can be parsed and executed when the process interfaces are called.
[0137] In some embodiments, the server 72 is configured to: generate a corresponding business solution in response to an operation of configuring a solution in a business process configuration page; generate a corresponding business identity in response to an operation of implementing the business solution in the industry in the business process configuration page; after generating the corresponding business identity, generate business process configuration information corresponding to an orchestration operation in response to an orchestration operation on process elements in the business process configuration page, wherein the business process configuration information corresponds to the business identity.
[0138] In some embodiments, when the client 71 runs the business program with a target business identity, when a marked process interface is called, the process interface performs the following steps: based on the target business identity, obtain business process configuration information corresponding to the target business identity from the server; parse the business process configuration information to determine multiple process nodes in the business process configuration information and the orchestration order of each process node; based on the orchestration order of each process node, call each process node.
[0139] Details of the embodiments of the above-disclosed process orchestration system may refer to the details of the embodiments of the foregoing process orchestration method. To avoid repetition, they will not be elaborated herein.
[0140] Figure 8 It is an exemplary block diagram of a system provided by an embodiment of the present disclosure, including at least one computing device and at least one storage device storing instructions. In some embodiments, the system can be used for big data processing, and at least one computing device and at least one storage device can be distributedly deployed, making the system a distributed data processing cluster.
[0141] Such as Figure 8As shown, the system includes: at least one computing device 81 and at least one storage device 82 for storing instructions. It can be understood that the storage device 82 in this embodiment may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories.
[0142] In some embodiments, the storage device 82 stores the following elements, executable units or data structures, or subsets thereof, or extended sets thereof: an operating system and application programs.
[0143] Among them, the operating system includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic tasks and processing hardware-based tasks. The application programs include various application programs, such as a Media Player, a Browser, etc., for implementing various application tasks. The program for implementing the process choreography method provided in the embodiments of the present disclosure may be included in the application programs.
[0144] In the embodiments of the present disclosure, at least one computing device 81, by calling the programs or instructions stored in at least one storage device 82, specifically, the programs or instructions stored in the application programs, is configured to execute the steps of the various embodiments of the process choreography method provided in the embodiments of the present disclosure.
[0145] The process choreography method provided in the embodiments of the present disclosure may be applied to the computing device 81 or implemented by the computing device 81. The computing device 81 may be an integrated circuit chip having signal processing capabilities. During implementation, the various steps of the above method may be completed by the integrated logic circuit in the hardware of the computing device 81 or by instructions in software form. The above computing device 81 may be a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0146] The steps of the process orchestration method provided by the embodiments of the present disclosure can be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software units in the decoding processor. The software units can be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. This storage medium is located in the storage device 82, and the computing device 81 reads the information in the storage device 82 and combines its hardware to complete the steps of the method.
[0147] The embodiments of the present disclosure also propose a computer-readable storage medium. The computer-readable storage medium stores programs or instructions. When the programs or instructions are run by at least one computing device, the at least one computing device is caused to execute the steps of the process orchestration method in various embodiments. To avoid repetitive description, it will not be elaborated herein. Among them, the computing device can be Figure 8 the computing device 81 shown. In some embodiments, the computer-readable storage medium is a non-transitory computer-readable storage medium.
[0148] The embodiments of the present disclosure also propose a computer program product. Among them, the computer program product includes a computer program. The computer program is stored in a non-transitory computer-readable storage medium. At least one processor of the computer reads and executes the computer program, so that the computer executes the steps of the process orchestration method in various embodiments. To avoid repetitive description, it will not be elaborated herein.
[0149] It should be noted that in this article, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, the element defined by the statement "including..." does not exclude the existence of additional identical elements in the process, method, article or device including the element.
[0150] Those skilled in the art can understand that although some of the embodiments described herein include certain features included in other embodiments rather than other features, the combination of the features of different embodiments means that it is within the scope of the present disclosure and forms different embodiments.
[0151] Those skilled in the art can understand that the descriptions of the various embodiments have their own emphases. For the parts not elaborated in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0152] Although embodiments of the present disclosure have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations fall within the scope defined by the appended claims.
Claims
1. A process orchestration method, which pre-annotates process elements in the code of a business program in an annotation manner. The method includes: When the client compiles the code of the business program, it performs annotation processing on the code to generate an intermediate file including the process elements, including: the client compiles the code of the business program through a compiler to obtain an abstract syntax tree of the code; the compiler scans the process elements included in the abstract syntax tree through an annotation processing tool; the annotation processing tool saves the scanned process elements into the intermediate file; When the client starts the business program after completing compilation, it reports the process elements included in the intermediate file to the server; The server generates business process configuration information corresponding to the orchestration operation in response to the orchestration operation on the process elements in the business process configuration page.
2. The method according to claim 1, wherein, The annotation of process elements in an annotation manner includes: Annotating one or more process interfaces with first annotation information; Annotating one or more process nodes with second annotation information.
3. The method according to claim 1, wherein After the compiler scans the process elements included in the abstract syntax tree through the annotation processing tool, the method further includes: The client enhances the process interfaces scanned by the annotation processing tool so that the process interfaces can complete the parsing and execution of the business process when being called.
4. The method according to claim 1, wherein, Before the server generates business process configuration information corresponding to the orchestration operation in response to the orchestration operation on the process elements in the business process configuration page, the method further includes: The server generates a corresponding business solution in response to the operation of configuring a solution in the business process configuration page; The server generates a corresponding business identity in response to the operation of implementing the business solution in the industry in the business process configuration page; After the server generates the corresponding business identity, it executes the step of generating business process configuration information corresponding to the orchestration operation in response to the orchestration operation on the process elements in the business process configuration page, where the business process configuration information corresponds to the business identity.
5. The method according to claim 4, wherein The method further includes: When the client runs the business program with a target business identity and calls the annotated process interface, the process interface performs the following steps: Based on the target business identity, obtain business process configuration information corresponding to the target business identity from the server; Parse the business process configuration information to determine multiple process nodes in the business process configuration information and the orchestration order of each process node; Based on the orchestration order of each process node, call each process node.
6. A process orchestration system that pre-annotates process elements in the code of a business program by means of annotations. The system includes: Client and server; The client is used to perform annotation processing on the code when compiling the code of the business program to generate an intermediate file including the process elements, including: the client compiles the code of the business program through a compiler to obtain an abstract syntax tree of the code; The compiler scans the process elements included in the abstract syntax tree through an annotation processing tool; the annotation processing tool saves the scanned process elements into the intermediate file; The client is further configured to report the process elements included in the intermediate file to the server when starting the business program after compilation is completed; The server is configured to generate business process configuration information corresponding to the orchestration operation in response to an orchestration operation on the process elements in the business process configuration page.
7. A system comprising at least one computing device and at least one storage device storing instructions, wherein, When the instruction is run by the at least one computing device, the at least one computing device is caused to execute the steps of the process orchestration method according to any one of claims 1 to 5.
8. A computer-readable storage medium, wherein, The computer-readable storage medium stores a program or instruction, and when the program or instruction is run by the at least one computing device, the at least one computing device is caused to execute the steps of the process orchestration method according to any one of claims 1 to 5.
9. A computer program product, wherein, The computer program product includes a computer program, the computer program is stored in a computer-readable storage medium, and at least one processor of the computer reads and executes the computer program, so that the computer executes the steps of the process orchestration method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Micro-business service process interface generation method and terminal
CN113326026A
Method and system for realizing API arrangement based on HTML
CN113805868A