Order method based on process engine

Through the order method based on the process engine, the order process is divided into independent nodes, and processed asynchronously and updated state, the problems of large code size and high maintenance costs in the existing technology are solved, and the system stability and business response time are improved.

CN119201208AInactive Publication Date: 2024-12-27SHANGHAI QIANJIANG NETWORK TECHNOLOGY CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411282725.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-13
Publication Date
2024-12-27
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the prior art, there are many types of project orders and different processing processes, resulting in large code size and high maintenance costs, and business changes require frequent adjustment of codes, resulting in long cycle times and lack of effective solutions.

Method used

The order method based on the process engine is adopted, and the process engine is designed to configure the main table, node table and order execution flow table. The process engine configuration is searched through order type, etc., and the order process is divided into independent nodes, and it is processed asynchronously and updated to ensure final consistency.

Benefits of technology

Reduces the amount of code, reduces maintenance costs, improves system stability, and realizes business changes through configuration, reducing business response time and second-level personnel investment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119201208A_ABST
    Figure CN119201208A_ABST
Patent Text Reader

Abstract

The invention discloses a process engine configuration method. The method comprises the following steps: S1, designing a process engine configuration main table, a process engine node table, an order execution flow table and a process engine calling API configuration table; s2, a process engine configuration main table which needs to be executed by an order is searched for through an order type (contractType), a tenant code (tenant code), a product code (PROAPPCODE), a channel (channel code) and a GOOLSCLASS; the execution process and state of the whole process of the order are recorded, the abnormal state is processed on site independently, and final consistency is ensured; the order calling interface can synchronously wait for a process engine to return a processing result and return the processing result to an operator; the code quantity of orders through the process engine is relatively small, maintenance personnel are reduced, the system stability is improved, business changes can be solved by implementing configuration, the investment of second-opening personnel is reduced, and the business response time is shortened.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of various types of orders, and in particular to an order method based on a process engine. Background Art

[0002] A project order may have multiple types, and the processing procedures for different types are different. The current implementation method is code. The more types there are, the larger the code volume becomes, making subsequent maintenance difficult and costly. Business changes require developers to adjust the code, and the entire cycle takes a long time.

[0003] Currently, no effective solution has been proposed for the problems in the related technologies. Summary of the invention

[0004] In view of the problems in the related technology, the present invention proposes a process engine-based order method to overcome the above-mentioned technical problems existing in the existing related technology.

[0005] To this end, the specific technical solution adopted by the present invention is as follows: A process engine configuration method comprises the following steps: Step S1. Design the process engine configuration master table, process engine node table, order execution flow table, and process engine call API configuration table; Step S2. Search the main table of process engine configuration that needs to be executed for the order through order type (contractType), tenant code (tenantCode), product code (PROAPP_CODE), channel (channelCode), and GOODS_CLASS; Step S3: Associate all process engine node tables through CFLOW_CODE of the process engine configuration main table.

[0006] Furthermore, the method further comprises the following steps: Step S4. In the process engine node table, search for a node whose CFLOW_NODE_PARENTCODE (parent code) is equal to CFLOW_CODE and whose CFLOW_NODE_START is AU, as the start node; Step S5. Find the list of subsequent nodes whose CFLOW_NODE_NEXTCODE matches CFLOW_NODE_PARENTCODE.

[0007] Furthermore, the method further comprises the following steps: Step S6. Judge the starting node list. If CFLOW_NODE_CONDITION does not meet the requirement, skip the current node and continue to loop to judge the next node. Step S7. If CFLOW_NODE_CONDITION meets the requirement, execute the following steps: a. Determine whether CFLOW_NODE_SCALLCON is configured. If so, enter the current order information and execute the determination; b. If the conditions are met, update the order information according to CFLOW_NODE_SCALLPARAM; c. Save the current node and order information to the order execution flow table, and put the execution flow into the asynchronous queue.

[0008] Furthermore, the method further comprises the following steps: Step S8. Take out the execution pipeline from the asynchronous queue and perform the following operations according to CFLOW_PSERVICE_CODE: a. If CFLOW_PSERVICE_CODE is mock, the direct call is successful; b. If CFLOW_PSERVICE_CODE is not a mock, obtain the corresponding API configuration information (call address, parameter rules).

[0009] Furthermore, the method further comprises the following steps: Step S9. Calculate the current call parameter information according to the current order information and parameter rules, execute the API call, and obtain the return result; Step S10. Determine whether the execution is successful based on the API configuration. If successful, the order execution status is changed to success; determine the exception based on the API configuration. If abnormal, the order execution status is changed to abnormal; otherwise, it is changed to failure.

[0010] Furthermore, the method further comprises the following steps: Step S11. Determine whether CFLOW_NODE_CALLCON is configured. If so, input the return result and execute the determination; Step S12: If the conditions are met, update the order information according to CFLOW_NODE_CALLPARAM.

[0011] Furthermore, the method further comprises the following steps: Step S13. Search the list of subsequent nodes according to the CFLOW_NODE_NEXTCODE of the current node; Step S14: loop through the subsequent node list, if CFLOW_NODE_START is not equal to CS or CE, then end directly; if CFLOW_NODE_START is equal to CS or CE, then repeat steps 5 to 10.

[0012] Furthermore, the method further comprises the following steps: Step S15. Define a timer, and poll regularly to obtain data with abnormal order execution status according to the time configuration; Step S16: Put the acquired abnormal order execution flow into the asynchronous queue and wait for the execution of steps 8 to 10.

[0013] Beneficial effects of the present invention This solution designs a process configuration engine, which divides the order process into an independent node (forward and reverse). Each node can handle an independent process and update the status. The entire order process execution process and status are recorded, and abnormal status is handled independently to ensure eventual consistency. The order call interface can synchronously wait for the process engine to return the processing result and return it to the operator. The code volume of the order through the process engine is relatively small, the maintenance personnel are reduced, the system stability is increased, and business changes can be solved by implementing configuration, reducing the investment of second-level personnel and reducing business response time. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings: Figure 1 A flowchart of a process engine order method according to the present invention; DETAILED DESCRIPTION

[0015] According to an embodiment of the present invention, a process engine-based order method is provided.

[0016] A process engine configuration method according to an embodiment of the present invention includes the following steps: Step S1. Design the process engine configuration master table, process engine node table, order execution flow table, and process engine call API configuration table; Step S2. Search the main table of process engine configuration that needs to be executed for the order through order type (contractType), tenant code (tenantCode), product code (PROAPP_CODE), channel (channelCode), and GOODS_CLASS; Step S3: Associate all process engine node tables through CFLOW_CODE of the process engine configuration main table.

[0017] Furthermore, the method further comprises the following steps: Step S4. In the process engine node table, search for a node whose CFLOW_NODE_PARENTCODE (parent code) is equal to CFLOW_CODE and whose CFLOW_NODE_START is AU, as the start node; Step S5. Find the list of subsequent nodes whose CFLOW_NODE_NEXTCODE matches CFLOW_NODE_PARENTCODE.

[0018] Furthermore, the method further comprises the following steps: Step S6. Judge the starting node list. If CFLOW_NODE_CONDITION does not meet the requirement, skip the current node and continue to loop to judge the next node. Step S7. If CFLOW_NODE_CONDITION meets the requirement, execute the following steps: a. Determine whether CFLOW_NODE_SCALLCON is configured. If so, enter the current order information and execute the determination; b. If the conditions are met, update the order information according to CFLOW_NODE_SCALLPARAM; c. Save the current node and order information to the order execution flow table, and put the execution flow into the asynchronous queue.

[0019] Furthermore, the method further comprises the following steps: Step S8. Take out the execution pipeline from the asynchronous queue and perform the following operations according to CFLOW_PSERVICE_CODE: a. If CFLOW_PSERVICE_CODE is mock, the direct call is successful; b. If CFLOW_PSERVICE_CODE is not a mock, obtain the corresponding API configuration information (call address, parameter rules).

[0020] Furthermore, the method further comprises the following steps: Step S9. Calculate the current call parameter information according to the current order information and parameter rules, execute the API call, and obtain the return result; Step S10. Determine whether the execution is successful based on the API configuration. If successful, the order execution status is changed to success; determine the exception based on the API configuration. If abnormal, the order execution status is changed to abnormal; otherwise, it is changed to failure.

[0021] Furthermore, the method further comprises the following steps: Step S11. Determine whether CFLOW_NODE_CALLCON is configured. If so, input the return result and execute the determination; Step S12: If the conditions are met, update the order information according to CFLOW_NODE_CALLPARAM.

[0022] Furthermore, the method further comprises the following steps: Step S13. Search the list of subsequent nodes according to the CFLOW_NODE_NEXTCODE of the current node; Step S14: loop through the subsequent node list, if CFLOW_NODE_START is not equal to CS or CE, then end directly; if CFLOW_NODE_START is equal to CS or CE, then repeat steps 5 to 10.

[0023] Furthermore, the method further comprises the following steps: Step S15. Define a timer, and poll regularly to obtain data with abnormal order execution status according to the time configuration; Step S16: Put the acquired abnormal order execution flow into the asynchronous queue and wait for the execution of steps 8 to 10.

[0024] 1. Design the process engine configuration table structure: process engine configuration main table, process engine node table, order execution flow, process engine call API configuration table 2. Find the process engine configuration master table that needs to be executed for the order through order type (contractType), tenant code (tenantCode), product code (PROAPP_CODE), channel (channelCode), GOODS_CLASS, and then associate all process engine node tables through the process engine configuration master table CFLOW_CODE 3. In the process engine node table, CFLOW_NODE_PARENTCODE (parent code) is equal to CFLOW_CODE, and CFLOW_NODE_START is AU, which is the start node; CFLOW_NODE_NEXTCODE is the subsequent node, which is used to match CFLOW_NODE_PARENTCODE; CFLOW_NODE_INDEX is the execution weight, the smaller the value, the greater the weight, and the maximum cannot be greater than 100. There are multiple subsequent nodes, and the execution weight is large; CFLOW_NODE_ASYN execution mode: synchronous and asynchronous, calling API for use; CFLOW_NODE_START start mode: AN business (similar to the next step of the order, examples are used in WeChat payment, order delivery, and receipt), AU automatic (mostly used for the first node), CS processing success (executed after the parent node is successfully executed), CE processing failure (executed after the parent node fails to execute), AB rollback (order rollback operation, examples are used in order cancellation and order refund, and executed after the return and refund are completed), AE failure return, AP Processing; CFLOW_PSERVICE_CODE calls the API configuration code; CFLOW_NODE_CONDITION executes the current node condition, and being empty means there is no condition; CFLOW_NODE_CALLCON refers to whether CFLOW_PSERVICE_CODE writes back the order information after execution, which contains the JAVASCRIPT code; CFLOW_NODE_CALLPARAM refers to the attribute configuration in the order written back after CFLOW_PSERVICE_CODE executes; CFLOW_NODE_SCALLCON refers to whether CFLOW_PSERVICE_CODE writes back the order information before execution, which contains the JAVASCRIPT code; CFLOW_NODE_SCALLPARAM refers to the attribute configuration in the order written back before CFLOW_PSERVICE_CODE executes; special processing method in the node, the node with mock is a special processing node, which only executes the node without executing the api. 4. Get the start node list according to CFLOW_NODE_PARENTCODE (parent code) equal to CFLOW_CODE and CFLOW_NODE_START is AU 5. After selecting the starting node list, first determine whether CFLOW_NODE_CONDITION meets the requirements. If not, loop to the next jump. If it meets the requirements, execute the following 6. Is CFLOW_NODE_SCALLCON configured? If yes, enter the current order information and execute to see if it is satisfied. If satisfied, execute the order information update first according to CFLOW_NODE_SCALLPARAM 7. Save the current node and order information to the order execution flow table, and put the execution flow into the asynchronous queue 8. The asynchronous queue is dequeued and the subsequent processing of the order execution pipeline is executed. CFLOW_PSERVICE_CODE is a mock, so there is no need to call the API. The call is successful directly. Other values ​​of CFLOW_PSERVICE_CODE obtain the corresponding API configuration information (call address, parameter rules) 9. According to the current order information and parameter rules, the current call parameter information is settled, and the API call is executed, and the return result is obtained. The execution is judged to be successful according to the API configuration. If it is successful, the order execution status is changed to success. If it is abnormal, the order execution status is changed to abnormal, and others are changed to failure. 10. Is CFLOW_NODE_CALLCON configured? If yes, enter the return result and execute to see if it is satisfied. If it is satisfied, execute the order information update according to CFLOW_NODE_CALLPARAM. 11. Match the subsequent node list according to the CFLOW_NODE_NEXTCODE of the current node 12 loop list, when CFLOW_NODE_START is not equal to CS or CE, end directly, loop the next one, when CFLOW_NODE_START is equal to CS or CE, repeat steps 5, 6, 7, 8, 9, 10 13. The definer polls regularly to obtain data with abnormal order execution status according to the time configuration, and puts it into the asynchronous queue, waiting for execution 8, 9, 10.

[0025] Design a process configuration engine to divide the order process into independent nodes (forward and reverse). Each node can handle an independent process and update the status. Record the entire order process execution process and status, and have an independent site to handle abnormal status to ensure eventual consistency. The order call interface can synchronously wait for the process engine to return the processing result and return it to the operator.

[0026] 1. The amount of code for orders placed through the process engine is relatively small, the number of maintenance personnel is reduced, and the system stability is increased; 2. Business changes can be solved by implementing configuration, reducing the input of second-level developers and shortening business response time.

[0027] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A process engine configuration method, characterized in that: The following steps are involved: Step S1. Design the process engine configuration master table, process engine node table, order execution flow table, and process engine call API configuration table; Step S2. Search the main table of process engine configuration that needs to be executed for the order through order type (contractType), tenant code (tenantCode), product code (PROAPP_CODE), channel (channelCode), and GOODS_CLASS; Step S3: Associate all process engine node tables through CFLOW_CODE of the process engine configuration main table.

2. The process engine-based order method according to claim 1, characterized in that: The method of claim 1 further comprises the following steps: Step S4. In the process engine node table, search for a node whose CFLOW_NODE_PARENTCODE (parent code) is equal to CFLOW_CODE and whose CFLOW_NODE_START is AU, as the start node; Step S5. Find the list of subsequent nodes whose CFLOW_NODE_NEXTCODE matches CFLOW_NODE_PARENTCODE.

3. The process engine-based order method according to claim 1, characterized in that: The method of claim 1 further comprises the following steps: Step S6. Judge the starting node list. If CFLOW_NODE_CONDITION does not meet the requirement, skip the current node and continue to loop to judge the next node. Step S7. If CFLOW_NODE_CONDITION meets the requirement, execute the following steps: a. Determine whether CFLOW_NODE_SCALLCON is configured. If so, enter the current order information and execute the determination; b. If the conditions are met, update the order information according to CFLOW_NODE_SCALLPARAM; c. Save the current node and order information to the order execution flow table, and put the execution flow into the asynchronous queue.

4. The process engine-based order method according to claim 1, characterized in that: The method of claim 1 further comprises the following steps: Step S8. Take out the execution pipeline from the asynchronous queue and perform the following operations according to CFLOW_PSERVICE_CODE: a. If CFLOW_PSERVICE_CODE is mock, the direct call is successful; b. If CFLOW_PSERVICE_CODE is not a mock, obtain the corresponding API configuration information (call address, parameter rules).

5. The process engine-based order method according to claim 1, characterized in that: The method of claim 1 further comprises the following steps: Step S9. Calculate the current call parameter information according to the current order information and parameter rules, execute the API call, and obtain the return result; Step S10. Determine whether the execution is successful based on the API configuration. If successful, the order execution status is changed to success; determine the exception based on the API configuration. If abnormal, the order execution status is changed to abnormal; otherwise, it is changed to failure.

6. The process engine-based order method according to claim 1, characterized in that: The method of claim 1 further comprises the following steps: Step S11. Determine whether CFLOW_NODE_CALLCON is configured. If so, input the return result and execute the determination; Step S12: If the conditions are met, update the order information according to CFLOW_NODE_CALLPARAM.

7. The process engine-based order method according to claim 1, characterized in that: The method of claim 1 further comprises the following steps: Step S13. Search the list of subsequent nodes according to the CFLOW_NODE_NEXTCODE of the current node; Step S14: loop through the subsequent node list, if CFLOW_NODE_START is not equal to CS or CE, then end directly; if CFLOW_NODE_START is equal to CS or CE, then repeat steps 5 to 10.

8. The process engine-based order method according to claim 1, characterized in that: The method of claim 1 further comprises the following steps: Step S15. Define a timer, and poll regularly to obtain data with abnormal order execution status according to the time configuration; Step S16: Put the acquired abnormal order execution flow into the asynchronous queue and wait for the execution of steps 8 to 10.

Citation Information

Patent Citations

  • Linear process engine implementation method, device, equipment and storage medium

    CN111178849A

  • Workflow engine management method, system and device and storage medium

    CN111898892A

  • Transaction order data optimization processing method based on e-commerce platform

    CN112700310A

  • Method and system for automatically generating business through process configuration

    CN115292010A

  • Interactive visual construction method of rule engine and computer readable medium

    CN116701434A