Dynamically configurable process event push method and system acting on process engine

Through the dynamic configuration of the process engine adaptation module, push queue module, channel management module and data source adaptation module, the duplicate development problems caused by different protocols in enterprise-level application systems are solved, and the unified push and flexible configuration of process matters are realized.

CN116009938BActive Publication Date: 2025-08-19IND BANK CO +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202211513609.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-29
Publication Date
2025-08-19
Estimated Expiration
2042-11-29

AI Technical Summary

Technical Problem

In enterprise-level application systems, the push protocols of each enterprise are inconsistent, resulting in the development of multiple sets of codes for each process system, which cannot achieve universalization of the code, and the repetitive development work is added.

Method used

It provides a dynamically configurable process matter push system, including process engine adaptation module, push queue module, channel management module, push module and data source adaptation module. It realizes channel management through configuration pages and APIs, encapsulates push logic, supports multiple protocols, and reduces code writing.

Benefits of technology

It realizes unified management of different protocols, reduces duplicate development work, and enterprise developers can complete data push through configuration, supporting rapid response to changes in business needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116009938B_ABST
    Figure CN116009938B_ABST
Patent Text Reader

Abstract

The present invention provides a dynamically configurable process event push method and system for a process engine, including: integrating a process event push system into the process engine to provide services; managing channels to be pushed during asynchronous push, placing them into a push queue for storage; managing a list of push channels; assembling and pushing data to target channels; and persisting configuration data to adapt to a database. The present invention systematically applies push-related logic to the process engine and provides a configuration entry. Enterprise developers can select one or more different push strategies through configuration to complete data push, eliminating the need for code development for different protocols and multiple sets of code for multiple channels, thereby reducing repetitive development work.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of process engines, and in particular to a method and system for pushing dynamically configurable process items acting on a process engine. Background Art

[0002] During the development of enterprise-level application systems, as business becomes increasingly complex, a process engine is often required to handle complex applications and approvals. During the process flow, the process engine generates various channel management functions. Channel management lives and dies with the process, serving as both the entry point for process management and an important reminder to guide users through the process.

[0003] Patent document CN104281906A discloses a process engine implementation method and process engine system in a business process, including: S1, constructing graphical process nodes; S2, designing a flow chart, connecting the process nodes with guide lines with conditions and directions according to business needs, to form a business process chart; S3, saving and publishing the designed flow chart to the process engine; S4, the process engine automatically transfers the task flow to the corresponding node according to the operation of the business system.

[0004] However, in order to break down various complex businesses into smaller parts, large enterprises usually adopt the solution of developing and deploying multiple application systems. In order to avoid users frequently switching back and forth between systems, the channel management of each system is usually pushed to a unified entrance for users to handle.

[0005] The problem is that different companies have different push protocols, such as pushing OA office systems (WebService protocol), pushing enterprise messaging software (MQ protocol), pushing WeChat public accounts (HTTP protocol), etc. Some companies even push channel management to multiple channels. Then each process system will develop a set of codes for each channel, and the code cannot be universal. Summary of the Invention

[0006] In view of the defects in the prior art, the purpose of the present invention is to provide a dynamically configurable process event push method and system acting on a process engine.

[0007] According to the present invention, a dynamically configurable process event push system acting on a process engine includes:

[0008] Process engine adaptation module: integrates the process event push system into the process engine to provide services;

[0009] Push queue module: when asynchronous push is executed, the channel management to be pushed is put into the push queue for storage;

[0010] Channel management module: manage push channel list;

[0011] Push module: assembles and pushes data to target channels;

[0012] Data source adapter module: persists configuration data to adapt to the database.

[0013] Preferably, it also includes a configuration module;

[0014] The configuration module includes the configuration page integration module and the configuration API module;

[0015] Configure the page integration module to integrate the application page into the web application framework and provide services simultaneously with the application;

[0016] The Configuration API provides a programmatic configuration solution for applications without pages.

[0017] Preferably, the push module includes a message parser and a push thread pool; the message parser converts the channel management data into a push message; the push thread pool runs the push thread; the push module periodically checks whether there is data to be pushed in the push queue. When it is detected that there is data to be pushed, all push channels are read from the channel management module, where the push channel serves as a downstream system adapter to encapsulate the logic of pushing the downstream system. If there is no push channel, the push is not executed. Otherwise, the push thread is started for push processing. In the push thread, the push data is first parsed into the message format required by the corresponding channel, and then the data is pushed to the downstream system by executing the push logic of the channel.

[0018] Preferably, the channel management module encapsulates multiple protocols, and the protocols are specified when configuring the channels through the configuration module. The number of push channel lists created by the channel management module is determined according to the number of configured channels.

[0019] Preferably, the process engine adapter module triggers the process engine through the process engine's trigger. The process engine adapter module presets multiple adaptation schemes to match the usage of different process engine triggers; for process engines without trigger functions, the process engine adapter module triggers through embedding points.

[0020] Preferably, the message parser is a string template parser that parses and outputs the channel management according to the specified template and supports multiple message parsing; the push thread pool is used to execute the push task, and the thread pool size is specified by configuration. The configuration process includes:

[0021] Integrate the configuration module with the application to provide access to the configuration page; access the configuration page address, add a push channel, and set the channel's push protocol, channel address, and message template information. Methods for integrating the configuration module with the application include: directly registering the configuration module page with the application; calling the configuration module API to develop a customized page program in the application system; the push channel is a list that allows additions, deletions, and modifications to take effect in real time; configure the push protocol for each channel, and set different configuration information based on different protocols;

[0022] Configure the thread pool size and the number of threads that execute push tasks simultaneously;

[0023] Configure persistence by calling the data source adapter module, and perform data persistence through the data source adapter module, so that the push queue is a persistent data queue.

[0024] Preferably, according to the configuration information of the push channel, the corresponding message parser is called to convert the channel management taken out from the push channel list into the message format under the configuration policy, and execute the push protocol logic under the policy.

[0025] According to the present invention, a process item pushing method based on the dynamically configurable process item pushing system acting on a process engine includes:

[0026] Step S1: Integrate the process event push system into the process engine through the process engine adapter module;

[0027] Step S2: Initiate a new process through the process engine and submit it to the reviewer for review. If the review passes, the process is considered to be successfully initiated. The process engine will then send channel management to the reviewer;

[0028] Step S3: The generation of new channel management is sensed through the trigger of the process engine, and the channel management is placed in the push queue maintained by the push queue module;

[0029] Step S4: Detecting that there is a push task in the push queue, start the thread and execute step S5;

[0030] Step S5: calling the channel management module to obtain the push channel list;

[0031] Step S6: Take out a channel management from the push queue;

[0032] Step S7: Traverse the push channel list generated in step S5, and according to the configuration information of the push channel, call the corresponding message parser to convert the channel management obtained in step S6 into the message format under the configuration policy, and execute the push protocol logic under the policy;

[0033] Step S8: Complete the push and record the log.

[0034] According to the invention, a computer-readable storage medium storing a computer program is provided, and when the computer program is executed by a processor, the steps of the process item pushing method are implemented.

[0035] According to an electronic device provided by the present invention, the electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the steps of the process event pushing method are implemented.

[0036] Compared with the prior art, the present invention has the following beneficial effects:

[0037] 1. The present invention provides a configurable push solution. A process engine device is written to encapsulate as many push protocols as possible and hide the push implementation details. Enterprise developers can complete data push by selecting one or more different push strategies through configuration instead of writing code, solving the problem of developing different codes for different protocols and developing multiple sets of codes for multiple channels.

[0038] 2. The present invention applies push-related logic to the process engine in a systematic manner, encapsulates and builds this set of push logic to provide a set of general push components, and provides a configuration entry. Developers only need a small amount of configuration to complete the push work of process channel management, reducing repetitive development work.

[0039] 3. The present invention is based on dynamic configuration technology, which can change the push strategy at any time and is also friendly to business personnel. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Other features, objects and advantages of the present invention will become more apparent upon reading the detailed description of non-limiting embodiments with reference to the following drawings:

[0041] Figure 1 This is a schematic diagram of the process steps of the process event push method provided by the present invention.

[0042] Figure 2 This is a schematic block diagram of the present invention, showing the basic components and upstream and downstream relationships of the present invention.

[0043] Figure 3 This is a sequence diagram of the process engine pushing process items to the queue, showing the entire process from the process engine generating process items to persistence and pushing them to the queue.

[0044] Figure 4 This is a sequence diagram of the push module pushing push queue data to a third-party system, showing the process of the push module getting data from the push queue and pushing it to the downstream system.

[0045] Figure 5 This is the channel management interface of the configuration module, where channels can be added, modified, and deleted, and the changes take effect in real time.

[0046] Figure 6 This is the channel configuration interface. Depending on the selected protocol, the configurable parameters are different.

[0047] Figure 7 In the database configuration interface, you can select different data source types.

[0048] Figure 8 For other configuration items, such as thread pool size, empty queue detection time interval, etc. DETAILED DESCRIPTION

[0049] The present invention will be described in detail below with reference to specific embodiments. The following examples will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those skilled in the art, several changes and improvements can be made without departing from the scope of the present invention. These all fall within the scope of protection of the present invention.

[0050] The present invention is a dynamically configurable channel management push method. By encapsulating the underlying push logic and hiding the implementation details, developers do not need to worry about how to write the push code. The push effect can be achieved by configuring the push, which greatly reduces the workload of system development and allows developers to focus on business implementation. The integration of multiple protocols allows the system to quickly respond to changes in business needs. It only needs to use a management interface to solve where to push and how to push, freeing the hands of developers and helping enterprises with digital transformation. Among them, the present invention uses the triggering device such as the event and trigger of the process engine as the trigger source, obtains the newly generated process items through the trigger source, and then persists the process items in the queue to wait for push. The detection thread periodically scans the data in the queue, and the push thread calls the push logic of the push channel to push the data to the downstream system.

[0051] The present invention provides a dynamically configurable process event push system for a process engine, comprising a process engine adapter module, a push queue module, a channel management module, a configuration module, a push module, and a data source adapter module. The process engine adapter module is used to integrate various process engines, the push queue module is used to persist push data, the configuration module is used to configure push parameters, the channel management module is used to add and delete channel information, the push module is used to detect and execute push tasks, and the data source adapter module is used to integrate various types of databases.

[0052] Through the process engine adapter module, it can be easily integrated into various existing process engines to provide services; Figure 2As shown, after the push system integrates with the process engine, the process engine transmits the generated process item information to the push system during process processing. The push system, acting as a push plug-in, ultimately pushes the data to various downstream systems through the interaction between various modules. The process engine adapter module detects new process items through events or triggers in each process engine; for example, integration can be achieved through a JAR package + configuration or Sprint BootStarter. The specific integration process is implemented internally, and users do not need to worry about how the device is implemented, only requiring minimal configuration.

[0053] The push queue module is used to store channel management to be pushed during asynchronous push, and to achieve persistent push data through the database, and to ensure that the push data is not lost through database transactions; the configuration module pushes the relevant configuration of the system through the background management page, and can manage push channel related information, such as querying, adding, modifying and deleting channels, and can also configure global parameters, which will take effect when all modifications are made. The push module realizes detection and push through a detection thread and multiple push threads. During the detection phase, it only needs to start the detection thread to regularly scan whether there are new items in the queue that need to be pushed. If there are no new items, the scan will be delayed for a period of time (the specific delay time is configured by the configuration module). If there are new items, the push thread will be started (the specific number of threads is configured by the configuration module) to push the items in the queue to the downstream system in sequence. Except for the delay caused by the instructions or database, there is no delay time in the push process.

[0054] The channel management module is used to manage the push channel list; the channel management module encapsulates a variety of protocols, such as HTTP, RPC, WebService, ESB, etc., and the protocol can be specified when configuring the channel through the configuration module. The channel management module is mainly used to create a push channel list. The number of lists is determined by the number of configured channels; the channel management interface provided by the channel management module is as follows: Figure 5 As shown, the interface displays information such as channel name, channel agreement, channel status, etc. You can add multiple channels, modify and delete channels. When you click the Add button, the interface is displayed as follows Figure 6 As shown, you need to fill in the channel name and select the push protocol. Different protocols have different filling contents. For example, the HTTP+JSON protocol requires filling in the request address, timeout period, number of retries, token refresh, request header, and message template. The request address is filled in with the downstream system interface address; the request header can be used to send specified header information, such as interface authorization information; the message template can be filled in with a character template in JSON format, and supports EL expression parsing of event data, such as {"id":${id}}. After saving, the page jumps to Figure 5 List page. Click the Edit button and the page will be displayed again Figure 6 , and the page will be filled with the previously entered information, which can be modified and saved. Click the Delete button and confirm it again to delete the channel. Push will no longer be pushed to this channel. More specifically, the channel management module provides APIs for the configuration module and push queue module. The specific implementation is completed by the channel management module, and the configuration module and push queue module, as upper-level calls, only need to call the relevant APIs of the channel management module.

[0055] The configuration module includes the configuration page integration module and the configuration API module. The configuration page integration module can integrate pages into various web application frameworks, such as Spring MVC, Struts, and .Net Web, and provide services simultaneously with the application. The configuration API provides a programmatic configuration solution for applications without pages.

[0056] The push module is used to assemble and push data to the target channel. The push module is divided into a message parser and a push thread pool. The message parser converts the channel management data into push messages, and the push thread pool runs the push thread. In the preferred example, Figure 4 As shown, the push module periodically checks whether there is data to be pushed in the push queue. When it is detected that there is data to be pushed, all push channels are read from the channel management module. The channel can be regarded as a downstream system adapter, which is used to encapsulate the logic of pushing the downstream system, such as the push protocol, push address, push message format and other information. If there is no push channel, the push will not be executed. Otherwise, the push thread will be started for push processing. In the push thread, the push data is first parsed into the message format required by the corresponding channel, and then the data is pushed to the downstream system by executing the push logic of the channel.

[0057] The data source adapter module is used to persist configuration data and can adapt to databases such as REDIS, MYSQL, ORACLE, SQLITE, etc. The present invention requires database support, so data source configuration is required, such as Figure 7 As shown, you need to select the database type, database URL, database username, and password. The data source adapter module completes the database connection through configuration. The push system has built-in adapter logic for various data source connections, allowing you to configure mainstream data sources. The push system also provides a custom adapter interface, allowing developers to customize adapters. Adapter configuration is configured through the configuration module.

[0058] like Figure 5As shown, process events are generated by a process engine, which can be activity, flowable, camunda, jbpm, etc. The event function of the process engine can be used to capture process event data when the event is generated, and transmit these data to the push system through the interface of the process engine adapter module. The push system temporarily stores the data in a push queue for storage. The push queue is based on database storage. The data source adapter module can be used to store data in any type of data source. The data will be permanently saved until it is consumed.

[0059] This invention allows for configuration of some global parameters, such as the push thread pool size and the empty queue detection interval. The push thread pool defaults to two threads and can be configured based on the machine configuration. The empty queue detection interval is used to configure how long the push module sleeps before checking for data when the queue is empty. If the queue is not empty, the push module will not sleep.

[0060] The present invention provides a dynamically configurable process event push method acting on a process engine, comprising:

[0061] Step S1: integrating a dynamically configurable process event push system acting on the process engine into the process engine through a process engine adapter module;

[0062] Step S2: Initiate a new process through the process engine, such as "About Zhang San's Leave Application Process", and submit it to the project manager for review. After the process is successfully initiated, the process engine will send the channel management to the project manager;

[0063] Step S3: The generation of new channel management is sensed through triggers of the process engine and the channel management is placed in the push queue maintained by the push queue module;

[0064] Step S4: Detecting that there is a push task in the push queue, start the thread and execute step S5;

[0065] Step S5: calling the channel management module to obtain the push channel list;

[0066] Step S6: Take out a channel management from the push queue;

[0067] Step S7: Traverse the push channel list generated in step S5, and according to the configuration information of the push channel, call the corresponding message parser to convert the channel management retrieved in step S6 into the message format under the configuration policy, and execute the push protocol logic under the policy;

[0068] Step S8: Complete the push and record the log;

[0069] The process engine adapter module in step S1 is implemented using the process engine's triggers. Different process engine triggers are used in different ways, so multiple adaptation solutions are pre-set to adapt to almost all process engines on the market. For process engines without trigger functions, triggering is performed through embedded points.

[0070] The push queue in step S3 is a persistent data queue. By default, data persistence is performed through the data source adapter module, and it can also be modified to MQ through configuration.

[0071] The push module in step S4 has two sub-components: the message parser and the push thread pool. The message parser is a string template parser that can parse and output channel management according to the specified template. It can support multiple message parsing, such as JSON, XML, etc. The push thread pool is used to execute push tasks, and the thread pool size can be specified by configuration.

[0072] The following is the configuration process:

[0073] Step A: Integrate the configuration module with the application to access the configuration page;

[0074] Step B: Access the configuration page address;

[0075] Step C: Add a push channel and set the channel's push protocol, channel address, message template, and other information;

[0076] Step D: Configure thread pool size;

[0077] Step E: Configure persistence;

[0078] There are two ways to integrate the configuration module with the application in step A. One is to directly register the configuration module page with the application, such as registering it with a Servlet or Spring Controller. The other is to call the configuration module API and develop a customized page program in the application system. This method can be used when integrating with a desktop application or when the application system has particularly high requirements for page customization.

[0079] In step B, the push channel is a list that can be added, deleted, and modified, with real-time effect. Each channel can be configured with a push protocol, and different protocols have different configuration information. For example, the HTTP+JSON protocol includes the URL address, HTTP header information, and JSON message template, while the WEBService+XML protocol includes the URL address, password information, and XML template. In short, different configuration information can be set for different protocols.

[0080] In step C, configure the thread pool size. You can configure the number of threads that execute push tasks simultaneously. The default is 2 threads.

[0081] The persistence in step D is performed by calling the data source module, which also needs to be configured, such as MYSQL, ORACLE, etc. It can also be configured as an application public data source.

[0082] Those skilled in the art will appreciate that, in addition to implementing the system, device, and various modules provided by the present invention in purely computer-readable program code, it is entirely possible to implement the same program in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, embedded microcontrollers, and the like by logically programming the method steps. Therefore, the system, device, and various modules provided by the present invention can be considered a hardware component, and the modules included therein for implementing various programs can also be considered structures within the hardware component; the modules for implementing various functions can also be considered both software programs for implementing the method and structures within the hardware component.

[0083] The above describes specific embodiments of the present invention. It should be understood that the present invention is not limited to the specific embodiments described above, and those skilled in the art may make various changes or modifications within the scope of the claims, which do not affect the essence of the present invention. The embodiments of this application and the features in the embodiments may be combined with each other in any manner unless there is a conflict.

Claims

1. A dynamically configurable process event push system acting on a process engine, characterized in that: include: Process engine adaptation module: integrates the process event push system into the process engine to provide services; Push queue module: when asynchronous push is executed, the channel management to be pushed is put into the push queue for storage; Channel management module: manage push channel list; Push module: assembles and pushes data to target channels; Data source adapter module: persists configuration data to adapt to the database; The push module includes a message parser and a push thread pool; The message parser converts channel management data into push messages; the push thread pool runs the push thread; the push module periodically checks the push queue to see if there is data to be pushed. When it detects that there is data to be pushed, it reads all push channels from the channel management module. The push channel acts as a downstream system adapter to encapsulate the logic of pushing the downstream system. If there is no push channel, the push is not executed. Otherwise, the push thread is started for push processing. In the push thread, the push data is first parsed into the message format required by the corresponding channel, and then the data is pushed to the downstream system by executing the channel's push logic. The message parser is a string template parser that parses and outputs channel management according to the specified template and supports multiple message parsing; The push thread pool is used to execute push tasks. The thread pool size is specified by configuration. The configuration process includes: Integrate the configuration module with the application to provide access to the configuration page; access the configuration page address, add a push channel, and set the channel's push protocol, channel address, and message template information. Methods for integrating the configuration module with the application include: directly registering the configuration module page with the application; calling the configuration module API to develop a customized page program in the application system; the push channel is a list that allows additions, deletions, and modifications to take effect in real time; configure the push protocol for each channel, and set different configuration information based on different protocols; Configure the thread pool size and the number of threads that execute push tasks simultaneously; Configure persistence by calling the data source adapter module, and perform data persistence through the data source adapter module, so that the push queue is a persistent data queue.

2. The dynamically configurable process event push system acting on a process engine according to claim 1, characterized in that: Also includes configuration modules; The configuration module includes the configuration page integration module and the configuration API module; Configure the page integration module to integrate the application page into the web application framework and provide services simultaneously with the application; The Configuration API provides a programmatic configuration solution for applications without pages.

3. The dynamically configurable process event push system acting on a process engine according to claim 2, characterized in that: The channel management module encapsulates multiple protocols. The protocol is specified when configuring the channel through the configuration module. The number of push channel lists created by the channel management module is determined by the number of configured channels.

4. The dynamically configurable process event push system acting on a process engine according to claim 1, characterized in that: The process engine adapter module triggers the process engine through the process engine trigger. The process engine adapter module presets multiple adaptation schemes to match different usage methods of process engine triggers. For process engines that do not have trigger functions, the process engine adapter module is triggered by embedding points.

5. The dynamically configurable process event push system acting on a process engine according to claim 1, characterized in that: According to the configuration information of the push channel, the corresponding message parser is called to convert the channel management taken from the push channel list into the message format under the configuration policy, and execute the push protocol logic under the policy.

6. A process item pushing method of a dynamically configurable process item pushing system acting on a process engine based on any one of claims 1 to 5, characterized in that: include: Step S1: Integrate the process event push system into the process engine through the process engine adapter module; Step S2: Initiate a new process through the process engine and submit it to the reviewer for review. If the review passes, the process is considered to be successfully initiated. The process engine will then send channel management to the reviewer; Step S3: The generation of new channel management is sensed through the trigger of the process engine, and the channel management is placed in the push queue maintained by the push queue module; Step S4: Detecting that there is a push task in the push queue, start the thread and execute step S5; Step S5: calling the channel management module to obtain the push channel list; Step S6: Take out a channel management from the push queue; Step S7: Traverse the push channel list generated in step S5, and according to the configuration information of the push channel, call the corresponding message parser to convert the channel management retrieved in step S6 into the message format under the configuration policy, and execute the push protocol logic under the policy; Step S8: Complete the push and record the log.

7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the process event pushing method according to claim 6 are implemented.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the computer program is executed by a processor, the steps of the process event pushing method according to claim 6 are implemented.

Citation Information

Patent Citations

  • Process engine achieving method and system in service process

    CN104281906A

  • Method and system for realizing mobile widget engine with SNS function

    CN101827123A

  • Unified message pushing method and system based on event and rule management

    CN108809994A