Business processing method and apparatus
Patent Information
- Application Number
- CN202510405682.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-01
- Publication Date
- 2026-10-16
AI Technical Summary
由于硬件环境、版本更新等各种原因,需要切换不同的流程引擎使用,由于不同流程引擎框架差异性大,切换流程引擎的研发成本较高
[0038] Fourthly, embodiments of the present invention provide a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the method of any of the above embodiments.
Smart Images

Figure CN122924924A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a business processing method and apparatus. Background Technology
[0002] Workflow refers to the automated implementation of a portion or the entire business process in a computer application environment. Examples include procurement and contract review. Workflows are typically created using a workflow engine. Currently, various workflow engines exist, such as EasyFlow and Activiti. Due to various reasons such as hardware environment and version updates, it is necessary to switch to different workflow engines. However, because different workflow engine frameworks differ significantly, the development cost of switching workflow engines is high. Summary of the Invention
[0003] In view of this, embodiments of the present invention provide a business processing method and apparatus that can reduce the development cost of switching process engines.
[0004] In a first aspect, embodiments of the present invention provide a business processing method, including:
[0005] Determine the node model corresponding to the target business;
[0006] The target business is processed sequentially by executing multiple nodes corresponding to the target business in the node model.
[0007] Execute multiple nodes corresponding to the target business in the node model sequentially, including:
[0008] Determine the current node from among the multiple nodes corresponding to the target business;
[0009] In response to the current node being the execution node, the generalized processing corresponding to the current node is executed, thereby calling the process engine corresponding to the node model to execute the processing logic of the current node.
[0010] Optionally, perform the generalized processing corresponding to the current node to call the process engine corresponding to the node model to execute the processing logic of the current node, including:
[0011] Determine the node request and request parameters corresponding to the execution node;
[0012] Determine the request type for the node request;
[0013] Based on the request type, perform the generalized processing corresponding to the current node, and then invoke the process engine to execute the processing logic of the current node based on the request parameters.
[0014] Optionally, based on the request type, perform the generalized processing corresponding to the current node, and invoke the process engine to execute the processing logic of the current node based on the request parameters, including:
[0015] In response to the common request type, the interface method corresponding to the request parameters is determined as the first interface method; the process engine is called to execute the first interface method; wherein, the first interface method takes the request parameters as input and is a method for performing the logical processing corresponding to the node request on the current node;
[0016] In response to requests with different request types, and where the second interface method corresponding to the request parameters is the standard interface method of the process engine for node requests, the process engine is invoked to execute the second interface method. The second interface method takes the request parameters as input and is a method for performing the logical processing corresponding to the node request on the current node.
[0017] Optionally, based on the request type, perform the generalized processing corresponding to the current node, and invoke the process engine to execute the processing logic of the current node based on the request parameters, including:
[0018] In response to requests with different request types and where the second interface method corresponding to the request parameters is not the standard interface method of the process engine for node requests, determine the conversion method corresponding to the request parameters.
[0019] Execute the conversion method to convert the second interface method into the standard interface method corresponding to the node request in the process engine;
[0020] The process engine is invoked to execute the transformed second interface method to perform the logic processing corresponding to the node request for the current node.
[0021] Optionally, a node request is used to execute the current node;
[0022] Based on the request parameters, the process engine is invoked to execute the processing logic of the current node, including:
[0023] Determine the configuration information corresponding to the request parameters;
[0024] Based on the configuration information, determine at least one function to be implemented and its execution order;
[0025] The process engine is invoked to execute at least one functionality sequentially according to the execution order.
[0026] Optionally, executing each node corresponding to the target service in the node model sequentially also includes:
[0027] Determine the current node from among the nodes corresponding to the target business;
[0028] In response to the current node being a non-executing node, the process engine corresponding to the node model is invoked to execute the processing logic of the current node.
[0029] Secondly, embodiments of the present invention provide a business processing apparatus, including:
[0030] The model determination module is used to determine the node model corresponding to the target business.
[0031] The business processing module is used to sequentially execute multiple nodes corresponding to the target business in the node model to complete the business processing of the target business.
[0032] The business processing module is specifically used for:
[0033] Determine the current node from among the multiple nodes corresponding to the target business;
[0034] In response to the current node being the execution node, the generalized processing corresponding to the current node is executed, thereby calling the process engine corresponding to the node model to execute the processing logic of the current node.
[0035] Thirdly, embodiments of the present invention provide an electronic device, including:
[0036] One or more processors;
[0037] A storage device for storing one or more programs that, when executed by one or more processors, cause the one or more processors to implement the methods of any of the above embodiments.
[0038] Fourthly, embodiments of the present invention provide a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the method of any of the above embodiments.
[0039] Fifthly, embodiments of the present invention provide a computer program product, including a computer program, wherein the computer program, when executed by a processor, implements the method of any of the above embodiments.
[0040] One embodiment of the above invention has the following advantages or beneficial effects: During the process of sequentially executing multiple nodes corresponding to the target business in the node model to complete the business processing of the target business, the current node is determined from the multiple nodes corresponding to the target business. If the current node is an execution node, the generalized processing corresponding to the current node is executed, thereby calling the process engine corresponding to the node model to execute the processing logic of the current node. If the current node is not an execution node, the process engine corresponding to the node model is directly called to execute the processing logic of the current node.
[0041] Execution nodes are those nodes that need to execute the logic code in the interface method and perform logical processing. The logic code in the interface method can be written manually based on business requirements. Execution nodes can include: service nodes, manual nodes, etc. Non-execution nodes are those nodes that do not need to execute the logic code in the interface method but perform logical processing. Non-execution nodes can include: intermediate event nodes, boundary event nodes, etc.
[0042] The generalized processing is used to obtain the standard interface method of the process engine for node requests. If the interface method corresponding to the node request is not a standard interface method, it is converted into a standard interface method. Using this standard interface method, the process engine is invoked to execute the processing logic of the current node, thereby completing the business processing of the target business. Using the solution of this embodiment, when switching between different process engines, it is not necessary to develop different business code for each process engine, which can reduce the development cost of switching process engines.
[0043] The further effects of the aforementioned unconventional alternative methods will be explained below in conjunction with specific implementation methods. Attached Figure Description
[0044] The accompanying drawings are provided to better understand the invention and are not intended to unduly limit the scope of the invention. Wherein:
[0045] Figure 1 This is a schematic diagram of a business processing method provided in one embodiment of the present invention;
[0046] Figure 2 This is a schematic diagram of a business processing method provided in another embodiment of the present invention;
[0047] Figure 3 This is a schematic diagram of a business processing method provided in another embodiment of the present invention;
[0048] Figure 4 This is a schematic diagram of the structure of a business processing device provided in one embodiment of the present invention;
[0049] Figure 5 This is a schematic diagram of the structure of a computer system suitable for implementing terminal devices or servers of the present invention. Detailed Implementation
[0050] The following description, in conjunction with the accompanying drawings, illustrates exemplary embodiments of the present invention, including various details to aid understanding. These details should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the invention. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0051] It should be noted that the acquisition, storage, use, and processing of data in the technical solutions of this invention comply with the relevant provisions of national laws and regulations.
[0052] Figure 1 This is a schematic diagram of a business processing method provided in one embodiment of the present invention. Figure 1 As shown, the method includes:
[0053] Step 101: Determine the node model corresponding to the target business.
[0054] The node model can be built using existing workflow frameworks based on business needs.
[0055] Step 102: Determine the current node from among the multiple nodes corresponding to the target business in the node model.
[0056] Step 103: In response to the current node being the execution node, execute the generalized processing corresponding to the current node, and call the process engine corresponding to the node model to execute the processing logic of the current node.
[0057] Nodes can be divided into execution nodes and non-execution nodes. Execution nodes are those that need to execute the logic code in the interface method and perform logical processing. The logic code in the interface method can be written manually based on business requirements. Execution nodes can include service nodes, manual nodes, etc. Execution nodes need to be generalized.
[0058] The generalized processing is used to obtain the standard interface methods of the process engine for node requests. Using these standard interface methods, the process engine is invoked to execute the processing logic of the current node, thereby completing the business processing of the target business.
[0059] Non-executable nodes are nodes that do not require the execution of logic code within interface methods for logical processing. Non-executable nodes can include intermediate event nodes, boundary event nodes, etc. For non-executable nodes, no generalized processing is needed; the corresponding process engine of the node model can be directly invoked to execute the non-executable node's processing logic.
[0060] Step 104: Determine if there is a next node for the current node.
[0061] If a next node exists for the current node, proceed to step 105. If no next node exists for the current node, then all nodes corresponding to the target service have been executed, and the process ends.
[0062] Step 105: Determine the next node as the current node.
[0063] Repeat step 103 until all nodes corresponding to the target business have been executed.
[0064] In the solution of this embodiment of the invention, during the process of sequentially executing multiple nodes corresponding to the target business in the node model to complete the business processing of the target business, the current node is determined from the multiple nodes corresponding to the target business. If the current node is an execution node, the generalized processing corresponding to the current node is executed to call the process engine corresponding to the node model to execute the processing logic of the current node. If the current node is not an execution node, the process engine corresponding to the node model is directly called to execute the processing logic of the current node. By adopting the solution of this embodiment of the invention, when switching between different process engines, it is not necessary to develop different business code for different process engines, which can reduce the development cost of switching process engines.
[0065] In one embodiment of the present invention, a node request is used to execute the current node; based on the request parameters, the process engine is invoked to execute the processing logic of the current node, including: determining the configuration information corresponding to the request parameters; determining at least one implemented function and its execution order according to the configuration information; and invoking the process engine to execute at least one implemented function sequentially according to the execution order. Through the configuration information, different functions and logical flows for different products and businesses can be flexibly configured to adapt to the needs of different application scenarios.
[0066] This invention provides a node model, where a node is a link in a business process. By modeling nodes based on these links, common elements can be abstracted. For example, node entry, execution, and departure can be abstracted as events, and listeners can be designed for these events. Furthermore, the scheduling method for a node is similar across different frameworks, so this scheduling method can also be abstracted and refined.
[0067] Internally, nodes are configured. The configuration information in the configuration table determines the different functions and logical flows of various products and services, or it can be implemented through extension points. Nodes can be triggered in different ways. For example, different trigger events can be configured for nodes. Nodes can also be configured with different completion methods. For example, the completion method of a node can be configured using a combination of manual nodes, service nodes, and boundary events.
[0068] Figure 2 This is a schematic diagram of a business processing method provided in another embodiment of the present invention. Figure 2 As shown, the method includes:
[0069] Step 201: Determine the node model corresponding to the target business.
[0070] Step 202: Determine the current node from among the multiple nodes corresponding to the target business in the node model.
[0071] Step 203: In response to the current node being the execution node, determine the node request and request parameters corresponding to the execution node.
[0072] Node requests are used to execute the logical processing corresponding to the current node. Node requests can be used to trigger the current node, execute the current node, listen to the current node, complete the current node, etc. Request parameters can be determined by the engine type of the workflow engine corresponding to the node model, or by the return value of the previous node.
[0073] Step 204: Determine the request type of the node request.
[0074] Request types can represent common requests and differential requests. The workflow engine before the switch was the first engine. The workflow engine after the switch is the second engine. Common requests are node requests that both the first and second engines can handle correctly. Specifically, upon receiving request parameters, both the first and second engines can successfully execute the corresponding logical processing for the node request based on those parameters.
[0075] A differential request is a node request that the first engine processes correctly, but the second engine cannot. Specifically, the first engine receives the request parameters and can successfully execute the corresponding logic processing for the node request based on those parameters. The second engine receives the request parameters but is unable to successfully execute the corresponding logic processing for the node request based on those parameters.
[0076] Differential requests can also be node requests that the first engine cannot process correctly, but the second engine can. Specifically, the first engine receives the request parameters but cannot successfully execute the logic processing corresponding to the node request based on those parameters. The second engine receives the request parameters and can successfully execute the logic processing corresponding to the node request based on those parameters.
[0077] Step 205: Based on the request type, execute the generalized processing corresponding to the current node, and call the process engine to execute the processing logic of the current node based on the request parameters.
[0078] In one embodiment of the present invention, a generalized processing corresponding to the current node is performed according to the request type, so as to call the process engine to execute the processing logic of the current node based on the request parameters, including: in response to the request type representing a common request, determining the interface method corresponding to the request parameters as a first interface method; calling the process engine to execute the first interface method; wherein, the first interface method takes the request parameters as input, and the first interface method is a method for performing the logic processing corresponding to the node request on the current node.
[0079] When the current node is the execution node, and the request type of the node represents a common request, the current node needs to execute the logic code in the first interface method for logical processing. The first interface method takes the request parameters as input and is the method for performing the logical processing corresponding to the node request on the current node. The logic code in the first interface method can be written manually based on business requirements.
[0080] Meanwhile, if the request type of a node request represents a common request, then the node request is one that both the first and second engines can handle correctly. After receiving the request parameters, the second engine, after switching, can call the first interface method according to the request parameters and successfully execute the logic processing corresponding to the node request.
[0081] If the input parameters of the first standard interface method corresponding to the first engine and the second standard interface method corresponding to the second engine are the same for a node request, then both the first engine and the second engine can complete the logical processing based on the same input parameters. Since the node request is a common request, the first standard interface method and the second standard interface method can be merged into the same interface method. The logic code corresponding to the node request is written into the merged interface method, and the merged interface method is determined as the first interface method corresponding to the node request.
[0082] For differential requests, the first standard interface method corresponding to the first engine and the second standard interface method corresponding to the second engine are combined to generate a differential interface set. In this differential interface set, the input parameters of the first standard interface method and the second standard interface method are different.
[0083] Upon receiving a node request, the second interface method is determined from the set of differencing interfaces based on the request parameters. If the second interface method is a standard interface method corresponding to the Streaming Engine, no method conversion is required. If the second interface method is not a standard interface method corresponding to the Streaming Engine, method conversion is required.
[0084] For example, a node request is used to execute the current node. The first standard interface method corresponding to the first engine is method 1 (type 1, type 2), and the second standard interface method corresponding to the second engine is method 2 (type 1). If the request parameter of the current node request is x, and the data type of x is type 1, then method 2 is determined to be the second interface method corresponding to the request parameter. If the process engine is the first engine, then method conversion of the second interface method is required. If the process engine is the second engine, then method conversion of the second interface method is not required.
[0085] In one embodiment of the present invention, based on the request type, a generalized processing corresponding to the current node is performed to invoke the process engine to execute the processing logic of the current node based on the request parameters. This includes: responding to a request type that represents a differential request, and the second interface method corresponding to the request parameters being a standard interface method of the process engine for node requests, invoking the process engine to execute the second interface method; wherein the second interface method takes the request parameters as input and is a method for performing logical processing corresponding to the node request on the current node.
[0086] When the current node is the execution node, and the request type of the node represents a differentiated request, the current node needs to execute the logic code in the standard interface method of the node request for logical processing. The standard interface method corresponds to a workflow engine. Different workflow engines correspond to different standard interface methods. The standard interface method is the method for performing the logical processing corresponding to the node request for the current node. The logic code in the standard interface method can be written manually based on business requirements.
[0087] When the request type of a node request represents a differential request, and the second interface method corresponding to the request parameters is the standard interface method of the process engine for node requests, then no method conversion is required. The process engine can successfully execute the logical processing corresponding to the node request by calling the second interface method according to the request parameters.
[0088] In one embodiment of the present invention, based on the request type, a generalized processing corresponding to the current node is performed to invoke the process engine to execute the processing logic of the current node based on the request parameters. This includes: in response to a request type indicating a differential request, and the second interface method corresponding to the request parameters not being a standard interface method of the process engine for node requests, determining a conversion method corresponding to the request parameters; executing the conversion method to convert the second interface method into a standard interface method of the process engine for node requests; and invoking the process engine to execute the converted second interface method to perform the logic processing corresponding to the node request on the current node.
[0089] When the current node is the execution node, and the request type of the node represents a differentiated request, the current node needs to execute the logic code in the standard interface method of the node request for logical processing. The standard interface method corresponds to a workflow engine. Different workflow engines correspond to different standard interface methods. The standard interface method is the method for performing the logical processing corresponding to the node request for the current node. The logic code in the standard interface method can be written manually based on business requirements.
[0090] If a node request's request type represents a differential request, and the second interface method corresponding to the request parameters is not the standard interface method of the process engine for node requests, then the second interface method is first converted into the standard interface method of the process engine for node requests. Then, the process engine calls the standard interface method based on the request parameters to successfully execute the logic processing corresponding to the node request. The logic code in the conversion method can be manually written based on business requirements, the code of the second interface method, and the code of the standard interface method.
[0091] Step 206: Determine if there is a next node for the current node.
[0092] If a next node exists for the current node, proceed to step 207. If no next node exists for the current node, then all nodes corresponding to the target service have been executed, and the process ends.
[0093] Step 207: Determine the next node as the current node.
[0094] Repeat step 203 until all nodes corresponding to the target business have been executed.
[0095] In the solution of this embodiment of the invention, the generalized processing corresponding to the current node is executed according to the request type of the node request. This enables the process engine to execute each node sequentially according to preset logic to complete the processing of the target business. There is no need to rewrite the backend logic code for the switched process engine, which reduces the difficulty of switching process engines and improves the efficiency of switching process engines.
[0096] The business processing method provided in the embodiments of the present invention is mainly based on the commonalities of the implementation of different framework node models, abstracting reusable parts to form a general solution, while leaving sufficient room for expansion. When switching process engines or adjusting business processes, no major code modifications are required, reducing architecture transformation costs and improving efficiency.
[0097] For example, the system needs to switch between EasyFlow and Activiti. The triggering method for nodes is abstracted: EasyFlow is triggered by sending global events, while Activiti is triggered by manual nodes or event nodes.
[0098] The execution method of a node is abstracted. For the code execution method within a node, a configuration interface can be implemented, and the function scheduling can be extended by the configuration information in the configuration interface.
[0099] The node listening method is abstracted. For listeners, easyflow defines a global listener, while activiti is a node-based listener implementation. Activiti also supports global listeners.
[0100] Based on the above analysis, this application provides a method for determining the request type of a node request. Assume the process engine before the switch is the first engine, and the process engine after the switch is the second engine. For the same node request, if the first input parameter of the interface method corresponding to the first engine matches the second input parameter of the interface method corresponding to the second engine, then the request type of the node request is determined to be a common request. Matching the first and second input parameters includes: the number of parameters, parameter types, and parameter meanings in the first and second input parameters are all the same. That is, the interface methods corresponding to the first and second engines can perform the same logical processing based on the same input parameters.
[0101] Similarly, if the first input parameter of the interface method corresponding to the first engine does not match the second input parameter of the interface method corresponding to the second engine, then the request type of the node request is determined to be a differential request.
[0102] Figure 3 This is a schematic diagram of a business processing method provided in another embodiment of the present invention. Figure 3 As shown, the method includes:
[0103] Step 301: Determine the node model corresponding to the target business.
[0104] Step 302: Determine the current node from among the multiple nodes corresponding to the target business in the node model.
[0105] Step 303: Determine the node type of the current node.
[0106] Nodes can be divided into execution nodes and non-execution nodes. Execution nodes are those that need to execute the logic code in the interface method and perform logical processing. The logic code in the interface method can be written manually based on business requirements. Execution nodes can include service nodes, manual nodes, etc. Execution nodes need to be generalized.
[0107] Non-executable nodes are nodes that do not require the execution of logic code within interface methods, but rather perform logical processing. Non-executable nodes can include: intermediate event nodes, boundary event nodes, etc.
[0108] Step 304: In response to the node type characterization that the current node is an execution node, execute the generalized processing corresponding to the current node, and call the process engine corresponding to the node model to execute the processing logic of the current node.
[0109] For each execution node, generalized processing needs to be performed. This generalized processing is used to obtain the standard interface methods from the process engine for node requests. Using these standard interface methods, the process engine is invoked to execute the processing logic of the current node, thereby completing the business processing for the target task.
[0110] Step 305: In response to the node type indicating that the current node is a non-execution node, call the process engine corresponding to the node model to execute the processing logic of the current node.
[0111] For non-execution nodes, there is no need to perform generalized processing. You can directly call the process engine corresponding to the node model to execute the processing logic of the non-execution node.
[0112] Step 306: Determine if there is a next node for the current node.
[0113] If a next node exists for the current node, proceed to step 307. If no next node exists for the current node, then all nodes corresponding to the target service have been executed, and the process ends.
[0114] Step 307: Determine the next node as the current node.
[0115] Repeat step 303 until all nodes corresponding to the target business have been executed.
[0116] In the solution of this embodiment of the invention, during business processing, if the current node is an execution node, the generalized processing corresponding to the current node is executed, thereby calling the process engine corresponding to the node model to execute the processing logic of the current node. If the current node is not an execution node, the process engine corresponding to the node model is called to execute the processing logic of the current node. The solution of this embodiment of the invention performs different processing on each node according to the node type, thereby efficiently completing the business processing of the target business.
[0117] Figure 4 This is a schematic diagram of the structure of a service processing device provided in one embodiment of the present invention. Figure 4 As shown, the device includes:
[0118] Model determination module 401 is used to determine the node model corresponding to the target business;
[0119] The business processing module 402 is used to sequentially execute multiple nodes corresponding to the target business in the node model to complete the business processing of the target business.
[0120] The business processing module 402 is specifically used for:
[0121] Determine the current node from among the multiple nodes corresponding to the target business;
[0122] In response to the current node being the execution node, the generalized processing corresponding to the current node is executed, thereby calling the process engine corresponding to the node model to execute the processing logic of the current node.
[0123] Optionally, the business processing module 402 is specifically used for:
[0124] Determine the node request and request parameters corresponding to the execution node;
[0125] Determine the request type for the node request;
[0126] Based on the request type, perform the generalized processing corresponding to the current node, and then invoke the process engine to execute the processing logic of the current node based on the request parameters.
[0127] Optionally, the business processing module 402 is specifically used for:
[0128] In response to the common request type, the interface method corresponding to the request parameters is determined as the first interface method; the process engine is called to execute the first interface method; wherein, the first interface method takes the request parameters as input and is a method for performing the logical processing corresponding to the node request on the current node;
[0129] In response to requests with different request types, and where the second interface method corresponding to the request parameters is the standard interface method of the process engine for node requests, the process engine is invoked to execute the second interface method. The second interface method takes the request parameters as input and is a method for performing the logical processing corresponding to the node request on the current node.
[0130] Optionally, the business processing module 402 is specifically used for:
[0131] In response to requests with different request types and where the second interface method corresponding to the request parameters is not the standard interface method of the process engine for node requests, determine the conversion method corresponding to the request parameters.
[0132] Execute the conversion method to convert the second interface method into the standard interface method corresponding to the node request in the process engine;
[0133] The process engine is invoked to execute the transformed second interface method to perform the logic processing corresponding to the node request for the current node.
[0134] Optionally, a node request is used to execute the current node;
[0135] The business processing module 402 is specifically used for:
[0136] Determine the configuration information corresponding to the request parameters;
[0137] Based on the configuration information, determine at least one function to be implemented and its execution order;
[0138] The process engine is invoked to execute at least one functionality sequentially according to the execution order.
[0139] Optionally, the business processing module 402 is also used for:
[0140] Determine the current node from among the nodes corresponding to the target business;
[0141] In response to the current node being a non-executing node, the process engine corresponding to the node model is invoked to execute the processing logic of the current node.
[0142] This invention provides an electronic device, comprising:
[0143] One or more processors;
[0144] A storage device for storing one or more programs that, when executed by one or more processors, cause the one or more processors to implement the methods of any of the above embodiments.
[0145] This invention provides a computer program product, including a computer program that, when executed by a processor, implements the method of any of the above embodiments.
[0146] The following is for reference. Figure 5 It shows a schematic diagram of the structure of a computer system 500 suitable for implementing a terminal device of the present invention. Figure 5 The terminal device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.
[0147] like Figure 5 As shown, the computer system 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 502 or programs loaded from storage section 508 into random access memory (RAM) 503. The RAM 503 also stores various programs and data required for the operation of the system 500. The CPU 501, ROM 502, and RAM 503 are interconnected via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0148] The following components are connected to I / O interface 505: an input section 506 including a keyboard, mouse, etc.; an output section 507 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to I / O interface 505 as needed. A removable medium 511, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 510 as needed so that computer programs read from it can be installed into storage section 508 as needed.
[0149] In particular, according to the embodiments disclosed in this invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 509, and / or installed from removable medium 511. When the computer program is executed by central processing unit (CPU) 501, it performs the functions defined above in the system of this invention.
[0150] It should be noted that the computer-readable medium shown in this invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0151] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0152] The modules described in the embodiments of the present invention can be implemented in software or hardware. The described modules can also be housed in a processor, for example, they can be described as: a model determination module and a business processing module. The names of these modules do not necessarily limit the module itself; for example, the model determination module can also be described as "a module for determining the node model corresponding to the target business".
[0153] In another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiments; or it may exist independently and not assembled into the device. The computer-readable medium carries one or more programs, which, when executed by the device, cause the device to include:
[0154] Determine the node model corresponding to the target business;
[0155] The target business is processed sequentially by executing multiple nodes corresponding to the target business in the node model.
[0156] Execute multiple nodes corresponding to the target business in the node model sequentially, including:
[0157] Determine the current node from among the multiple nodes corresponding to the target business;
[0158] In response to the current node being the execution node, the generalized processing corresponding to the current node is executed, thereby calling the process engine corresponding to the node model to execute the processing logic of the current node.
[0159] According to the technical solution of this embodiment of the invention, during the process of sequentially executing multiple nodes corresponding to the target business in the node model to complete the business processing of the target business, the current node is determined from the multiple nodes corresponding to the target business. If the current node is an execution node, the generalized processing corresponding to the current node is executed, thereby calling the process engine corresponding to the node model to execute the processing logic of the current node. If the current node is not an execution node, the process engine corresponding to the node model is directly called to execute the processing logic of the current node.
[0160] Execution nodes are those nodes that need to execute the logic code in the interface method and perform logical processing. The logic code in the interface method can be written manually based on business requirements. Execution nodes can include: service nodes, manual nodes, etc. Non-execution nodes are those nodes that do not need to execute the logic code in the interface method but perform logical processing. Non-execution nodes can include: intermediate event nodes, boundary event nodes, etc.
[0161] The generalized processing method is used to obtain the standard interface method of the process engine for node requests. Using this standard interface method, the process engine is invoked to execute the processing logic of the current node, thereby completing the business processing of the target business. By adopting the solution of this embodiment, when switching between different process engines, it is not necessary to develop different business code for each process engine, which can reduce the development cost of switching process engines.
[0162] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A business processing method, characterized in that, include: Determine the node model corresponding to the target business; The nodes corresponding to the target service in the node model are executed sequentially to complete the business processing of the target service; The sequential execution of multiple nodes corresponding to the target service in the node model includes: The current node is determined from among the multiple nodes corresponding to the target service; In response to the current node being an execution node, the generalized processing corresponding to the current node is executed, thereby invoking the process engine corresponding to the node model to execute the processing logic of the current node.
2. The method according to claim 1, characterized in that, The execution of the generalized processing corresponding to the current node, which calls the process engine corresponding to the node model to execute the processing logic of the current node, includes: Determine the node request and request parameters corresponding to the execution node; Determine the request type of the node request; Based on the request type, perform the generalized processing corresponding to the current node, and based on the request parameters, call the process engine to execute the processing logic of the current node.
3. The method according to claim 2, characterized in that, The step of performing generalized processing corresponding to the current node based on the request type, and invoking the process engine to execute the processing logic of the current node based on the request parameters, includes: In response to the common request type, the interface method corresponding to the request parameters is determined as the first interface method; the process engine is invoked to execute the first interface method; wherein, the first interface method takes the request parameters as input, and the first interface method is a method for performing the logical processing corresponding to the node request on the current node; In response to the request type representing a difference request, and the second interface method corresponding to the request parameter being the standard interface method of the process engine for the node request, the process engine is invoked to execute the second interface method; wherein, the second interface method takes the request parameter as input, and the second interface method is a method for performing the logical processing corresponding to the node request on the current node.
4. The method according to claim 2, characterized in that, The step of performing generalized processing corresponding to the current node based on the request type, and invoking the process engine to execute the processing logic of the current node based on the request parameters, includes: In response to the request type representing a difference request, and the second interface method corresponding to the request parameter is not the standard interface method of the process engine for the node request, the conversion method corresponding to the request parameter is determined; The conversion method is executed to convert the second interface method into the standard interface method corresponding to the node request in the process engine; The process engine is invoked to execute the transformed second interface method to perform the logical processing corresponding to the node request on the current node.
5. The method according to claim 2, characterized in that, The node request is used to execute the current node; Based on the request parameters, the process engine is invoked to execute the processing logic of the current node, including: Determine the configuration information corresponding to the request parameters; Based on the configuration information, at least one function and its execution order are determined; The process engine is invoked to execute at least one of the implemented functions sequentially according to the execution order.
6. The method according to claim 1, characterized in that, The step of sequentially executing each node corresponding to the target service in the node model further includes: Determine the current node from among the nodes corresponding to the target service; In response to the current node being a non-executing node, the process engine corresponding to the node model is invoked to execute the processing logic of the current node.
7. A business processing device, characterized in that, include: The model determination module is used to determine the node model corresponding to the target business. The business processing module is used to sequentially execute multiple nodes corresponding to the target business in the node model to complete the business processing of the target business. The business processing module is specifically used for: The current node is determined from among the multiple nodes corresponding to the target service; In response to the current node being an execution node, the generalized processing corresponding to the current node is executed, thereby invoking the process engine corresponding to the node model to execute the processing logic of the current node.
8. An electronic device, characterized in that, include: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-6.
9. A computer-readable medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-6.
10. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-6.