A method and apparatus for processing a business process
Patent Information
- Application Number
- CN202510231527.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-28
- Publication Date
- 2026-08-28
AI Technical Summary
[0003]目前通常利用现有的业务流程引擎,基于其定义的设定建模语言来配置业务流程,然后结合业务流程引擎管理的设定数据库存储业务流程数据来实现业务的流转;现有的方法需要额外的业务流程引擎以及构建较大数量的设定数据库,存在额外消耗资源的问题;并且需要掌握引擎定义的建模语言才能配置业务流程信息,在提高了人力资源成本的同时,存在业务流程处理的灵活性较差、效率较低的问题
[0027] One embodiment of the above invention has the following advantages or beneficial effects: It can find a matching target business process template from a variety of preset business process templates for a business based on the business processing request; parse the current processing stage state in the business flow steps from the target business process template, execute the logic code segment corresponding to the current processing stage state, and determine the next processing stage state based on the execution result of the logic code segment; execute cyclically until the business flow is determined to be complete; construct the business processing result of the processing request based on the execution results of multiple logic code segments and send it; This embodiment of the invention improves the flexibility and scalability of the business process by using logic code segments with atomic properties configured through the business process template, combined with different processing stage states to control the flow direction of the business process, thereby reducing the development complexity of the business process and improving the efficiency of the business process.
Smart Images

Figure CN122653578A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of business process processing technology, and in particular to a method and apparatus for processing business processes. Background Technology
[0002] As internet application systems become increasingly feature-rich, the complexity of business processes for implementing different functions also increases, making business process management increasingly important.
[0003] Currently, existing business process engines are typically used to configure business processes based on their defined configuration modeling language. Then, the configuration database managed by the business process engine is used to store the business process data to realize the business flow. The existing method requires an additional business process engine and the construction of a large number of configuration databases, which results in additional resource consumption. Furthermore, it requires mastery of the modeling language defined by the engine to configure business process information, which increases human resource costs and results in poor flexibility and low efficiency in business process processing. Summary of the Invention
[0004] In view of this, embodiments of the present invention provide a method and apparatus for processing business processes, which can, according to a business processing request, search for a matching target business process template from a variety of preset business process templates; parse the current processing stage state in the business flow steps from the target business process template, execute the logical code segment corresponding to the current processing stage state, and determine the next processing stage state based on the execution result of the logical code segment; repeat the process until the business flow is determined to be complete; construct the business processing result of the processing request based on the execution results of multiple logical code segments and send it; embodiments of the present invention, through the logical code segments with atomic properties configured by the business process template, combined with different processing stage states, control the flow direction of the business process, thereby improving the flexibility and scalability of processing business processes, reducing the development complexity of processing business processes, and improving the efficiency of processing business processes.
[0005] To achieve the above objectives, according to one aspect of the present invention, a method for processing a business process is provided, characterized by comprising: receiving a processing request for a business; parsing a business identifier from the processing request; searching for a target business process template matching the business identifier from a plurality of preset business process templates; wherein the business process template is configured with a plurality of processing stage states indicating the business flow, and logical code information corresponding to each processing stage state; based on the target business process template, obtaining the current processing stage state in the business flow steps, executing the logical code segment indicated by the logical code information corresponding to the current processing stage state, and determining the next processing stage state matching the execution result of the logical code segment; using the next processing stage state as the current processing state, and cyclically executing until the business flow is determined to be completed; constructing a business processing result for the processing request based on the execution results of the plurality of logical code segments, and sending the business processing result.
[0006] Optionally, the method for processing the business process further includes: registering corresponding state hook functions for multiple processing stage states; wherein the state hook functions include state pre-hook functions; before obtaining the current processing stage state in the business flow steps, it further includes: responding to the current processing stage state having a corresponding state pre-hook function, calling the state pre-hook function, and obtaining the first output result of the state pre-hook function; executing the logical code segment indicated by the logical code information corresponding to the current processing stage state, including: based on the first output result of the state pre-hook function, executing the logical code segment indicated by the logical code information corresponding to the current processing stage state.
[0007] Optionally, the state hook function further includes a state post-hook function; after executing the logic code segment indicated by the logic code information corresponding to the current processing stage state, it further includes: responding to the current processing stage state having a corresponding state post-hook function, calling the state post-hook function and outputting a second output result, and determining the next processing stage state that matches the second output result based on the second output result.
[0008] Optionally, obtaining the current processing stage status in the business flow steps and executing the logical code segment indicated by the logical code information corresponding to the current processing stage status further includes: storing the current status information corresponding to the current processing stage status and the execution result of the logical code segment corresponding to the current processing stage status in the business context; and determining the next processing stage status that matches the execution result of the logical code segment, including: obtaining the execution result of the current processing stage status from the business context and determining the next processing stage status that matches the execution result.
[0009] Optionally, after obtaining the current processing stage status in the business workflow steps and executing the logic code segment indicated by the logic code information corresponding to the current processing stage status, the process further includes: if the current processing stage status is a paused state, storing the business identifier and the business context corresponding to the paused state in the business data source; in response to receiving a business wake-up request for the business identifier, obtaining the business context from the business data source and reloading the business context; locating the paused state from the business context and obtaining the intermediate logic code segment information executed when the pause occurred, determining whether to continue executing the unexecuted logic code segment based on the intermediate logic code segment information, or determining the next processing stage status that matches the execution result.
[0010] Optionally, the target business process template is configured with a global distributed transaction option; the method further includes: parsing the global distributed transaction option from the target business process template, and when it is determined that the distributed transaction option is enabled, using a transaction management component for executing distributed transactions to manage the transaction branches of the logical code segments corresponding to the states of multiple processing stages, so as to ensure data consistency among the multiple logical code segments when processing data.
[0011] Optionally, after receiving the business processing request, the process further includes: parsing the business request parameters from the processing request; and after searching for a target business process template that matches the business identifier from a variety of preset business process templates, the process further includes: constructing a business process processing instance based on the business request parameters and the target business process template; and using the business process processing instance to execute the steps of obtaining the current processing stage state in the business flow steps, executing the logic code segment corresponding to the current processing stage state, and determining the next processing stage state that matches the execution result of the logic code segment.
[0012] Optionally, the business process processing instance is registered with an asynchronous hook function; after determining that the business flow is complete, it further includes: using the asynchronous hook function to send a prompt message indicating that the business flow is complete.
[0013] To achieve the above objectives, according to a second aspect of the present invention, an apparatus for processing business processes is provided, characterized in that it includes: a template lookup module, a status determination module, and a result sending module; wherein,
[0014] The template lookup module is used to receive business processing requests, parse out the business identifier from the processing requests, and search for the target business process template that matches the business identifier from a variety of preset business process templates. The business process template is set with multiple processing stage states that indicate the business flow, as well as the logical code information corresponding to each processing stage state.
[0015] The status determination module is used to obtain the current processing stage status in the business flow steps based on the target business process template, execute the logic code segment indicated by the logic code information corresponding to the current processing stage status, and determine the next processing stage status that matches the execution result of the logic code segment; the next processing stage status is used as the current processing status, and the process is repeated until the business flow is determined to be complete.
[0016] The result sending module is used to construct the business processing result of the request based on the execution results of multiple logic code segments, and then send the business processing result.
[0017] Optionally, the apparatus for processing business processes is further configured to register corresponding state hook functions for multiple processing stage states; wherein, the state hook functions include state pre-hook functions; before obtaining the current processing stage state in the business flow steps, the apparatus further includes: responding to the current processing stage state having a corresponding state pre-hook function, calling the state pre-hook function, and obtaining the first output result of the state pre-hook function; executing the logic code segment indicated by the logic code information corresponding to the current processing stage state, including: based on the first output result of the state pre-hook function, executing the logic code segment indicated by the logic code information corresponding to the current processing stage state.
[0018] Optionally, the state hook function further includes a state post-hook function; the device for processing business processes, after executing the logic code segment indicated by the logic code information corresponding to the current processing stage state, further includes: responding to the current processing stage state having a corresponding state post-hook function, calling the state post-hook function and outputting a second output result, and determining the next processing stage state matching the second output result based on the second output result.
[0019] Optionally, the apparatus for processing business processes, used to obtain the current processing stage state in the business flow steps and execute the logical code segment indicated by the logical code information corresponding to the current processing stage state, further includes: storing the current state information corresponding to the current processing stage state and the execution result of the logical code segment corresponding to the current processing stage state into the business context; and determining the next processing stage state that matches the execution result of the logical code segment, including: obtaining the execution result of the current processing stage state from the business context and determining the next processing stage state that matches the execution result.
[0020] Optionally, the apparatus for processing business processes, after obtaining the current processing stage state in the business flow steps and executing the logic code segment indicated by the logic code information corresponding to the current processing stage state, further includes: if the current processing stage state is a paused state, storing the business identifier and the business context corresponding to the paused state to the business data source; in response to receiving a business wake-up request for the business identifier, obtaining the business context from the business data source and reloading the business context; locating the paused state from the business context and obtaining the intermediate logic code segment information executed when the pause occurred, determining whether to continue executing the unexecuted logic code segment based on the intermediate logic code segment information, or determining the next processing stage state matching the execution result.
[0021] Optionally, the target business process template is configured with a global distributed transaction option; the device for processing the business process is further configured to parse the global distributed transaction option from the target business process template, and when it is determined that the distributed transaction option is enabled, use the transaction management component for executing distributed transactions to manage the transaction branches of the logical code segments corresponding to the states of multiple processing stages, so as to ensure data consistency when multiple logical code segments process data.
[0022] Optionally, the apparatus for processing business processes, after receiving a business processing request, further includes: parsing business request parameters from the processing request; and after searching for a target business process template matching the business identifier from a variety of preset business process templates, further including: constructing a business process processing instance based on the business request parameters and the target business process template; and using the business process processing instance to execute the steps of obtaining the current processing stage state in the business flow steps, executing the logic code segment corresponding to the current processing stage state, and determining the next processing stage state matching the execution result of the logic code segment.
[0023] Optionally, the business process processing instance is registered with an asynchronous hook function; the apparatus for processing the business process, after determining that the business flow has been completed, further includes: using the asynchronous hook function to send a prompt message indicating that the business flow has been completed.
[0024] To achieve the above objectives, according to a third aspect of the present invention, an electronic device for processing business processes is provided, characterized in that it includes: one or more processors; and a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement any of the methods described above for processing business processes.
[0025] To achieve the above objectives, according to a fourth aspect of the present invention, a computer-readable medium is provided having a computer program stored thereon, characterized in that, when the program is executed by a processor, it implements any of the methods described above for processing business processes.
[0026] To achieve the above objectives, according to a fifth aspect of the present invention, a computer program product is provided, comprising a computer program, characterized in that, when executed by a processor, the computer program implements any of the methods described above for processing business processes.
[0027] One embodiment of the above invention has the following advantages or beneficial effects: It can find a matching target business process template from a variety of preset business process templates for a business based on the business processing request; parse the current processing stage state in the business flow steps from the target business process template, execute the logic code segment corresponding to the current processing stage state, and determine the next processing stage state based on the execution result of the logic code segment; execute cyclically until the business flow is determined to be complete; construct the business processing result of the processing request based on the execution results of multiple logic code segments and send it; This embodiment of the invention improves the flexibility and scalability of the business process by using logic code segments with atomic properties configured through the business process template, combined with different processing stage states to control the flow direction of the business process, thereby reducing the development complexity of the business process and improving the efficiency of the business process.
[0028] The further effects of the aforementioned unconventional alternative methods will be explained below in conjunction with specific implementation methods. Attached Figure Description
[0029] The accompanying drawings are provided to better understand the invention and are not intended to unduly limit the scope of the invention. Wherein:
[0030] Figure 1 This is a flowchart illustrating a method for processing business processes according to an embodiment of the present invention;
[0031] Figure 2 This is a flowchart illustrating a business process according to an embodiment of the present invention;
[0032] Figure 3 This is a schematic diagram of multiple processing stages in a business workflow provided by an embodiment of the present invention;
[0033] Figure 4 This is a schematic diagram of the structure of a device for processing business processes according to an embodiment of the present invention;
[0034] Figure 5 This is an exemplary system architecture diagram in which embodiments of the present invention can be applied;
[0035] Figure 6 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
[0036] 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.
[0037] It should be noted that the collection, use, storage, sharing and transfer of user personal information involved in the technical solution of the present invention all comply with the provisions of relevant laws and regulations, and require notification to users and obtaining their consent or authorization. When applicable, user personal information is subjected to de-identification and / or anonymization and / or encryption technical processing.
[0038] like Figure 1 As shown, this embodiment of the invention provides a method for processing business processes, which may include the following steps:
[0039] Step S101: Receive the processing request of the business, parse the business identifier of the business from the processing request; search for the target business process template that matches the business identifier from a variety of preset business process templates; wherein, the business process template is set with a variety of processing stage states that indicate the business flow, as well as the logical code information corresponding to each processing stage state.
[0040] Specifically, in the embodiments of the present invention, the business representative refers to the business flow process for a specific application scenario, such as: the business is the purchase business in application A, the transfer business in application B, the approval business in application C, the user information modification business in application D, etc.; the present invention does not limit the specific business scenario.
[0041] For user operations received via application pages, such as login / logout, setting / updating avatar, modifying personal information, QR code payment, transferring money to someone, applying for credit rating improvement, and changing payment password, each user operation corresponds to a business request sent by the user. After receiving the business request, the server needs to execute a series of logical code, such as verifying permissions, processing information or processes, calculating data, accessing the database, modifying data, and returning results. In the embodiments of this invention, the logical code of a series of processing flows is divided into logical code segments of sub-flows with atomic properties. The order of multiple logical code segments can be arranged, and the various logical code segments can be freely combined to complete the entire business flow. Furthermore, some common sub-flows, such as permission verification, logging, and payment password verification, can be reused, eliminating the need for repeated development, thus improving development efficiency and reducing development complexity. In addition, during the version iteration process after the application goes live, the code needs to be updated according to new requirements. Through the reusable, atomic logical code segment method provided by the embodiments of this invention, software maintainers can meet business changes by only modifying a single sub-flow or replacing or combining a single flow. To address the need for a single underlying software suite to support deployments in multiple regions—such as a region in China, Southeast Asia, and Europe—and the requirement for different risk control processes for the same transfer flow, only the risk control sub-process needs to be customized and replaced within the transfer flow itself to meet the business requirements of multiple regions. By reusing sub-process code, development efficiency is improved, development complexity is reduced, and application deployment speed is increased.
[0042] Furthermore, business requests trigger business processes. For example, in a purchase request, a user clicking the "Purchase" component triggers a purchase request. This request includes business parameters, such as a business identifier, user identifier, and item information. The business process also includes various processing stages (lifecycle states), such as initialization, execution, pause, completion, cancellation, and expiration. Initialization initiates the business process, while completion, cancellation, or expiration indicate its end.
[0043] In embodiments of the present invention, corresponding business process templates are built for different businesses. The format of the business process templates is, for example, XML. By using the common XML (Extensible Markup Language) format to build business process templates, the problem of needing to be proficient in setting the modeling language of existing business process engine tools is overcome, thereby improving the universality, flexibility and scalability of processing business processes.
[0044] The following example uses a sample fragment 1 of a business process template (XML format) to illustrate the following:
[0045] <template>
[0046] <templateid> templateIdo001< / templateid>
[0047] <tcc> false< / tcc>
[0048] <request-class> com.xxx.demo.DemoRequest< / request-class>
[0049] <context-class> com.xxx.demo.DemoContext< / context-class>
[0050] <state-list>
[0051] <state id="initialState"stage="Initial">
[0052] <logic-list><logic id="initialLogic" / >< / logic-list>
[0053] <next-list>
[0054] <next condition="Success"state="Processing"stateId="processingState" / ><next condition="Cancel"state="Cancelled"stateId="cancelledState" / >
[0055]
[0056] <state id="processingState"stage="Processing">
[0057] <logic-list>
[0058] <logic id="checkParamLogic" / >
[0059] <logic id="doSomethingLogic" / >
[0060]
[0061] <next-list>
[0062] <next condition="Pending"state="Pending"stateId="pendingState" / >
[0063] <next condition="Success"state="Completed"stateId="completedState" / ><next condition="Cancel"state="Cancelled"stateId="cancelledState" / >
[0064] …
[0065] In the above schematic fragment 1: " <templateid> templateIdo001< / templateid> " represents the template identifier (templateIdo001) of the business process template. It can be understood that there is a one-to-one correspondence between service identifiers and template identifiers, and each type of service is configured with a corresponding preset business process template; the "state" node (represented by <state> and< / state> ) indicates different processing phase states. For example, "<state id="initialState"…" indicates that the processing phase state is the initial state.
[0066] Further, the <logic-list> and< / logic-list> tag is used to represent the logic code information corresponding to various processing phase states. For the initial state, "<logic id="initialLogic" / >" indicates that the logic code information is "initialLogic", and this logic code information corresponds to a business logic code segment, for example, one or more functions or an execution function (execute method), so that the logic code segment indicated by the "initialLogic" logic code information can be correspondingly run for the processing phase state; the <state / > tag within the business process template contains <logic / > tags of logic code information. One state can include multiple pieces of logic code information (logic) to execute different business logic functions. Usually, when executing logic code segments, each executable function (execute method) corresponding to the logic code information logic is executed in the order of the logic code information. For the business process template provided by the embodiment of the present invention, a user only needs to implement the execute method of logic in each state to implement the corresponding business logic.
[0067] Further, the <next-list> and< / next-list> The label represents the next processing stage state after the current processing state. The next processing stage state is determined based on the different execution results of the logic code segment. For example, if the current processing state's result is success (represented by next condition="Success"), the next processing stage state is "Processing"; if the current processing state's result is cancellation (represented by next condition="Cancel"), the next processing stage state is "Cancelled". (Business Process Template) <state / > Within the label <next / > The label represents the next processing stage that needs to be executed after the current processing stage has finished.
[0068] It is understandable that the execution results of different logic code segments lead to different directions of business flow. As shown in the above schematic fragment 1, the business process template of this embodiment of the invention is based on XML language to configure and describe the complete business process; the basic elements of the business process template include: state, logic, next, etc.; among them, state is used to describe the different processing stages (lifecycle) states in the business flow process, logic is the abstraction of the smallest block unit that executes specific business logic in the business process template, and next is used to control the state of the next processing stage when the business logic code of a certain processing stage ends. That is, the business process template is set with multiple processing stage states that indicate the business flow, as well as the logic code information corresponding to each processing stage state.
[0069] Further, in embodiments of the present invention, the attribute value of the conditionValue attribute in the business context can be set according to the running result of the current processing stage state. Thus, when the current processing stage state finishes execution, the condition attribute of the next tag matching the conditionValue attribute value in the business context can be used to determine the next processing stage state to be executed. Similarly, the corresponding configuration is executed for the logical code information corresponding to the processing state represented by the processing state identifier (processingState) in example fragment 1, the next processing stage state, etc.; this will not be elaborated further here. That is, the current processing stage state in the business flow steps is obtained, and the logical code segment indicated by the logical code information corresponding to the current processing stage state is executed; further including: storing the current state information corresponding to the current processing stage state and the running result of the logical code segment corresponding to the current processing stage state in the business context; and determining the next processing stage state matching the running result of the logical code segment, including: obtaining the running result of the current processing stage state from the business context and determining the next processing stage state matching the running result. The business context identifier information (com.xxx.demo.DemoContext) can be set in the business process template through the "context-class" tag, for example, represented as:
[0070] <context-class> com.xxx.demo.DemoContext< / context-class>
[0071] Furthermore, for a specific service, various business processing stage states and corresponding configuration information required for the business flow are configured, forming a preset business process template for that service. Thus, upon receiving a business processing request for a specific service, the system searches among multiple preset business process templates for a target business process template that matches the business identifier of that service.
[0072] The business process extraction method provided in this invention can be applied to a business process engine. This invention, for different types of complex businesses, can abstract and decompose the business process of a complex business into atomic, step-by-step, and concise logic code segments with low granularity. Then, based on XML format, these logic code segments are arranged and combined according to the defined business process and set rules. Combined with different business stage processing states, the flow of different business steps is realized in a more standardized and flexible way. Furthermore, because the logic code segments are atomic and fine-grained, general-purpose logic code segments can be set at the framework level of the business process engine. Users of the business process engine only need to implement their own business logic code according to the business rules, improving development efficiency.
[0073] Furthermore, based on the business process engine framework provided in this embodiment of the invention, the logic code segments are reusable. Especially for partial business changes caused by different delivery scenarios of the same business, this embodiment of the invention can achieve this by modifying only some logic code segments of the business process template. For example, if the steps of transfer process 1 in application 1 are a-b1-cd, and the steps of transfer process 2 in application 1 are a-b2-cd, then the code for b1 and b2 can be directly adapted, and the logic executors a, c, and d that execute other logic code segments can be directly reused. For another example, for business scenario A, the business process template sets up four business logic executors corresponding to the four logic code segments a, b, c, and d in sequence to complete the corresponding scenario requirements. However, for business scenario B, only the three logic executors a, b, and d are needed. Therefore, it is only necessary to remove logic executor c from the business process template corresponding to business scenario B, improving the efficiency of building the business process template. Since there are no strong dependencies between the various logic code segments, they can be reused in different business scenarios, improving the flexibility and scalability of handling business processes.
[0074] Step S102: Based on the target business process template, obtain the current processing stage status in the business flow steps, execute the logic code segment indicated by the logic code information corresponding to the current processing stage status, and determine the next processing stage status that matches the execution result of the logic code segment; take the next processing stage status as the current processing status, and execute it in a loop until the business flow is determined to be completed.
[0075] Specifically, the method for obtaining the current processing stage status in the business flow steps based on the target business process template is as follows: Parse various keywords in the target business process template, such as parsing status keywords that indicate the processing stage status; based on the status type identifier associated with the status keyword, obtain the current processing stage status matching the status type identifier. For example, if the status keyword "state" is parsed, and the value of "state id" is further parsed as "processingState", then the current processing stage status is determined to be the "processing" state. Similarly, based on the target business process template, different processing stage statuses in the business flow steps are obtained.
[0076] like Figure 3 As shown, the following processing stages can exist in a business workflow:
[0077] Initialization state: A business process template typically has only one Initial state, which represents the start of the business flow;
[0078] Processing Status: There can be multiple processing statuses, representing intermediate execution states in the business process;
[0079] Pending status: There can be multiple pending statuses, which are used to indicate that the business process will be paused in one or more processing stages.
[0080] Completed status: This represents the state entered after the business process is completed and executed successfully;
[0081] Cancelled status: This represents the state entered after a business process is actively or passively cancelled (due to an exception, etc.).
[0082] like Figure 3 As shown, arrows represent the direction of business flow between processing stages.
[0083] The status of each of the above processing stages can be set in the business process template, which is accessed through... <state>Tags represent any processing stage status. Optionally, an expired status can also be included, which serves as a special final state of the business process. This can be identified through a scheduled task built into the business process engine for orders that have not reached their final state (completed, canceled, etc.) for an extended period. This improves the completeness and fine-grained control of the business process.
[0084] Further, the logical keywords indicating logical code segments are parsed from the business process template; based on the logical code identifiers associated with the logical keywords, the logical code segments corresponding to the logical code identifiers are determined. The state of the next processing stage matching the execution result of the logical code segment is determined, including: parsing the conditional keywords indicating the execution result from the business process template; and based on the execution result associated with the conditional keywords, determining the state of the second processing stage matching the execution result.
[0085] The following example uses a business process template for "processing status" as an illustration:
[0086] <state id="processingState"stage="Processing">
[0087] <logic-list>
[0088] <logic id="checkParamLogic" / >
[0089] <logic id="doSomethingLogic" / >
[0090]
[0091] next-list>
[0092] <next condition="Pending"state="Pending"stateId="pendingState" / >
[0093] <next condition="Success"state="Completed"stateId="completedState" / ><next condition="Cancel"state="Cancelled"stateId="cancelledState" / >
[0094] / state>
[0095] As shown in Example Segment 2, for the processing state (i.e. the current processing stage state), two logic code information "checkParamLogic" and "doSomethingLogic" are obtained. It can be understood that, depending on the complexity of the business function, multiple logic code information can be set to dynamically obtain and execute the logic code segment indicated by the logic code information. For example, the business code contained in the function or executable method corresponding to checkParamLogic can be executed.
[0096] Furthermore, the next processing stage state matching the execution result of the logic code segment is determined. As shown in Example Segment 2, "next condition" represents the execution result label. If the execution result is "Pending", the next processing stage state corresponds to "Pending" (paused); if the execution result is "Success", the next processing stage state corresponds to "Completed" (completed); if the execution result is "Cancel", the next processing stage state corresponds to "Cancelled" (cancelled). It is immediately apparent that the mapping relationship between the execution result and the next processing stage state can be set according to the business scenario.
[0097] Furthermore, the state of the next processing stage is taken as the current processing state, and the process is repeated until the business flow is determined to be complete; the sequential dependencies between different processing stage states are, for example, as follows: Figure 3 As shown.
[0098] Furthermore, in embodiments of the present invention, corresponding state hook functions are registered for various processing stage states. These state hook functions include pre-state hook functions and post-state hook functions, for example:
[0099] beforeInitialState: This is a state hook function for the initialization state, that is, it is executed before the initialization state is executed;
[0100] afterInitialState: This is a hook function for the initialization state, that is, it is executed after the initialization state is executed;
[0101] beforeProcessingState: This is a state hook function for the processing state, that is, it is executed before the processing state is executed;
[0102] afterProcessingState: This is a hook function for the processing state, which is executed after the processing state is executed.
[0103] Similarly, embodiments of the present invention also provide beforeCompletedState, afterCompletedState; beforeCancelledState, afterCancelledState state hook functions; and, for the paused state, beforePendingState: a state before hook function for the paused state, executed before the paused state; onSuspend: executed after the business logic of the paused order is executed; afterPendingState: a state after hook function for the paused state, executed after the paused state.
[0104] Furthermore, in addition to state hook functions, embodiments of the present invention also provide hook functions for wake-up, execution exceptions, asynchronous operations, etc. Developers can add custom code logic to the above-mentioned hook functions to implement custom business functions, further improving the flexibility, configurability, and scalability of business processing.
[0105] By providing hook functions for different processing stage states and different logic, users (such as developers) can customize business logic functions to be executed before or after the processing stage state according to the actual business scenario and then attach them, further improving the flexibility and scalability of the processing business process.
[0106] Furthermore, if a pre-state hook function is detected for a certain current processing stage state, the pre-state hook function needs to be called first. In the current processing stage state, based on the first output of the pre-state hook function, the logic code segment indicated by the logic code information corresponding to the current processing stage state needs to be executed. For example, the first output can be used as the input parameter data of the logic code segment. That is, registering corresponding state hook functions for multiple processing stage states; where the state hook function includes the pre-state hook function; before obtaining the current processing stage state in the business flow steps, the process includes: responding to the current processing stage state having a corresponding pre-state hook function, calling the pre-state hook function, and obtaining the first output of the pre-state hook function; executing the logic code segment indicated by the logic code information corresponding to the current processing stage state, including: based on the first output of the pre-state hook function, executing the logic code segment indicated by the logic code information corresponding to the current processing stage state.
[0107] If a state hook function is detected for a given current processing stage state, the logic code segment corresponding to that state is executed. Then, the state hook function is called to output a second output result. Based on this second output result, the next processing stage state matching the second output result is determined. In other words, in response to a corresponding state hook function for the current processing stage state, the state hook function is called and a second output result is output. Based on this second output result, the next processing stage state matching the second output result is determined.
[0108] Step S103: Construct the business processing result for the request based on the execution results of multiple logic code segments, and send the business processing result.
[0109] Specifically, the business processing result for processing the request is constructed based on the execution results of multiple logical code segments. For example, the execution result indicates "complete", or indicates "cancel" or "failure", or indicates "expired", etc. The corresponding feedback data (such as descriptive text containing execution result information) is constructed based on the execution result as the business processing result for the business request, and then the business processing result is sent to the client (or server) of the business requester, etc., to mark the end of each step of the entire business flow.
[0110] More preferably, the business process processing instance provided in this embodiment of the invention is registered with an asynchronous hook function; after determining that the business flow is complete, it further includes: using the asynchronous hook function to send a prompt message indicating that the business flow is complete. The asynchronous hook function has the characteristic that its success or failure is not related to the business processing result. For example, in a transfer business process, after a successful transfer, it is necessary to send an SMS notification to the transfer initiator A and the recipient B. Even if the SMS fails to be sent, it does not affect the transfer result. Therefore, an asynchronous hook function (finalAsync) can be used to implement the SMS notification function for transfer-type processes. This further improves the granularity of business process processing.
[0111] like Figure 2 As shown, this embodiment of the invention provides an overall process for processing a business process. Between the start and end points, the process may include the following steps:
[0112] Step S201: Upon receiving a business request, parse the business request parameters from the processing request and find the matching business process template.
[0113] Step S202: Construct a business process processing instance based on the business request parameters and the business process template.
[0114] Specifically, steps S201 to S202 are described as follows: after receiving the processing request of the business, the steps further include: parsing the business request parameters from the processing request; after searching for the target business process template that matches the business identifier from a variety of preset business process templates, the steps further include: constructing a business process processing instance based on the business request parameters and the target business process template; using the business process processing instance to execute the steps of obtaining the current processing stage state in the business flow steps, executing the logic code segment corresponding to the current processing stage state, and determining the next processing stage state that matches the execution result of the logic code segment.
[0115] The embodiments of the present invention can dynamically construct business process processing instances to handle business logic at different processing stages.
[0116] Step S203: Initialize the business context and register the status hook function.
[0117] Specifically, further, the business context is initialized using the business process processing instance, and state hook functions are registered so that the data of the business context can be used in subsequent processing steps, and the state hook functions can be called according to their types.
[0118] Step S204: Determine whether the global distributed transaction option is enabled. If enabled, proceed to step S205; if disabled, proceed to step S206.
[0119] Step S205: Start distributed transaction processing.
[0120] Specifically, as shown in the schematic fragment 1 of the business process template, it is configured with " <tcc> false< / tcc> ", which means the global distributed transaction option is off (false), and if it is enabled, it is set to true.
[0121] For business processes with numerous steps, distributed transaction handling issues may arise, especially in scenarios with strict data consistency requirements. This invention provides a pluggable distributed transaction solution based on the TCC (Try-Confirm-Cancel) framework. TCC is a distributed transaction mode. To enable distributed transactions, an additional TC (Transaction Coordinator) server can be set up as the transaction coordinator and set to "Enabled" in the business process template. After enabling the TCC distributed transaction switch, the business processing engine will automatically start a global distributed transaction as the TM (Transaction Manager) role (the transaction management component for executing distributed transactions) during business execution. Users can then manage their own branch transactions under the RM (Resource Manager) role according to the TCC specification in their logic code, thus achieving global distributed transaction management. That is, the target business process template has a global distributed transaction option; the global distributed transaction option is parsed from the target business process template, and when it is determined that the distributed transaction option is enabled, the transaction management component for executing distributed transactions is used to manage the transaction branches of the logical code segments corresponding to the states of multiple processing stages, so as to ensure data consistency when multiple logical code segments process data.
[0122] Taking a transfer from account A to account B as an example, the following steps are required: deduct the transfer amount from account A (resource 1) and record the transfer record (resource 2); then add the transfer amount to account B (resource 3) and record the receipt record (resource 4). That is, a single transfer involves the management of multiple resources. For a transfer to be processed, to ensure the transfer result, all four resources must either succeed or fail simultaneously to guarantee the account balance and account records are normal. Through the distributed transaction management framework provided in this embodiment of the invention, if any one of the four resources (resource 1 to resource 4) fails, the other three can be rolled back. This can be achieved through configuration in the business process template. <tcc> true< / tcc> The "true" option enables CC distributed transactions, which provides global distributed transaction processing while improving configuration flexibility and data consistency.
[0123] Furthermore, regardless of whether the global distributed transaction option is off or on, all subsequent steps are executed. When the global distributed transaction option is on, transaction branches of the logical code segments corresponding to multiple processing stage states can be managed, which improves data consistency in the business processing flow and enhances the reliability and efficiency of business processing.
[0124] Step S206: Obtain the current processing stage state and execute the logic code segment corresponding to the current processing stage state.
[0125] Step S207: Determine whether the logic code segment is a wake-up process. If yes, proceed to step S208; otherwise, proceed to step S209.
[0126] Step S208: Execute the wake-up hook function.
[0127] Step S209: Traverse and execute the state pre-hook functions of the (current) processing stage state.
[0128] Step S210: Obtain the output of the pre-state hook function. Execute subsequent step S212 based on the output.
[0129] Step S211: Determine the logic code segment to be executed in the paused state, and then execute step S212.
[0130] Step S212: Execute the (current) processing phase state logic code segment.
[0131] Step S213: Determine whether the pause attribute is set in the logic code segment. If yes, proceed to step S214; otherwise, proceed to step S215.
[0132] Step S214: Store the business context in the business data source.
[0133] Step S215: Determine if there is any unexecuted business logic code segment. If yes, proceed to step S212; otherwise, proceed to step S216.
[0134] Specifically, steps S207 to S215 describe the processing methods for pausing and waking up.
[0135] If a logic code segment is determined to be in the wake-up state, the corresponding wake-up hook function is executed to determine the logic code segment to be executed in the paused state. For example, if the logic code segment in the paused state is the Mth logic code segment out of N logic code segments, and the pause attribute is detected when executing the Mth logic code segment (e.g., suspend=true), then the next logic code segment in the Mth logic code segment to be executed can be located during the subsequent wake-up.
[0136] Furthermore, after the pause is confirmed, the business identifier and business context are stored in the business data source (i.e., a persistent storage database, etc.); the target business process template corresponding to the business identifier can also be stored in the business data source to save all intermediate data during the pause state, such as parameters, running results, processing stage status, and all other information related to the business flow.
[0137] Upon receiving a business wake-up request for a business identifier, the system can retrieve the business context from the business data source and reload it. It can then locate the paused state from the business context and obtain the corresponding execution logic code segment. Based on the execution logic code segment information, it determines whether to continue executing the unexecuted logic code segment. Alternatively, if there is no unexecuted logic code segment, it determines the next processing stage state matching the execution result based on the execution results of one or more logic code segments.
[0138] The process involves locating the pause state based on the business context and obtaining information about the intermediate logic code segment executed when the pause occurred. This intermediate logic code segment information includes the logic code segment identifier and its execution result. Based on the intermediate logic code segment identifier, it determines whether there is any unexecuted logic code in the "logic-list". If so, it continues to execute the unexecuted logic code segment; otherwise, it indicates that the next processing stage state can be determined based on the execution result of the intermediate logic code segment. Specifically, after obtaining the current processing stage state in the business workflow steps and executing the logic code segment indicated by the logic code information corresponding to the current processing stage state, the process further includes: if the current processing stage state is paused, storing the business identifier and the business context corresponding to the pause state in the business data source; locating the pause state from the business context; obtaining the intermediate logic code segment information executed when the pause occurred; and determining whether to continue executing the unexecuted logic code segment or determine the next processing stage state matching the execution result based on the intermediate logic code segment information.
[0139] Step S216: Execute the state hook function of the processing phase state.
[0140] Step S217: Determine the next processing stage state based on the output of the state hook function.
[0141] Step S218: Determine if there is a next processing stage state. If yes, repeat step S206; otherwise, execute step S219.
[0142] Step S219: Determine that the business process is complete and execute the asynchronous hook function.
[0143] The business processing phases (lifecycle) from start to finish can all include a paused and waiting-to-be-wake-up state.
[0144] Step S220: Execute the hook function in the paused state.
[0145] Upon receiving a wake-up request or instruction, execute steps S221 to S223.
[0146] Step S221: Reload the business context.
[0147] Step S222: Re-register the state hook function.
[0148] Step S223: Determine the current processing stage status from the business process template in the business context, and further execute step S204 based on the current processing stage status.
[0149] Steps S206 to S220 are executed repeatedly to complete the logical code segment corresponding to each processing stage state, thereby automatically completing the entire business flow process based on state dependencies, improving the efficiency and flexibility of the business processing workflow. Specifically, based on the target business process template, the current processing stage state in the business flow steps is obtained, the logical code segment indicated by the logical code information corresponding to the current processing stage state is executed, and the next processing stage state matching the execution result of the logical code segment is determined; the next processing stage state is used as the current processing state, and this process is repeated until the business flow is determined to be complete.
[0150] like Figure 4 As shown, this embodiment of the invention provides an apparatus 400 for processing business processes, including: a template lookup module 401, a status determination module 402, and a result sending module 403; wherein,
[0151] The template lookup module 401 is used to receive the processing request of the business, parse the business identifier of the business from the processing request, and look up the target business process template that matches the business identifier from a variety of preset business process templates. The business process template is set with a variety of processing stage states that indicate the business flow, as well as the logical code information corresponding to each processing stage state.
[0152] The status determination module 402 is used to obtain the current processing stage status in the business flow steps based on the target business process template, execute the logical code segment indicated by the logical code information corresponding to the current processing stage status, and determine the next processing stage status that matches the execution result of the logical code segment; take the next processing stage status as the current processing status, and execute it in a loop until the business flow is determined to be completed.
[0153] The result sending module 403 is used to construct the business processing result of the processing request based on the execution results of multiple logic code segments, and send the business processing result.
[0154] This invention also provides an electronic device for processing business processes, comprising: one or more processors; and a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method provided in any of the above embodiments.
[0155] This invention also provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the method provided in any of the above embodiments.
[0156] This invention also provides a computer program product, including a computer program that, when executed by a processor, implements any of the methods described above for processing business processes.
[0157] Figure 5 An exemplary system architecture 500 is shown, which can be applied to a method or apparatus for processing business processes according to embodiments of the present invention.
[0158] like Figure 5 As shown, system architecture 500 may include terminal devices 501, 502, and 503, a network 504, and a server 505. Network 504 serves as the medium for providing communication links between terminal devices 501, 502, and 503 and server 505. Network 504 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.
[0159] Users can use terminal devices 501, 502, and 503 to interact with server 505 via network 504 to receive or send messages, etc. Various client applications can be installed on terminal devices 501, 502, and 503, such as e-commerce client applications, web browser applications, search applications, instant messaging tools, and email clients.
[0160] Terminal devices 501, 502, and 503 can be various electronic devices with displays and supporting various client applications, including but not limited to smartphones, tablets, laptops, and desktop computers.
[0161] Server 505 can be a server that provides various services, such as a backend management server that supports client applications used by users through terminal devices 501, 502, and 503. The backend management server can process received business processing requests and feed back the results of the processing to the terminal devices.
[0162] It should be noted that the method for processing business processes provided in the embodiments of the present invention is generally executed by server 505, and correspondingly, the device for processing business processes is generally located in server 505.
[0163] It should be understood that Figure 5 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0164] The following is for reference. Figure 6 It shows a schematic diagram of the structure of a computer system 600 suitable for implementing a terminal device of the present invention. Figure 6 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.
[0165] like Figure 6 As shown, the computer system 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 602 or programs loaded from storage section 608 into random access memory (RAM) 603. The RAM 603 also stores various programs and data required for the operation of the system 600. The CPU 601, ROM 602, and RAM 603 are interconnected via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0166] The following components are connected to I / O interface 605: an input section 606 including a keyboard, mouse, etc.; an output section 607 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to I / O interface 605 as needed. A removable medium 611, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 610 as needed so that computer programs read from it can be installed into storage section 608 as needed.
[0167] 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 609, and / or installed from removable medium 611. When the computer program is executed by central processing unit (CPU) 601, it performs the functions defined above in the system of this invention.
[0168] 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.
[0169] 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.
[0170] The modules and / or units described in the embodiments of the present invention can be implemented in software or hardware. The described modules and / or units can also be housed in a processor; for example, a processor can be described as including a template lookup module, a status determination module, and a result sending module. The names of these modules do not necessarily limit the module itself; for example, the template lookup module can also be described as "a module that searches for a target business process template matching the business identifier from a variety of preset business process templates."
[0171] 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 without being assembled into the device. The computer-readable medium carries one or more programs, which, when executed by the device, cause the device to include: the ability to: search for a matching target business process template from a variety of preset business process templates for a business processing request; parse the current processing stage state in the business flow steps from the target business process template; execute the logic code segment corresponding to the current processing stage state; and determine the next processing stage state based on the execution result of the logic code segment; execute repeatedly until the business flow is determined to be complete; and construct and send the business processing result of the processing request based on the execution results of the multiple logic code segments. The embodiments of the present invention, through the configuration of logic code segments with atomic properties using business process templates, and combined with different processing stage states, regulate the flow direction of the business process, thereby improving the flexibility and scalability of the business process, reducing the development complexity of the business process, and improving the efficiency of the business process.
[0172] 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.< / state> < / template>
Claims
1. A method for processing business processes, characterized in that, include: Receive a service processing request and parse the service identifier of the service from the processing request; The system searches for a target business process template that matches the business identifier from a variety of preset business process templates. The business process template is set with multiple processing stage states that indicate the business flow, as well as the logical code information corresponding to each processing stage state. Based on the target business process template, obtain the current processing stage status in the business flow steps, execute the logic code segment indicated by the logic code information corresponding to the current processing stage status, and determine the next processing stage status that matches the execution result of the logic code segment; take the next processing stage status as the current processing status, and execute it cyclically until it is determined that the business flow is completed; The business processing result of the processing request is constructed based on the execution results of the multiple logic code segments, and the business processing result is sent.
2. The method according to claim 1, characterized in that, Further includes: Register corresponding state hook functions for various processing stage states; wherein, the state hook functions include state pre-state hook functions; Before obtaining the current processing stage status in the business flow steps, the process further includes: In response to the current processing stage state having a corresponding state pre-hook function, the state pre-hook function is called, and the first output result of the state pre-hook function is obtained; The logical code segment that executes the logical code information indicated by the current processing stage state includes: Based on the first output of the state pre-hook function, the logic code segment indicated by the logic code information corresponding to the current processing stage state is executed.
3. The method according to claim 2, characterized in that, The state hook function also includes a state post-hook function; After executing the logical code segment indicated by the logical code information corresponding to the current processing stage state, the process further includes: In response to the current processing stage state having a corresponding state hook function, the state hook function is called and a second output result is output. Based on the second output result, the next processing stage state that matches the second output result is determined.
4. The method according to claim 1, characterized in that, The step of obtaining the current processing stage status in the business flow steps and executing the logic code segment indicated by the logic code information corresponding to the current processing stage status further includes: Store the current state information corresponding to the current processing stage state and the execution result of the logic code segment corresponding to the current processing stage state into the business context; The process of determining the next processing stage state that matches the execution result of the logic code segment includes: Obtain the execution result of the current processing stage state from the business context, and determine the next processing stage state that matches the execution result.
5. The method according to claim 4, characterized in that, After obtaining the current processing stage status in the business flow steps and executing the logic code segment indicated by the logic code information corresponding to the current processing stage status, the process further includes: If the current processing stage is in a paused state, the service identifier and the service context corresponding to the paused state are stored in the service data source. In response to receiving a service wake-up request for the service identifier, the service context is obtained from the service data source and the service context is reloaded; The pause state is located from the business context, and the intermediate logic code segment information executed when the pause occurs is obtained. Based on the intermediate logic code segment information, it is determined whether to continue executing the unexecuted logic code segment, or to determine the next processing stage state that matches the running result.
6. The method according to claim 1, characterized in that, The target business process template is equipped with a global distributed transaction option; The method further includes: The global distributed transaction option is parsed from the target business process template. If the distributed transaction option is enabled, the transaction management component for executing distributed transactions is used to manage the transaction branches of the logical code segments corresponding to the states of multiple processing stages, so as to ensure data consistency when multiple logical code segments process data.
7. The method according to claim 1, characterized in that, After receiving the service processing request, the process further includes: Parse the business request parameters from the processing request; After searching for a target business process template that matches the business identifier from a variety of preset business process templates, the process further includes: Based on the business request parameters and the target business process template, construct a business process processing instance; The steps include: using the business process processing instance to obtain the current processing stage status in the business flow steps, executing the logic code segment corresponding to the current processing stage status, and determining the next processing stage status that matches the execution result of the logic code segment.
8. The method according to claim 7, characterized in that, The business process processing instance is registered with an asynchronous hook function; After the business flow is determined, the process further includes: The asynchronous hook function is used to send a notification message indicating that the business process has been completed.
9. An apparatus for processing business processes, characterized in that, include: The module includes a template search module, a status determination module, and a result sending module; among them, The template lookup module is used to receive a business processing request, parse the business identifier of the business from the processing request, and search for a target business process template that matches the business identifier from a variety of preset business process templates; wherein, the business process template is set with a variety of processing stage states that indicate the business flow, and logical code information corresponding to each processing stage state; The state determination module is used to obtain the current processing stage state in the business flow steps based on the target business process template, execute the logic code segment indicated by the logic code information corresponding to the current processing stage state, and determine the next processing stage state that matches the execution result of the logic code segment; and use the next processing stage state as the current processing state, and execute it cyclically until the business flow is determined to be completed. The result sending module is used to construct the business processing result of the processing request based on the execution results of the multiple logic code segments, and send the business processing result.
10. 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-8.
11. 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-8.
12. A computer program product, comprising a computer program, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-8.