Event management method and device based on workflow
Through the workflow-based event management method, service communication between traditional systems is decoupled, and the orchestration and programming control of the event response process is realized, which solves the problems of high system coupling and complex business logic adjustment, and improves the system's decoupling and response speed.
Patent Information
- Application Number
- CN202411790344.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-06
- Publication Date
- 2025-03-14
AI Technical Summary
Traditional service communication between multiple systems adopts a service interface method, resulting in high system coupling. Changes in the producer service interface will affect the stability of the consumer system. Business logic adjustment requires frequent modification of interface-related code, which increases the workload of development and maintenance.
The workflow-based event management method is adopted, and the event definition module, event producer engine module, event operation hub module and event consumer engine module are used to orchestrate the event response process, decouple the business system, and realize the programmatic control of the event flow path and data processing method.
It realizes complete decoupling between business systems, reduces system maintenance complexity, improves system decoupling, scalability and response speed, and simplifies business logic adjustment and new demand response.
Smart Images

Figure CN119621378A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of event-driven architecture, and in particular relates to a workflow-based event management method and device. Background Art
[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.
[0003] Traditionally, service communication between multiple systems is usually carried out in the form of service interfaces. One system may have service interactions with multiple systems. For example, when system A receives an external call request, it first synchronously calls the service interface of system B to complete the synchronous business logic, and then sends a message notification to MQ. After system C receives the asynchronous consumption message, it reversely calls the interface of system A to query detailed information and complete the asynchronous business logic. Under this architecture communication, the system coupling is high, and the communication between systems is strongly dependent on the service interface. Changes in the producer service interface will cause the consumer system call to fail, affecting the stability of the consumer system. With the increasing integration between software, adjusting one or more interfaces of the producer system may even respond to the joint adjustment of dozens or hundreds of related consumer systems, greatly increasing the complexity of system maintenance for new requirements. On the other hand, the interactive business logic between systems is implemented through hard coding through interface development. Business adjustments are strongly dependent on interface-related code development. Business logic adjustments or the addition of new requirements will bring a large workload to developers and maintainers. Summary of the invention
[0004] In order to solve at least one technical problem existing in the above-mentioned background technology, the present invention provides a workflow-based event management method and device, which orchestrates the response process of events by using workflow, that is, through visual coding configuration, the business collaboration logic is placed in the event hub, and the flow path and data processing method of events are programmatically controlled, thereby completing the complete decoupling between business systems, and also simplifying the business logic of each module itself, making the entire process more transparent and controllable.
[0005] In order to achieve the above object, the present invention adopts the following technical solution:
[0006] A first aspect of the present invention provides a workflow-based event management device, comprising the following steps:
[0007] The event definition module is configured to: arrange events according to business needs, configure the event response process, and define the basic attributes and parameter information of events;
[0008] The event producer engine module is configured to: assemble event information according to basic attributes and parameter information of the event, construct corresponding events, and send the events to the event operation center module;
[0009] The event operation center module is configured to: receive events, perform event response processing according to the configured response process, start the event consumption process, and execute event consumption operations;
[0010] The event consumer engine module is configured to: receive event consumption operation data from the consumer business system, update the event status and feedback the event consumption results.
[0011] Furthermore, the device also includes an event storage module, and the event storage module is configured to store event data and a running log of the workflow.
[0012] Furthermore, in the event definition module, the basic attributes of the event include the event number, name, description template and related business subject information.
[0013] Furthermore, in the event definition module, the parameter information of the event includes components constituting the parameter format template and the agreed event.
[0014] Furthermore, in the event definition module, events are orchestrated and the event response process is configured, including: configuring the start node and end node of the event response process, as well as the script task waiting task, parallel gateway and parallel multi-instance components of the event response process.
[0015] Furthermore, the event producer engine module embeds the event producer business system, adopts the calling method of java api, and assembles the event information according to the event parameter information defined by the event definition module.
[0016] Furthermore, the event operation center module receives events sent by the event producer engine through the http service interface.
[0017] A second aspect of the present invention provides a workflow-based event management method, based on the workflow-based event management device described in the first aspect, comprising the following steps:
[0018] Arrange events according to business needs, configure event response processes, and define basic attributes and parameter information of events;
[0019] When the business status changes, the event information is assembled according to the basic attributes and parameter information of the event, the corresponding event is constructed, and the event is sent;
[0020] Receive events, process the events according to the configured response process, run the event process consumption task, and perform event consumption operations;
[0021] Receive event consumption operation data from the consumer business system, update event status and feedback event consumption results.
[0022] A third aspect of the present invention provides a computer-readable storage medium.
[0023] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps in the workflow-based event management method as described above.
[0024] A fourth aspect of the present invention provides a computer device.
[0025] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps in the workflow-based event management method as described above when executing the program.
[0026] Compared with the prior art, the present invention has the following beneficial effects:
[0027] The present invention orchestrates the event response process by using a workflow, introduces process-driven capabilities to define event consumption processes, introduces process-driven capabilities, and provides flexible collaboration configuration and intelligent push mechanisms. When the state of a business object changes, the event producer engine sends an event, the event operation center connects the collaboration between business objects in series, starts the event consumption process, and the event consumer engine receives and feeds back the event consumption results, so that each business system only focuses on its own business processing without having to pay attention to the collaboration logic with other related business systems, thereby achieving full decoupling of business processing logic between business systems and improving the decoupling, scalability and response speed of the system.
[0028] Advantages of additional aspects of the present invention will be given in part in the following description, and in part will become obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0030] Figure 1 It is a flow chart of an event management method based on workflow provided by an embodiment of the present invention;
[0031] Figure 2It is a schematic diagram of the structure of a workflow-based event management device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0032] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0033] It should be noted that the following detailed descriptions are all illustrative and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0034] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0035] As mentioned in the background technology of this application, traditional service communications between multiple systems are usually carried out in the form of service interfaces, and one system may have service interactions with multiple systems. Under this kind of architecture communication, the system coupling is high, and the communication between systems is strongly dependent on the service interface. Changes in the producer service interface will cause the consumer system call to fail, affecting the stability of the consumer system. As the integration between software becomes higher and higher, adjusting one or more interfaces of the producer system may even respond to the joint adjustment of dozens or hundreds of related consumer systems, and the system maintenance complexity for new requirements will increase significantly. On the other hand, the interactive business logic between systems is implemented through hard coding of interface development, and business adjustments are strongly dependent on the development of interface-related code. Business logic adjustments or the addition of new requirements will bring a large workload to developers and maintainers.
[0036] The present invention orchestrates the event response process by using a workflow, introduces process-driven capabilities to define event consumption processes, introduces process-driven capabilities, and provides flexible collaboration configuration and intelligent push mechanisms. When the state of a business object changes, the event producer engine sends an event, the event operation center connects the collaboration between business objects in series, starts the event consumption process, and the event consumer engine receives and feeds back the event consumption results, so that each business system only focuses on its own business processing without having to pay attention to the collaboration logic with other related business systems, thereby achieving full decoupling of business processing logic between business systems and improving the decoupling, scalability and response speed of the system.
[0037] The present invention has the following advantages:
[0038] 1. Reduced complexity: Reduce code modification, no need to frequently modify the core code of the business system, and reduce the complexity of system maintenance and upgrades;
[0039] 2. Improved response efficiency: By using workflow to orchestrate the event response process, the system's ability to adapt to business changes is significantly enhanced, and the response speed to new demands is faster, which can better support the sustainable development of the business;
[0040] 3. Simple business reengineering: Through programmed event processing processes, the system processing logic can be flexibly adjusted according to different business scenarios, further improving the efficiency of business process reengineering.
[0041] Embodiment 1
[0042] This embodiment provides a workflow-based event management device, including:
[0043] The event definition module is configured to: define and uniformly manage events according to business needs, define basic information and parameter information of events, and use processes to orchestrate special processing of events, configure event response processes, and complete event definition management;
[0044] Special event processing includes event transmission control, event flexible reconstruction and other processing.
[0045] Specifically, event transmission control: events that meet specific conditions are transmitted to specific subscribers;
[0046] Specifically, flexible event reconstruction: event information is edited and controlled through event script tasks. For example, if there is a date of birth in the event, the age can be calculated through the script and added to the event information; for example, the same event has different additional information when it is passed to different subscription objects, which can be edited and defined in the script.
[0047] In this embodiment, the basic attributes of an event include the event number, name, description template, and related business subject information.
[0048] The parameter information of an event includes the components that make up the parameter format template and the agreed event.
[0049] The event is orchestrated and the response process of the event is configured, including: configuring the start node and the end node of the event response process, as well as the script task, the waiting task, the parallel gateway and the parallel multi-instance component of the event response process.
[0050] The event producer engine module is configured to: assemble event information according to the basic event information and parameter information defined by the event definition module, complete event construction, and then trigger the production event;
[0051] The event producer engine module embeds the event producer business system, adopts the Java API calling method, and assembles the event information according to the event parameter information defined by the event definition module.
[0052] The event operation center module is configured to: connect the event producer engine module and the event consumer engine module in series to interact, receive events sent by the event producer engine, and respond to and process events according to the event consumption process configured by the event definition module;
[0053] The event operation center module receives events sent by the event producer engine through the http service interface.
[0054] The event consumer engine module is configured to: receive events and feedback event consumption results;
[0055] The event consumer engine module supports embedding event consumer business systems, receiving events pushed by the event operation center module, and sending events to the consumer business system; after processing the event, it updates the event status and feedbacks the event consumption results, completing the reception of events and feedback of event consumption results.
[0056] Event storage module: used to store event data and workflow operation logs. The stored data includes event definition information, assembled event data, and workflow operation log data from event generation, processing, forwarding, and reception. Such as event information data defined by the event definition module; event information created and assembled by the event producer engine module based on event definition information, information before and after event assembly, event sending time, sending status, etc.; workflow operation log of the event operation center module; event reception time, event status, event consumption results, feedback time, etc. of the event consumer engine module.
[0057] The event storage module stores event data and workflow operation logs, and reads and writes events based on the storage center interface of MongoDB and HDFS.
[0058] The following takes the specific inspection application form issuance and push service as an example to explain the specific management method:
[0059] Requirement description: Assume that the examination application form issued by the doctor's workstation needs to be screened according to different item categories and sent to the required business system. For example, if there is an ultrasound examination item in the examination application form, it will be sent to the ultrasound management system, and the electrocardiogram examination will be sent to the electrocardiogram management system.
[0060] Step 1: Define the inspection request form issuance event:
[0061] Specifically, define the basic information of the event, that is, set the basic information such as event number, name, description, etc.; set the module to which it belongs, that is, the outpatient doctor station; set the business subjects involved, such as patients, doctors, etc.;
[0062] Specifically, define event parameter information, including single-value parameters, inspection item charging items, inspection item details, etc.;
[0063] Specifically, event consumption configuration adds event consumers, such as ultrasound management system, ECG management system, radiology imaging system, LI S inspection system, etc.
[0064] Specifically, in response to the process configuration, distinguish the items in the issued inspection application form, configure the start conditions and script tasks, and add the project execution department as the event filtering condition in the script task. For example, in the first task, add a filtering condition for the project where the execution department is the ultrasound examination department, and send the events that meet the conditions to the ultrasound management system; in the second task, add a filtering condition for the project where the execution department is the electrocardiogram room, and send the events that meet the conditions to the electrocardiogram management system; and so on, add the radiological imaging system, LIS inspection system, etc.
[0065] Step 2: When the doctor prescribes a cardiac ultrasound examination for the patient and submits an examination application form at the doctor's workstation, the event producer engine module creates and assembles the examination application form issuance event information according to the defined event information, and triggers the production of the examination application form issuance event and sends it to the event operation center module.
[0066] Step 3: The event operation center module performs event response processing according to the response process configured by the event definition module, determines that the department performing the cardiac ultrasound examination is the ultrasound examination department, executes the event consumption operation and sends it to the event consumer engine module.
[0067] Step 4: The event consumer engine module receives the examination application form issuance event, sends the cardiac ultrasound examination application form to the ultrasound management system, updates the event status and feeds back the event consumption result.
[0068] Step 5: Store the above event definition information, assembled event data, and workflow operation log data from event generation, processing, forwarding, and reception to the event storage module.
[0069] Embodiment 2
[0070] This embodiment provides a workflow-based event management method, comprising the following steps:
[0071] Step 1: Arrange events according to business needs, configure event response processes, and define basic attributes and parameter information of events;
[0072] Define and uniformly manage events, define basic information and parameter information of events, and use processes to arrange special processing of events, configure event response processes, and complete event definition management;
[0073] In this embodiment, the event definition module defines the basic attributes and parameter information of the event, arranges the special processing of the event in a process manner, configures the event response process, and completes the event definition and unified management.
[0074] Special event processing includes event transmission control, event flexible reconstruction and other processing.
[0075] Specifically, event transmission control: events that meet specific conditions are transmitted to specific subscribers;
[0076] Specifically, flexible event reconstruction: event information is edited and controlled through event script tasks. For example, if there is a date of birth in the event, the age can be calculated through the script and added to the event information; for example, the same event has different additional information when it is passed to different subscription objects, which can be edited and defined in the script.
[0077] The basic attributes of the event include the event number, name, description template, and related business subject information;
[0078] Parameter information of the event, including the parameter format template and components of the agreed event;
[0079] The method of using the process is used to arrange the special processing of events. In the configuration of the event response process, the configuration of the response process supports online programming and hot publishing capabilities, configures the start node and end node of the event response process, allows the event response process to have multiple parallel branches, and supports component types such as start, end, script task, waiting task, parallel gateway, parallel multiple instances, etc.
[0080] Specifically, the script task is used to run the script for event logic processing and automatically execute once;
[0081] Specifically, waiting tasks are used to wait for event consumption results to determine the flow of the process;
[0082] Specifically, parallel gateway: parallel branches will generate multiple parallel execution lines at the same time;
[0083] Specifically, parallel multi-instances: parallel multi-instances will generate multiple parallel execution lines at the same time, and the number of parallel executions can be dynamically set by the script. Only when all parallel branches are completed, the process will run to the next stage of the parallel multi-instance.
[0084] Step 2: When the business status changes, assemble the event information according to the basic attributes and parameter information of the event, construct the corresponding event, and send the event;
[0085] The event producer engine module supports embedding event producer business systems, adopts the Java API calling method, assembles event information according to the event parameter information defined by the event definition module, completes event construction, and then triggers events to help business systems send reliable events.
[0086] Step 3: Receive the event, process the event response according to the configured response process, run the event process consumption task, and perform the event consumption operation;
[0087] The event operation center module receives events sent by the event producer engine through the http service interface, responds to events according to the response process configured by the event definition module, runs event process task consumption tasks, and executes event consumption operations.
[0088] Step 4: Receive event consumption operation data from the consumer business system, update the event status and feedback the event consumption results.
[0089] Step 5: Store event data and workflow operation logs in the event storage module.
[0090] Embodiment 3
[0091] This embodiment provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps in the workflow-based event management method described above are implemented.
[0092] Embodiment 4
[0093] This embodiment provides a computer device, including 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 in the workflow-based event management method described above are implemented.
[0094] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer-usable program code.
[0095] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0096] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0097] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0098] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0099] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A workflow-based event management device, characterized in that: include: The event definition module is configured to: arrange events according to business needs, configure the event response process, and define the basic attributes and parameter information of events; The event producer engine module is configured to: assemble event information according to basic attributes and parameter information of the event, construct corresponding events, and send the events to the event operation center module; The event operation center module is configured to: receive events, perform event response processing according to the configured response process, start the event consumption process, and execute event consumption operations; The event consumer engine module is configured to: receive event consumption operation data from the consumer business system, update the event status and feedback the event consumption results.
2. The workflow-based event management device according to claim 1, characterized in that: The device also includes an event storage module, which is configured to store event data and a running log of the workflow.
3. The workflow-based event management device according to claim 1, characterized in that: In the event definition module, the basic attributes of an event include the event number, name, description template, and related business subject information.
4. The workflow-based event management device according to claim 1, characterized in that: In the event definition module, the parameter information of the event includes the components of the parameter format template and the agreed event.
5. The workflow-based event management device according to claim 1, characterized in that: In the event definition module, events are arranged and the event response process is configured, including: configuring the start node and end node of the event response process, as well as the script task waiting task, parallel gateway and parallel multi-instance components of the event response process.
6. The workflow-based event management device according to claim 1, characterized in that: The event producer engine module embeds the event producer business system, adopts the Java API calling method, and assembles the event information according to the event parameter information defined by the event definition module.
7. The workflow-based event management device according to claim 1, characterized in that: The event operation center module receives events sent by the event producer engine through the http service interface.
8. A workflow-based event management method, characterized in that: A workflow-based event management device according to any one of claims 1 to 7, comprising the following steps: Arrange events according to business needs, configure event response processes, and define basic attributes and parameter information of events; When the business status changes, the event information is assembled according to the basic attributes and parameter information of the event, the corresponding event is constructed, and the event is sent; Receive events, process the events according to the configured response process, run the event process consumption task, and perform event consumption operations; Receive event consumption operation data from the consumer business system, update event status and feedback event consumption results.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the workflow-based event management method as claimed in claim 8 are implemented.
10. A computer 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 workflow-based event management method as described in any one of claim 8 are implemented.