Event triggering method and device, equipment and storage medium

By recording and comparing event rules in the process state transition data table to trigger event execution, the problem of business systems being unable to detect the termination of processes by third-party components is solved, ensuring the timeliness of business logic processing and the stability of processes.

CN120994338APending Publication Date: 2025-11-21CHINA MERCHANTS BANK
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511111033.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-08
Publication Date
2025-11-21

AI Technical Summary

Technical Problem

The enterprise's business system is unable to detect the termination of the process by third-party components, which prevents the corresponding business logic from being processed, thus increasing the error rate.

Method used

During the execution of the target process, the process and the state before and after the process transition are recorded in the state transition data table. The data is read and compared with the event rules by a scheduled task. If the rules are met, the data is written into the event table and the event is triggered.

Benefits of technology

It enables timely processing of business logic when a third-party component terminates the process, reducing the error rate and ensuring the normal operation of the process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120994338A_ABST
    Figure CN120994338A_ABST
Patent Text Reader

Abstract

The invention discloses an event triggering method and device, equipment and a storage medium, and relates to the technical field of computers.The method comprises the steps that in the running process of a target process, if state transition exists in the target process, the target process and the states before and after the target process transition are written into a state transition data table; reading the state transition data table according to a preset first time through a first timed task to obtain a reading result; comparing the reading result with a preset event rule, and if the reading result accords with the preset event rule, writing an event in the reading result into an event table; and triggering the event execution in the event table according to the preset second time through the second timed task. According to the method and the device, the business error rate can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to an event triggering method, apparatus, device, and storage medium. Background Technology

[0002] In the wave of digital transformation, enterprises are now relying on business process management systems.

[0003] However, if a third-party component terminates the process, the enterprise's business system will not be able to detect it and will be unable to perform the corresponding business logic processing for such process termination, thereby increasing the business error rate.

[0004] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention

[0005] The main purpose of this application is to provide an event triggering method, apparatus, device, and storage medium, which aims to solve the technical problem that if a third-party component terminates a process, the enterprise's business system cannot detect it and cannot perform corresponding business logic processing for such process termination, thereby increasing the business error rate.

[0006] To achieve the above objectives, this application proposes an event triggering method, which includes:

[0007] If the target process undergoes a state transition during its operation, the target process and its states before and after the transition are written into the state transition data table.

[0008] The state transition data table is read by the first timed task according to the preset first time, and the reading result is obtained;

[0009] The reading result is compared with the preset event rules. If the reading result matches the preset event rules, the event in the reading result is written into the event table.

[0010] The second scheduled task triggers the execution of events in the event table at a preset second time.

[0011] In one embodiment, the step of reading the state transition data table by a first timed task according to a preset first time and obtaining the reading result includes:

[0012] If a node in the target process undergoes a state transition, the node and its state before and after the transition are written into the state transition data table.

[0013] In one embodiment, the step of writing the target process and its states before and after the transition into the state transition data table if the target process undergoes a state transition during its operation includes:

[0014] Configure an interceptor or event listener so that when a state transition is detected in the target process, the target process and its state before and after the transition are written into the state transition data table, and / or, when a state transition is detected in a node in the target process, the node and its state before and after the transition are written into the state transition data table.

[0015] In one embodiment, the step of configuring the interceptor or event listener includes, prior to:

[0016] In response to event configuration instructions, configure corresponding events for nodes in the target process.

[0017] In one embodiment, configuring corresponding events for nodes in the target process in response to event configuration instructions includes:

[0018] In response to a user drag-and-drop command, configure a corresponding event for at least one of the following in the target process: node creation, node submission, and process termination.

[0019] In one embodiment, the step of triggering the execution of an event in the event table via a second timed task includes:

[0020] The process engine extracts business data from the runtime context of the target process based on preset event receiving parameters;

[0021] The business data is assembled into a message that meets the requirements of the event receiving interface;

[0022] The process engine sends the message to the event receiving interface.

[0023] In one embodiment, assembling the service data into a message that conforms to the requirements of the event receiving interface includes:

[0024] The business data is assembled into a message that meets the requirements of the event receiving interface of the external business system;

[0025] The step of sending the message to the event receiving interface through the process engine includes:

[0026] The message is sent to the external business system through the process engine.

[0027] Furthermore, to achieve the above objectives, this application also proposes an event triggering device, which includes:

[0028] The state writing module is used to write the target process and its state before and after the state transition into the state transition data table if the target process undergoes a state transition during its operation.

[0029] The data reading module is used to read the state transition data table according to a preset first time according to the first timed task, and obtain the reading result;

[0030] The data comparison module is used to compare the reading result with the preset event rules. If the reading result matches the preset event rules, the event in the reading result is written into the event table.

[0031] The event triggering module is used to trigger the execution of events in the event table according to a preset second time through a second timed task.

[0032] In addition, to achieve the above objectives, this application also proposes an event triggering device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the event triggering method as described above.

[0033] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and which, when executed by a processor, implements the steps of the event triggering method described above.

[0034] One or more technical solutions proposed in this application have at least the following technical effects:

[0035] In this application, when a third-party component terminates a process, the process undergoes a state transition. This application writes the target process and its state before and after the transition into a state transition data table. A first scheduled task reads the state transition data table at a preset first time to obtain a reading result. The reading result is compared with a preset event rule. If the reading result matches the preset event rule, the event in the reading result is written into an event table. A second scheduled task triggers the execution of the event in the event table at a preset second time, thereby terminating the corresponding business logic processing. Attached Figure Description

[0036] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0037] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0038] Figure 1 This is a flowchart illustrating the event triggering method of this application in Embodiment 1.

[0039] Figure 2 A graphical event configuration interface diagram for the event triggering method of this application;

[0040] Figure 3 This is a schematic diagram illustrating the parameter configuration for the event triggering method in this application;

[0041] Figure 4 This is a schematic diagram of the module structure of the event triggering device according to an embodiment of this application;

[0042] Figure 5 This is a schematic diagram of the device structure of the hardware operating environment involved in the event triggering method in the embodiments of this application.

[0043] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0044] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0045] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0046] The main solution of this application embodiment is as follows: During the operation of the target process, if the target process undergoes a state transition, the target process and its state before and after the transition are written into a state transition data table; the state transition data table is read by a first timed task at a preset first time to obtain a reading result; the reading result is compared with a preset event rule, and if the reading result conforms to the preset event rule, the event in the reading result is written into an event table; the event in the event table is triggered by a second timed task at a preset second time.

[0047] In this embodiment, for ease of description, the following description will focus on the business system as the executing entity.

[0048] In existing technologies, if a third-party component terminates a process, the enterprise's business system cannot detect it and cannot perform corresponding business logic processing for such process termination, thereby increasing the business error rate.

[0049] This application provides a solution where, when a third-party component terminates a process, the process undergoes a state transition. This application writes the target process and its states before and after the transition into a state transition data table. A first scheduled task reads the state transition data table at a preset first time, obtains the reading result, and compares the reading result with preset event rules. If the reading result matches the preset event rules, the event in the reading result is written into an event table. A second scheduled task triggers the execution of the event in the event table at a preset second time, thereby terminating the corresponding business logic processing.

[0050] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone; or an electronic device or event triggering device capable of performing the above functions; or an electronic system or business system capable of performing the above functions. The following description uses a business system as an example to illustrate this embodiment and the subsequent embodiments.

[0051] Based on this, the embodiments of this application provide an event triggering method, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the event triggering method of this application in Embodiment 1.

[0052] In this embodiment, the event triggering method includes steps S30, S50, and S60-S70:

[0053] Step S30: During the operation of the target process, if the target process undergoes a state transition, the target process and its state before and after the transition are written into the state transition data table.

[0054] Continuously monitor the target process while it is in operation.

[0055] Once a state change is detected in the target process, such as changing from "pending" to "processing" or from "processing" to "completed", the relevant information of the target process and its state before and after the change need to be recorded and written into a pre-defined state change data table. This allows for timely capture of state changes in the target process and ensures that state changes are traceable.

[0056] Step S50: The state transition data table is read by the first timed task according to the preset first time, and the reading result is obtained;

[0057] One of the features is a first scheduled task that can be executed automatically at a pre-set first time interval (e.g., every 5 minutes, every 10 minutes, etc., the specific time can be flexibly adjusted according to actual needs).

[0058] During each execution, the first scheduled task reads the contents of the state transition data table and saves the read data as the result. By reading at regular intervals, the state transition information of the target process can be obtained periodically for further processing.

[0059] Step S60: Compare the reading result with the preset event rules. If the reading result matches the preset event rules, write the event in the reading result into the event table.

[0060] Among them, the event rules define what kind of state transition will trigger a specific event. For example, it stipulates that when a target process changes from the "pending approval" state to the "approved" state, a "send notification" event is triggered.

[0061] If the state transitions in the read results match the preset event rules, then the corresponding event information in the read results is extracted and written into the event table. This allows the events that need to be processed to be filtered based on the state transitions and stored in the event table for easy backtracking execution later.

[0062] Step S70: The second timed task triggers the execution of the event in the event table at a preset second time.

[0063] One of the features is a second scheduled task, which is automatically triggered and executed according to a pre-set second time interval (which can also be flexibly set according to actual needs, and can be the same as or different from the first time interval).

[0064] Each time the event is triggered, the second scheduled task checks the event table for any pending events. If an event is found, it executes the corresponding event operation (such as calling a notification interface or updating business data) according to the information recorded in the event table. For example, if the event table records a "send notification" event, the scheduled task will trigger the notification sending operation. This timed triggering mechanism ensures that eligible events are processed in a timely manner according to the predetermined time.

[0065] As one implementation method, events in the event table can be routed to different executor pools based on event type. If the event is a global event, i.e., a critical event affecting the entire system or across modules, then a separate queue with more guaranteed resources (e.g., a faster thread pool, higher CPU preemption, and shorter queue waiting time) can be allocated to the global event. If the event is a local event, i.e., a non-critical event affecting only a single module or a specific process, then a slower thread pool, lower CPU preemption, and longer queue waiting time can be allocated to the event.

[0066] As another implementation method, time can be dynamically allocated according to the resource usage of the event executor.

[0067] Each event executor independently pulls tasks and calls the target interface to process events in parallel.

[0068] As another implementation, a dead-letter queue can be used to store failed events for manual investigation.

[0069] This embodiment provides an event triggering method. In this application, when a third-party component terminates a process, the process undergoes a state transition. This application writes the target process and its states before and after the transition into a state transition data table. A first scheduled task reads the state transition data table at a preset first time to obtain a reading result. The reading result is compared with preset event rules. If the reading result matches the preset event rules, the event in the reading result is written into an event table. A second scheduled task triggers the execution of the event in the event table at a preset second time, thereby terminating the corresponding business logic processing. Furthermore, this embodiment can achieve normal process-driven event execution without blocking the process.

[0070] Based on Embodiment 1 of this application, in Embodiment 2 of this application, the content that is the same as or similar to that in Embodiment 1 can be referred to the above description, and will not be repeated hereafter. Based on this, before step S50, where the first timed task reads the state transition data table according to a preset first time and obtains the reading result, the event triggering method further includes step S40:

[0071] Step S40: If there is a state transition in the node of the target process, then write the node and the state before and after the node transition into the state transition data table.

[0072] During the process, the status changes of all nodes (such as "Pending Approval" → "Approved") and processes (such as "Running" → "Terminated") are written to the data table in real time to ensure that status changes are traceable.

[0073] In this embodiment, event processing and process-driven operations run in complete parallel, avoiding the blocking of normal process operation due to event execution time, thereby improving system stability. This embodiment can also simultaneously process process-level global events (such as triggering full-process archiving when a process terminates) and node-level local events (such as triggering a reminder for the next node when an approval node passes), meeting the triggering needs of complex business scenarios.

[0074] Based on the above embodiments, in Embodiment 3 of this application, the same or similar content as the above embodiments can be referred to the above description, and will not be repeated hereafter. On this basis, in step S30, before writing the target process and its states before and after the transition into the state transition data table if the target process undergoes a state transition during its operation, the event triggering method further includes step S20:

[0075] Step S20: Configure an interceptor or event listener so that when a state transition is detected in the target process, the target process and its state before and after the transition are written into the state transition data table, and / or, when a state transition is detected in a node in the target process, the node and its state before and after the transition are written into the state transition data table.

[0076] In one implementation, the business system includes a process engine. By embedding interceptors (such as AOP or engine hooks) or event listeners in the process engine, it captures state changes of nodes / processes. When a state transition is detected in the target process, the target process and its state before and after the transition are written into the state transition data table. And / or, when a state transition is detected in a node in the target process, the node and its state before and after the transition are written into the state transition data table.

[0077] This application can capture the state changes of nodes / processes by configuring interceptors or event listeners. Thus, when a state transition of the target process is detected, the target process and its state before and after the transition can be written into the state transition data table. And / or, when a state transition of a node in the target process is detected, the node and its state before and after the transition can be written into the state transition data table. In this way, by monitoring the state changes of processes and nodes in real time, the automatic triggering of events can be achieved without affecting the normal operation of the process itself.

[0078] This application establishes a standardized event interaction channel between the process engine and the business system, enabling the process engine to trigger events to automatically complete specific business logic when a process or node occurs in different states.

[0079] Based on the above embodiments, in Embodiment 4 of this application, the same or similar content as the above embodiments can be referred to the above description, and will not be repeated hereafter. Furthermore, before configuring the interceptor or event listener in step S20, the event triggering method further includes step S10:

[0080] Step S10: In response to the event configuration instruction, configure the corresponding event for the node in the target process.

[0081] Users can issue event configuration commands to configure corresponding events for nodes in the target process.

[0082] For example, in the order approval process, when the status of the financial review node changes from "under review" to "approved", configure the event to send an email to notify the warehouse to prepare for shipment.

[0083] This application provides users with the ability to configure events, enabling adjustments to process behavior without modifying the code.

[0084] Based on the above embodiments, in Embodiment 5 of this application, the same or similar content as the above embodiments can be referred to the above description, and will not be repeated hereafter. On this basis, step S10, in response to the event configuration instruction, configuring corresponding events for the nodes in the target process, further includes step S11:

[0085] Step S11: In response to the user's drag command, configure a corresponding event for at least one of the following in the target process: node generation, node submission, and process termination.

[0086] The business system also provides a visual interactive interface, allowing users to dynamically bind process node states to business events through drag-and-drop operations, as shown in the example. Figure 2 , Figure 2 This is a graphical interface diagram illustrating the event configuration for the event triggering method in this application.

[0087] In this application embodiment, it is possible to configure events for any node in the process, covering the entire lifecycle state of the node.

[0088] Reference Figure 3 , Figure 3 This diagram illustrates the parameter configuration for the event triggering method in this application. Users can customize the input parameters for events (such as triggering conditions and transmitted data) without modifying the underlying code. For example, a node submission event can be configured to transmit parameters such as the submitter ID, submission time, and node result.

[0089] This application embodiment separates event triggering rules from business logic, so business personnel do not need to pay attention to code implementation. They can bind events and processes simply by configuring the interface, which reduces development costs when business scenarios change.

[0090] This application provides a graphical configuration method, which enables the establishment of a standardized event interaction channel between the process engine and the business system at all nodes. This allows the process engine to trigger events to automatically complete specific business logic when a process or node occurs in different states.

[0091] Based on the above embodiments, in Embodiment Six of this application, the same or similar content as the above embodiments can be referred to the above description, and will not be repeated hereafter. In addition, step S70, triggering the execution of the event in the event table by the second timed task according to a preset second time, further includes steps S71 to S73:

[0092] Step S71: Extract business data from the runtime context of the target process according to preset event receiving parameters through the process engine;

[0093] When an event is triggered, the process engine extracts business data from the runtime context (such as variables, form data, historical records, etc.) based on the pre-configured event receiving parameters (such as the business ID, operator, and status code required by the interface) and automatically assembles it into a message that meets the interface requirements.

[0094] As one implementation method, data can also be extracted and merged from multiple sources such as process context, external databases, and cache.

[0095] Step S72: Assemble the business data into a message that meets the requirements of the event receiving interface;

[0096] The message structure must conform to the field definitions of the target interface (such as event type, timestamp, and data payload).

[0097] As one implementation method, field mapping is also required when assembling business data into a message that meets the requirements of the event receiving interface.

[0098] As another implementation method, template engines such as Freemarker and Velocity can be used to define message structures, supporting conditional branching and looping.

[0099] As another implementation method, sensitive fields (such as ID card numbers) are desensitized during the assembly stage.

[0100] As another implementation method, multiple messages can be generated simultaneously for use by different interfaces. For example, JSON and XML can be generated simultaneously for use by different interfaces.

[0101] Step S73: The message is sent to the event receiving interface through the process engine.

[0102] This involves calling a pre-defined event receiving interface (such as a REST API, message queue, or RPC service) to send the assembled message asynchronously or synchronously.

[0103] This application embodiment achieves decoupling and integration of process state changes with external systems through parameterized data extraction, standardized message assembly, and reliable interface calls.

[0104] Based on the above embodiments, in Embodiment 7 of this application, the same or similar content as the above embodiments can be referred to the above description, and will not be repeated hereafter. On this basis, step S72, assembling the service data into a message that meets the requirements of the event receiving interface, further includes step S721:

[0105] Step S721: Assemble the business data into a message that meets the requirements of the event receiving interface of the external business system;

[0106] Step S73, which involves sending the message to the event receiving interface via the process engine, further includes step S731:

[0107] Step S731: The message is sent to the external business system through the process engine.

[0108] Establish a unified event interaction mechanism between the process engine and external business systems (such as CRM and ERP). When the state of a process or node changes, the process engine can directly trigger specific business logic of the external system through events.

[0109] This application's embodiments replace manual coding with configurable parameter mapping, allowing business personnel to complete the linkage between processes and external systems without writing interface adaptation code, significantly reducing the development cost of business scenario access.

[0110] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the event triggering method of this application. Any simple modifications based on this technical concept are within the protection scope of this application.

[0111] This application also provides an event triggering device, please refer to... Figure 4 The event triggering device includes:

[0112] The state writing module 10 is used to write the target process and the state before and after the target process change into the state change data table if the target process has a state change during the operation of the target process.

[0113] The data reading module 20 is used to read the state transition data table according to a preset first time through a first timed task, and obtain the reading result;

[0114] The data comparison module 30 is used to compare the reading result with the preset event rules. If the reading result matches the preset event rules, the event in the reading result is written into the event table.

[0115] The event triggering module 40 is used to trigger the execution of events in the event table according to a preset second time through a second timed task.

[0116] The event triggering device provided in this application, employing the event triggering method in the above embodiments, can solve the technical problem that if a third-party component terminates the process, the enterprise's business system cannot detect it and cannot perform corresponding business logic processing for such process termination, thereby increasing the business error rate. Compared with the prior art, the beneficial effects of the event triggering device provided in this application are the same as those of the event triggering method provided in the above embodiments, and other technical features in the event triggering device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.

[0117] This application provides an event triggering device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the event triggering method in the first embodiment described above.

[0118] The following is for reference. Figure 5 The diagram illustrates a structural schematic suitable for implementing an event-triggered device according to the embodiments of this application. The event-triggered device in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 5 The event triggering device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0119] like Figure 5As shown, the event triggering device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in the read-only memory 1002 or a program loaded from the storage device 1003 into the random access memory 1004. The random access memory 1004 also stores various programs and data required for the operation of the event triggering device. The processing unit 1001, the read-only memory 1002, and the random access memory 1004 are interconnected via a bus 1005. An input / output interface 1006 is also connected to the bus. Typically, the following systems can be connected to the input / output interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the event-triggered device to communicate wirelessly or wiredly with other devices to exchange data. While the figures show event-triggered devices with various systems, it should be understood that implementation or possession of all the systems shown is not required. More or fewer systems may be implemented alternatively.

[0120] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from read-only memory 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0121] The event-triggered device provided in this application, employing the event-triggered method in the above embodiments, can solve the technical problem that if a third-party component terminates the process, the enterprise's business system cannot detect it and cannot perform corresponding business logic processing for such process termination, thereby increasing the business error rate. Compared with the prior art, the beneficial effects of the event-triggered device provided in this application are the same as those of the event-triggered method provided in the above embodiments, and other technical features in this event-triggered device are the same as those disclosed in the previous embodiment method, and will not be repeated here.

[0122] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0123] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0124] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the event triggering method in the above embodiments.

[0125] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0126] The aforementioned computer-readable storage medium may be included in the event-triggered device; or it may exist independently and not assembled into the event-triggered device.

[0127] The aforementioned computer-readable storage medium carries one or more programs. When one or more of these programs are executed by an event-triggered device, the event-triggered device: during the operation of the target process, if the target process undergoes a state transition, it writes the target process and its states before and after the transition into a state transition data table; it reads the state transition data table at a preset first time via a first timed task to obtain a reading result; it compares the reading result with preset event rules, and if the reading result matches the preset event rules, it writes the events in the reading result into an event table; and it triggers the execution of events in the event table at a preset second time via a second timed task.

[0128] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0129] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0130] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0131] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described event triggering method. This solves the technical problem that if a third-party component terminates the process, the enterprise's business system cannot detect it and cannot perform corresponding business logic processing for such process termination, thereby increasing the business error rate. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the event triggering method provided in the above embodiments, and will not be repeated here.

[0132] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.

Claims

1. An event triggering method, characterized in that, The method includes: If the target process undergoes a state transition during its operation, the target process and its states before and after the transition are written into the state transition data table. The state transition data table is read by the first timed task according to the preset first time, and the reading result is obtained; The reading result is compared with the preset event rules. If the reading result matches the preset event rules, the event in the reading result is written into the event table. The second scheduled task triggers the execution of events in the event table at a preset second time.

2. The method as described in claim 1, characterized in that, Before the step of reading the state transition data table and obtaining the reading result by the first timed task according to a preset first time, the following steps are included: If a node in the target process undergoes a state transition, the node and its state before and after the transition are written into the state transition data table.

3. The method as described in claim 2, characterized in that, Before the step of writing the target process and its states before and after the transition into the state transition data table if the target process undergoes a state transition during its operation, the following steps are included: Configure an interceptor or event listener so that when a state transition is detected in the target process, the target process and its state before and after the transition are written into the state transition data table, and / or, when a state transition is detected in a node in the target process, the node and its state before and after the transition are written into the state transition data table.

4. The method as described in claim 3, characterized in that, Prior to configuring the interceptor or event listener, the following steps are included: In response to event configuration instructions, configure corresponding events for nodes in the target process.

5. The method as described in claim 4, characterized in that, The step of configuring corresponding events for nodes in the target process in response to event configuration instructions includes: In response to a user drag-and-drop command, configure a corresponding event for at least one of the following in the target process: node creation, node submission, and process termination.

6. The method as described in claim 2, characterized in that, The step of triggering the execution of the event in the event table via the second scheduled task includes: The process engine extracts business data from the runtime context of the target process based on preset event receiving parameters; The business data is assembled into a message that meets the requirements of the event receiving interface; The process engine sends the message to the event receiving interface.

7. The method as described in claim 6, characterized in that, The process of assembling business data into a message that meets the requirements of the event receiving interface includes: The business data is assembled into a message that meets the requirements of the event receiving interface of the external business system; The step of sending the message to the event receiving interface through the process engine includes: The message is sent to the external business system through the process engine.

8. An event triggering device, characterized in that, The device includes: The state writing module is used to write the target process and its state before and after the state transition into the state transition data table if the target process undergoes a state transition during its operation. The data reading module is used to read the state transition data table according to a preset first time according to the first timed task, and obtain the reading result; The data comparison module is used to compare the reading result with the preset event rules. If the reading result matches the preset event rules, the event in the reading result is written into the event table. The event triggering module is used to trigger the execution of events in the event table according to a preset second time through a second timed task.

9. An event triggering device, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the event triggering method as described in any one of claims 1 to 7.

10. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the event triggering method as described in any one of claims 1 to 7.