System and method for separating process engine from business event processing
By introducing a system that separates the process engine and business event processing in the business system, using microservice ideas to process process data in blocks, the problem of difficult process processing interruptions and repairs in the existing technology is solved, and the process engine and business event processing is realized The separation simplifies exception handling, reduces repair complexity and supports batch repair.
Patent Information
- Application Number
- CN202110220096.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-02-26
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2041-02-26
AI Technical Summary
In the prior art, due to the lack of strict distributed transaction control of the business system and BPM process engine, process processing interruption occurs when an abnormality occurs in automatic processing tasks, which is difficult to repair, and the modification plan is too complex, and batch repair cannot be achieved.
A system that uses a separate process engine and business event processing, uses the order service module, business process management service module, complete-event event listener and event processing scheduler to process data in blocks, and uses the idea of microservices to flow each process. The process is blocked and data is written in memory. The order service module is processed by the event processing scheduler. Each process completes one block feedback result until all block processing is completed, realizing the separation of the process engine and business event processing.
It realizes the separation of the process engine and business event processing, simplifies the exception handling process, reduces the cost of manual intervention, and can realize batch repair and automatic processing, reducing the complexity of repair.
Smart Images

Figure CN114971506B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information technology, and in particular to a system and method for separating a process engine from business event processing. Background Art
[0002] Due to the huge transaction volume and complicated business interaction process, the communication business system often needs to independently deploy a set of complex process rule engines to support the business processing process. The process rule engine is responsible for the process definition, scheduling, and external platform work order initiation of the management acceptance form. However, the scheduling interface, sending work orders and other actions are all implemented inside the business process management (BPM) process engine. When these complex actions are abnormal, it is easy to cause process processing interruption.
[0003] For the business system and BPM process engine, since the automatic processing tasks are completely embedded in the BPM process processing system and there is no strict distributed transaction control, once an exception occurs when processing a task, the process processing will be interrupted. It is very difficult to re-trigger the process interruption exception. In addition to repairing the business database data, the BPM processing data needs to be repaired at the same time, and the manual link of the interface needs to be reprocessed to continue the business flow. In addition, the business database and the BPM database data are different, and transaction control cannot be used to modify the business data. Once the abnormal data is rolled back, it will cause abnormal business data processing. When an exception occurs in the automatic processing, the repair plan is too complicated and heavily relies on code interpretation. It is impossible to extract effective common processing steps and cannot achieve batch repair. Summary of the invention
[0004] The present invention provides a system and method for separating process engine from business event processing, so as to solve the defects in the prior art that automatic processing tasks are completely embedded in the BPM process processing system, and there is no strict distributed transaction control, resulting in process processing being interrupted when an abnormality occurs in the processing task, difficulty in repair, and overly complicated modification plans.
[0005] The present invention provides a system for separating a process engine from business event processing, comprising:
[0006] Order service module, business process management service module, complete-event event listener and event processing scheduler, among which,
[0007] The order service module is used to call the business processing interface of the business process management service module and start the process instance when receiving the user's business processing request;
[0008] The event processing scheduler is used to divide each process of the process flow into blocks, write the data of each link of the process into the memory, and schedule the order service module to process each block to complete the event task;
[0009] The complete-event event listener is used to periodically scan event tasks and perform corresponding actions according to event processing results;
[0010] The order service module is also used to process each block, and after processing each block, feedback the processing result to the business process management service module;
[0011] The business process management service module is used to update the processing progress to the event processing scheduler and apply for the next block to be processed until all blocks are processed.
[0012] According to a system for separating a process engine from business event processing provided by the present invention, the event processing scheduler includes:
[0013] The event triggering unit is used to monitor events according to the process links, read the configuration of the process links when the event is triggered, obtain the configured event type, event parameters, and record the event to be processed table;
[0014] An event configuration unit is used to configure event declarations and corresponding processing methods into relevant tables;
[0015] The event scheduling unit is used to monitor whether there is data to be processed in the event pending table, scan the relevant processing data, and after scanning the data, schedule the corresponding implementation interface for event processing according to the event configuration;
[0016] The event realization unit is used to realize the functions originally in the business process management BPM system in the business system, and provide an external scheduling interface, in which the business system directly operates the business library data.
[0017] The present application also provides a method for separating a process engine from a business event processing, based on the system for separating a process engine from a business event processing as described in the first aspect, comprising:
[0018] When the order service module receives a business processing request from a user, it calls the business processing interface of the business process management service module to start the process instance;
[0019] The event processing scheduler divides each process of the process flow into blocks, writes the data of each link of the process into the memory, and schedules the order service module to process each block to complete the event task;
[0020] The complete-event event listener periodically scans event tasks and performs corresponding actions based on the event processing results;
[0021] The order service module processes each block, and after completing each block, it feeds back the processing result to the business process management service module. The business process management service module updates the processing progress to the event processing scheduler and applies for the next block to be processed until all blocks are processed.
[0022] According to a method for separating a process engine from business event processing provided by the present invention, when the order service module receives a business processing request from a user, it calls a business processing interface of a business process management service module to start a process instance, including:
[0023] The order service module calls the business processing interface of the business process management service module;
[0024] The business process management service module calls the deploy and active methods to change the state of the activated process definition to the ACTIVE state, and calls the createProcessInstance method to start the process instance.
[0025] According to a method for separating a process engine from business event processing provided by the present invention, the event processing scheduler divides each process of the process flow into blocks, writes data of each link of the process into a memory, and schedules the order service module to process each block to complete the event task, including:
[0026] The event processing scheduler divides each process of the process flow into blocks, and writes the node instance data, task instance data, branch instance data and process instance data of the process flow into the memory;
[0027] The order service module is scheduled to process each block in a counting manner to complete the event task.
[0028] According to a method for separating a process engine from business event processing provided by the present invention, the complete-event event listener periodically scans event tasks and executes corresponding actions according to event processing results, including:
[0029] The complete-event event listener periodically scans event tasks;
[0030] If the task is successfully processed, the event task is moved to the history queue; or,
[0031] If the task processing fails, the event task failure information is updated, and the business process engine failure or interruption is configured to be reprocessed according to the failure information until the retry limit is reached;
[0032] Among them, the business query for creating an event and the submission of the completed event are both written into the event task.
[0033] A method for separating a process engine from business event processing provided by the present invention further includes:
[0034] According to business needs, the business process management service module configures and processes events on nodes;
[0035] When the node status switches, the event processing scheduler writes multiple instance data into the database table to record pending events, and the task instance data in the database table triggers the business processing interface;
[0036] The complete-event event listener periodically scans the event processing results of the database, and when an exception occurs in the event, the suspendProcessInstance method is called; or when the instance data is updated, the process is resumed by calling the resumeProcessInstance method.
[0037] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the method for separating the process engine from the business event processing as described in any one of the above are implemented.
[0038] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the above-described methods for separating a process engine from business event processing.
[0039] The system and method for separating process engine from business event processing provided by the present invention call the business processing interface of the business process management service module through the order service module to start the process instance. The event processing scheduler divides each process of the process flow into blocks by using the idea of microservices, writes the data of each link of the process into the memory, and schedules the order service module to process each block. The complete-event event listener regularly scans the event task and executes corresponding actions according to the event processing result. After each block is processed, the order service module feeds back the processing result to the business process management service module. The business process management service module updates the processing progress to the event processing scheduler and applies for the next block to be processed until all blocks are processed. The separation of process engine and business event processing is realized, and the automatic processing of business process engine interruption can be realized according to the configuration of the independent event scheduler. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0041] Figure 1 It is the BPM state transition logic diagram;
[0042] Figure 2 A schematic diagram of the structure of a system for separating a process engine from business event processing provided by an embodiment of the present invention;
[0043] Figure 3 A schematic diagram of the structure of a BPM process processing system provided by an embodiment of the present invention;
[0044] Figure 4 A flowchart of a method for separating the process engine from business event processing provided in an embodiment of the present invention;
[0045] Figure 5 A schematic diagram of processing when a node fails according to an embodiment of the present invention;
[0046] Figure 6 A schematic diagram of the event task processing logic provided by an embodiment of the present invention;
[0047] Figure 7 A schematic diagram of the physical structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0048] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0049] It should be understood that the reference to "one embodiment" or "an embodiment" in the specification means that the specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present invention. Therefore, the "in one embodiment" or "in an embodiment" appearing in various places throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner.
[0050] The core of Business Process Management (BPM) is to complete the modeling of process definitions, and then create, start, suspend and other operations of process instances based on the established process definitions through the interfaces provided by BPM, so as to realize the handling of each business related to the process. When executing the process, BPM automatically executes or calls different external APIs to put the process in the corresponding state, and the state migration of the process forms the life cycle of the process instance.
[0051] Figure 1 This is the BPM state migration logic diagram. According to business needs, the process engine configures processing events on the node, and a node may be configured to trigger multiple events. The original functional event is triggered during the state node state switching process. The process engine directly calls the business interface for processing according to the event processing scheduler configuration. For the same transaction, this processing process is managed by the event processing scheduler, and it must ensure that all configured events are completed successfully, otherwise the original state before scheduling will be rolled back. Similar to direct operations on the business, there may be transaction timeouts, event exceptions, etc. Subsequent exception processing requires checking and processing all interfaces, manually restoring business data, and re-initiating scheduling requests to the event scheduler after processing is completed, which is not conducive to exception maintenance and problem location.
[0052] In order to solve the above problems, an embodiment of the present invention provides a system and method for separating a process engine from business event processing.
[0053] Figure 2 A schematic diagram of the structure of a system for separating a process engine from business event processing according to an embodiment of the present invention is shown in FIG. Figure 2 As shown, the system where the process engine and business event processing are separated includes: an order service module 210, a business process management service module 220, a complete-event event listener 230 and an event processing scheduler 240.
[0054] The order service module 210 is used to call the business processing interface of the business process management service module 220 and start the process instance when receiving the business processing request from the user;
[0055] Specifically, the order service module orderservice is used to call the business processing interface of the business process management service module BPMservice to start the process instance when receiving a business processing request from the user.
[0056] The event processing scheduler 240 is used to divide each process of the process flow into blocks, write the data of each link of the process into the memory, and schedule the order service module to process each block to complete the event task;
[0057] Specifically, the event processing scheduler divides each process of the process flow into blocks, writes the data of each link of the process into the memory, and schedules the order service module orderservice to process each block to complete the event task.
[0058] Among them, the data of each link of the process includes: node instance data of process flow, task instance data, branch instance data and process instance data.
[0059] The complete-event event listener 230 is used to periodically scan event tasks and perform corresponding actions according to event processing results;
[0060] Specifically, the complete-event event listener periodically scans the event task. If the task processing is successful, the event task is moved into the history. If the task processing fails, the event task failure information is updated.
[0061] The order service module orderservice is also used to process each block, and after processing a block, feedback the processing result to the business process management service module;
[0062] Specifically, the order service module 210 is also used to process each block, and after processing each block, feedback the processing result to the business process management service module BPMservice;
[0063] The business process management service module 220 is used to update the processing progress to the event processing scheduler and apply for the next block to be processed until all blocks are processed.
[0064] Specifically, the business process management service module BPMservice updates the processing progress to the event processing scheduler, and applies for the next block to be processed until all blocks are processed.
[0065] The system provided by the present invention separates the process engine from the business event processing. The order service module calls the business processing interface of the business process management service module to start the process instance. The event processing scheduler divides each process of the process flow into blocks by using the idea of microservices, writes the data of each link of the process into the memory, and schedules the order service module to process each block. The complete-event event listener regularly scans the event tasks and executes corresponding actions according to the event processing results. After each block is processed, the order service module feeds back the processing result to the business process management service module. The business process management service module updates the processing progress to the event processing scheduler and applies for the next block to be processed until all blocks are processed. The separation of the process engine and the business event processing is realized, and the automatic processing of the business process engine interruption can be realized according to the configuration of the independent event scheduler.
[0066] Optionally, the event processing scheduler includes:
[0067] The event triggering unit is used to monitor events according to the process links, read the configuration of the process links when the event is triggered, obtain the configured event type, event parameters, and record the event to be processed table;
[0068] An event configuration unit is used to configure event declarations and corresponding processing methods into relevant tables;
[0069] The event scheduling unit is used to monitor whether there is data to be processed in the event pending table, scan the relevant processing data, and after scanning the data, schedule the corresponding implementation interface for event processing according to the event configuration;
[0070] The event realization unit is used to realize the functions originally in the BPM system in the business system, and provide an external scheduling interface, wherein the business system directly operates the business library data.
[0071] Figure 3 The schematic diagram of the structure of the BPM process processing system provided by the embodiment of the present invention realizes the decoupling of the BPM process engine and the event processing scheduler. It should be noted that the BPM process engine includes: a business process management service module BPMservice. Figure 3 As shown, the embodiment of the present invention decomposes the event processing function of the BPM process processing system into four different event processing modules: event trigger unit, event configuration unit, event scheduling unit, and event implementation unit. The four event processing modules are independent of each other, and the original automatic processing task function is realized through the cooperation of several modules. The modules are notified of the scheduling process in a one-way manner. Once an abnormality occurs, it can be traced back. The processing means are simplified to database operations, avoiding scheduling interface processing, reducing the cost of manual intervention, and batch repair can also be realized.
[0072] Among them, the event triggering unit is used to monitor events according to the process links, read the configuration of the process links when the event is triggered, obtain the configured event type, event parameters, and record the event pending table. It can be understood that the event triggering is still controlled by the BPM system, and new monitoring configurations are added. The monitoring configurations of the old event processing are retained to solve the existing processes. The new monitoring process is still created according to the process links, and each monitoring is completed. When the relevant event is triggered, the configuration of the process link is read, the configured event type, event parameters, and the relevant pending table are obtained, and the current task is ended. When an exception occurs in this link, all event pending data will be rolled back, and the rollback will be to the state before the link change to avoid generating redundant event task information and affecting business processing.
[0073] The event configuration unit is used to configure the event declaration and the corresponding processing method into the relevant table. It can be understood that configuring the event declaration and the corresponding processing method into the relevant table facilitates the subsequent addition and modification of events.
[0074] Among them, the event scheduling unit is used to monitor whether there is data that needs to be processed in the event pending table, scan the relevant processing data, and after scanning the data, schedule the corresponding implementation interface for event processing according to the event configuration; it can be understood that only the event pending table is monitored to see whether there is data that needs to be processed, scan the relevant processing data, and after finding the data, schedule the corresponding implementation interface for event processing according to the event configuration. In event scheduling, different acceptance form events are processed concurrently, and the processing results will not interfere with each other. Event processing for the same acceptance form is serial processing, and the processing order depends on the order of event configuration. The lower the serial number, the higher the priority; when event processing is blocked, other events of the same acceptance form are blocked, including the processing of events by each product line under the form. Different product lines under the same acceptance form are processed in parallel, and the processing results do not interfere with each other.
[0075] Alternatively, the same product line under the same acceptance order is processed serially, and the processing order depends on the order of time configuration. When an event is blocked, it does not affect other product lines under the same order, but it will block the event processing of the main order. After an exception occurs in event processing, it will try to reprocess until the retry limit is reached. Retrying increases the processing interval, which is convenient for maintenance to have sufficient problem processing time after the problem is discovered, and reduce data modification after processing.
[0076] Among them, the event realization unit is used to realize the functions originally in the BPM system in the business system, and provide an external scheduling interface, wherein the business system directly operates the business library data. It can be understood that the functions originally in the BPM system are realized in the business system, and an external scheduling interface is provided to facilitate the scheduling and processing of event scheduling functions. The functions realized by the business system can directly operate the business library data, which is convenient for transaction management and control. The original event processing can be decomposed into multiple small events, and event decoupling can be achieved through combination, which reduces duplicate code and facilitates problem handling and repair.
[0077] Based on the above embodiments, the present invention also provides a method for separating a process engine from business event processing. Figure 4 A flow chart of the method for separating the process engine from the business event processing provided by an embodiment of the present invention is as follows: Figure 4 As shown, the method for separating the process engine from the business event processing includes the following steps:
[0078] Step 100: When the order service module receives the user's business processing request, it calls the business processing interface of the business process management service module to start the process instance;
[0079] Specifically, when the order service module orderservice receives a business processing request from a user, it calls the business processing interface of the business process management service BPMservice and starts the process instance, thus avoiding the event processing scheduler from directly calling the business processing interface and realizing the decoupling of the process engine.
[0080] Step 101, the event processing scheduler divides each process of the process flow into blocks, writes the data of each link of the process into the memory, and schedules the order service module to process each block to complete the event task;
[0081] Figure 5 A schematic diagram of processing when a node fails provided by an embodiment of the present invention.
[0082] The embodiment of the present invention provides a process flow model. The event processing scheduler uses the microservice concept to divide each process of the process flow into blocks, writes the data of each link of the process into the memory, and schedules the order service module orderservice to process each block to complete the event task.
[0083] Step 102, the complete-event event listener periodically scans event tasks and performs corresponding actions according to the event processing results;
[0084] The complete-event event listener periodically scans event tasks. If the task processing is successful, the event task is moved to the history. If the task processing fails, the event task failure information is updated.
[0085] Step 103, the order service module processes each block, and after completing each block, it feeds back the processing result to the business process management service module, and the business process management service module updates the processing progress to the event processing scheduler, and applies for the next block to be processed until all blocks are processed.
[0086] That is, after the order service module orderservice completes processing of each block, it feeds back the processing result to the business process management service module BPMservice. BPMservice updates the processing progress to the event processing scheduler and applies for the next block to be processed until all blocks are processed.
[0087] Figure 6 A schematic diagram of the event task processing logic provided by an embodiment of the present invention. The method for separating the process engine from the business event processing provided by the embodiment of the present invention calls the business processing interface of the business process management service BPMservice through orderservice, starts the process instance, divides each process of the process flow into blocks using the idea of microservices, writes the data of each link of the process into memory, and schedules orderservice to process each block. The complete-event event listener regularly scans the event task and executes corresponding actions according to the event processing result. After the orderservice completes each block, it feeds back the processing result to BPMservice. BPMservice updates the processing process to the event processing scheduler and applies for the next block to be processed until all blocks are processed. The separation of the process engine and the business event processing is realized, and the automatic processing of the business process engine interruption can be realized according to the configuration of the independent event scheduler.
[0088] Optionally, when the order service module receives a business processing request from a user, it calls a business processing interface of a business process management service module to start a process instance, including:
[0089] The order service module calls the business processing interface of the business process management service module;
[0090] The business process management service module calls the deploy and active methods to change the state of the activated process definition to the ACTIVE state, and calls the createProcessInstance method to start the process instance.
[0091] It can be understood that normal business processing is written into the business processing interface of the business process management service module BPMservice through the order service module orderservice, and then the business process management service module BPMservice calls the deploy and active methods, calls the configuration template to activate the state of the process definition to the ACTIVE state, and then calls the createProcessInstance method to start the process instance synchronously.
[0092] Optionally, the event processing scheduler divides each process of the process flow into blocks, writes the data of each link of the process into the memory, and schedules the order service module to process each block to complete the event task, including:
[0093] The event processing scheduler divides each process of the process flow into blocks, and writes the node instance data, task instance data, branch instance data and process instance data of the process flow into the memory;
[0094] The order service module is scheduled to process each block in a counting manner to complete the event task.
[0095] Optionally, the complete-event event listener periodically scans event tasks and performs corresponding actions according to the processing results, including:
[0096] The complete-event event listener periodically scans event tasks and performs corresponding actions based on the event processing results, including:
[0097] The complete-event event listener periodically scans event tasks;
[0098] If the task is successfully processed, the event task is moved to the history queue; or,
[0099] If the task processing fails, the event task failure information is updated, and the business process engine failure or interruption is configured to be reprocessed according to the failure information until the retry limit is reached;
[0100] Among them, the business query for creating an event and the submission of the completed event are both written into the event task.
[0101] Specifically, the complete-event event listener periodically scans task events. If the task is processed successfully, the event task is moved to the history. If the task is processed unsuccessfully, the event task failure information is updated. Here, based on the failure information, the event listener can be configured to automatically reprocess the business process engine failure or interruption until the retry limit is reached. Because the complete-event event listener and the business process management service module BPMservice are not directly called, the transformation here does not require modifying the original complex process definition of BPM, but only requires adding the listener configuration, which greatly reduces the risk of automatic correction and transformation.
[0102] Optionally, it also includes:
[0103] According to business needs, the business process management service module configures and processes events on nodes;
[0104] When the node status switches, the event processing scheduler writes multiple instance data into the database table to record pending events, and the task instance data in the database table triggers the business processing interface;
[0105] The complete-event event listener periodically scans the event processing results of the database, and when an exception occurs in the event, the suspendProcessInstance method is called; or when the instance data is updated, the process is resumed by calling the resumeProcessInstance method.
[0106] The embodiment of the present invention uses microservices as the design guiding ideology, first abstracts and decomposes the BPM event processing scheduler transaction logic into different processing modules, then redesigns the process flow model for the business, removes the event processing function embedded in the BPM process processing system, and realizes the decoupling of the process engine. After the BPM decoupling process is optimized, when the node state switches, the event processing scheduler does not directly call the business processing interface, but writes multiple instance data into the database table to record the pending events, and the task instance data in the table triggers the business processing interface. The BPM process engine regularly scans the event processing results of the database. When the instance data is processed successfully and the execution is completed normally, the state of the process changes from COMPLETING->COMPLETED; when an exception occurs in the event, the suspendProcessInstance method is called, and the process state changes from SUSPENDING->SUSPENDED; when the instance data is updated, the resumeProcessInstance method is called to resume the process, and the state of the process after recovery changes to ACTIVE.
[0107] Optionally, the BPM process engine includes: a business process management service module BPMservice and a complete-event event listener.
[0108] The method for separating the process engine from the business event processing provided by the present invention calls the business processing interface of the business process management service module through the order service module to start the process instance. The event processing scheduler divides each process of the process flow into blocks by using the idea of microservices, writes the data of each link of the process into the memory, and schedules the order service module to process each block. The complete-event event listener regularly scans the event task and executes corresponding actions according to the event processing result. After each block is processed, the order service module feeds back the processing result to the business process management service module. The business process management service module updates the processing process to the event processing scheduler and applies for the next block to be processed until all blocks are processed. The separation of the process engine and the business event processing is realized, and the automatic processing of the business process engine interruption can be realized according to the configuration of the independent event scheduler.
[0109] Figure 7 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 7 As shown, the electronic device may include: a processor 710, a communication interface 720, a memory 730 and a communication bus 740, wherein the processor 710, the communication interface 720 and the memory 730 communicate with each other through the communication bus 740. The processor 710 may call the logic instructions in the memory 730 to execute a method for separating the process engine from the business event processing, the method comprising: when the order service module receives the business processing request of the user, calling the business processing interface of the business process management service module to start the process instance; the event processing scheduler divides each process of the process flow into blocks, writes the data of each link of the process into the memory, and schedules the order service module to process each block to complete the event task; the complete-event event listener periodically scans the event task and executes the corresponding action according to the event processing result; the order service module processes each block, and after processing each block, feeds back the processing result to the business process management service module, the business process management service module updates the processing process to the event processing scheduler, and applies for the next block to be processed until all blocks are processed.
[0110] In addition, the logic instructions in the above-mentioned memory 730 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0111] On the other hand, the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the method of separating the process engine from the business event processing provided by the above methods, and the method includes: when the order service module receives a business processing request from a user, it calls the business processing interface of the business process management service module to start the process instance; the event processing scheduler divides each process of the process flow into blocks, writes the data of each link of the process into the memory, and schedules the order service module to process each block to complete the event task; the complete-event event listener periodically scans the event task and executes corresponding actions according to the event processing results; the order service module processes each block, and after completing the processing of each block, it feeds back the processing result to the business process management service module, and the business process management service module updates the processing progress to the event processing scheduler and applies for the next block to be processed until all blocks are processed.
[0112] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the above-mentioned method of separating the process engine from the business event processing, the method comprising: when the order service module receives a business processing request from a user, it calls the business processing interface of the business process management service module to start the process instance; the event processing scheduler divides each process of the process flow into blocks, writes the data of each link of the process into the memory, and schedules the order service module to process each block to complete the event task; the complete-event event listener periodically scans the event task and executes corresponding actions according to the event processing results; the order service module processes each block, and after completing the processing of each block, it feeds back the processing result to the business process management service module, the business process management service module updates the processing progress to the event processing scheduler, and applies for the next block to be processed until all blocks are processed.
[0113] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0114] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0115] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A system in which the process engine is separated from the business event processing, characterized in that: include: Order service module, business process management service module, complete-event event listener and event processing scheduler, among which, The order service module is used to call the business processing interface of the business process management service module and start the process instance when receiving the user's business processing request; The event processing scheduler is used to divide each process of the process flow into blocks, write the data of each link of the process into the memory, and schedule the order service module to process each block to complete the event task; wherein the data of each link includes: node instance data, task instance data, branch instance data and process instance data of the process flow; The complete-event event listener is used to periodically scan event tasks and perform corresponding actions according to event processing results; The order service module is also used to process each block, and after processing each block, feedback the processing result to the business process management service module; The business process management service module is used to update the processing progress to the event processing scheduler and apply for the next block to be processed until all blocks are processed; The salesperson process management service module is also used to configure and process events for nodes according to business needs; The event processing scheduler is also used to write multiple instance data into a database table to record pending events when the node state switches, and the task instance data in the database table triggers the business processing interface; The complete-event event listener is also used to periodically scan the event processing results of the database, and when an event exception occurs, call the suspendProcessInstance method; or when the instance data is updated, resume the process by calling the resumeProcessInstance method.
2. The system for separating process engine from business event processing according to claim 1, characterized in that: The event processing scheduler includes: The event triggering unit is used to monitor events according to the process links, read the configuration of the process links when the event is triggered, obtain the configured event type, event parameters, and record the event to be processed table; An event configuration unit is used to configure event declarations and corresponding processing methods into relevant tables; The event scheduling unit is used to monitor whether there is data to be processed in the event pending table, scan the relevant processing data, and after scanning the data, schedule the corresponding implementation interface for event processing according to the event configuration; The event realization unit is used to realize the functions originally in the business process management BPM system in the business system, and provide an external scheduling interface, in which the business system directly operates the business library data.
3. A method for separating process engine from business event processing, based on the system for separating process engine from business event processing according to claim 1 or 2, characterized in that: include: When the order service module receives a business processing request from a user, it calls the business processing interface of the business process management service module to start the process instance; The event processing scheduler divides each process of the process flow into blocks, writes the data of each link of the process into the memory, and schedules the order service module to process each block to complete the event task; The complete-event event listener periodically scans event tasks and performs corresponding actions based on the event processing results; The order service module processes each block, and after completing each block, it feeds back the processing result to the business process management service module. The business process management service module updates the processing progress to the event processing scheduler and applies for the next block to be processed until all blocks are processed.
4. The method for separating the process engine from the business event processing according to claim 3, characterized in that: When the order service module receives a business processing request from a user, it calls the business processing interface of the business process management service module to start a process instance, including: The order service module calls the business processing interface of the business process management service module; The business process management service module calls the deploy and active methods to change the state of the activated process definition to the ACTIVE state, and calls the createProcessInstance method to start the process instance.
5. The method for separating process engine from business event processing according to claim 3, characterized in that: The event processing scheduler divides each process of the process flow into blocks, writes the data of each link of the process into the memory, and schedules the order service module to process each block to complete the event task, including: The event processing scheduler divides each process of the process flow into blocks, and writes the node instance data, task instance data, branch instance data and process instance data of the process flow into the memory; The order service module is scheduled to process each block in a counting manner to complete the event task.
6. The method for separating process engine from business event processing according to claim 3, characterized in that: The complete-event event listener periodically scans event tasks and performs corresponding actions based on the event processing results, including: The complete-event event listener periodically scans event tasks; If the task is successfully processed, the event task is moved to the history queue; or, If the task processing fails, the event task failure information is updated, and the business process engine failure or interruption is configured to be reprocessed according to the failure information until the retry limit is reached; Among them, the business query for creating an event and the submission of the completed event are both written into the event task.
7. The method for separating process engine from business event processing according to claim 3, characterized in that: Also includes: According to business needs, the business process management service module configures and processes events on nodes; When the node status switches, the event processing scheduler writes multiple instance data into the database table to record pending events, and the task instance data in the database table triggers the business processing interface; The complete-event event listener periodically scans the event processing results of the database, and when an exception occurs in the event, the suspendProcessInstance method is called; or when the instance data is updated, the process is resumed by calling the resumeProcessInstance method.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the method for separating the process engine from the business event processing as described in any one of claims 3 to 7 are implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for separating the process engine from the business event processing as described in any one of claims 3 to 7 are implemented.
Citation Information
Patent Citations
Processing method of notification service of service flow management and service flow management engine
CN105809299A
Arrangement method and system of service flow management system based on microservices
CN107682206A
Business process rollback processing method, process engine and business system
CN109978290A
Service arrangement and business process processing method and device applied to SaaS
CN110310034A
Service process management method and system for micro-service architecture, medium and electronic equipment
CN111092933A
