Method and device for recording business public approval information in process engine
By building a public record table in the process engine and recording the approval information of the business process uniformly, the problem of dispersed approval information data is solved, and a more efficient development process and lower development costs are achieved.
Patent Information
- Application Number
- CN202411940769.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-04-11
AI Technical Summary
In the open source process engine, approval information data is scattered in multiple tables, and a unified recording and presentation mechanism is lacking, which leads to developers need to obtain information from each table, increasing development difficulty and cost.
A public record table is built to uniformly record the approval information of each business process, and generate approval information through user login information and business form information, record it in the public record table, and at the same time start the process engine to execute the business approval process, and update the public record table when the preset event triggering rule is met.
It realizes unified recording of business public approval information in the process engine, reducing development difficulty, improving development efficiency, and avoiding the complexity of obtaining information from multiple tables.
Smart Images

Figure CN119809563A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of process engines, and in particular to a method and device for recording business public approval information in a process engine. Background Art
[0002] In the open source process engine, the approval information data about the process is scattered in various tables (for example, the process instance table, the task instance table, and the reviewer table). For example, the approval information such as the initiator, the current review node, and the current reviewer are scattered in various tables. In addition, there is some unrecorded information such as the initiator's company, the initiator's department, the initiation time, the approval status, etc., and there is no unified function to display this information. When developing a business system, developers need to understand the underlying principles of the process engine and obtain the required approval information from various tables for subsequent business operations. For example, the approval status of business data, the current reviewer and the review node are displayed in the business list form. Each developer of the business system has to write code to process the approval information data in each table, which invisibly increases the development difficulty, prolongs the development cycle, and increases the development cost. Some projects have also developed a function to uniformly process this part of the data, but it cannot completely solve the problem of unified recording and processing. Summary of the invention
[0003] Based on the above statements, the present application provides a method and device for recording business public approval information in a process engine, which can uniformly record the approval information of business processes and reduce the difficulty of business system development.
[0004] According to a first aspect, the present application provides a method for recording business public approval information in a process engine, characterized by comprising: Constructing a public record table and storing it in the process database of the process engine, wherein the public record table is used to record the approval information of each business process; Acquire the business form information submitted by the user on the business system, and generate the approval information of the current business process according to the user login information of the current user and the business form information and record it in the public record table; According to the user login information of the current user and the business form information, the process engine is started to execute the corresponding business approval process; When the current business approval process meets the preset event triggering rules, the public record table is updated.
[0005] In one or more embodiments, when the current business approval process satisfies the event triggering rule, updating the public record table includes: When a process rollback event or a process end event occurs in the current business approval process, the approval status of the current business process in the public record table is modified to a corresponding rejection or approval.
[0006] In one or more embodiments, after obtaining the business form information submitted by the user on the business system, it also includes: generating business data according to the user login information and the business form information and recording it in a business table, and the business table is stored in the business database of the business system.
[0007] In one or more embodiments, further comprising: If the type of the business database is the same as the type of the process database, then associating the business table with the public record table according to the table name; According to the business ID and business type, the business data corresponding to each of the business form information and the approval information of the business process are organized and integrated to generate a business list form and display it to the user end.
[0008] In one or more embodiments, further comprising: If the type of the business database is different from the type of the process database, a microservice interface is set for the process engine; Obtain each business data of the business table in the business database, and obtain the approval information of each business process from the public record table of the process database by calling the microservice interface; According to the business ID and business type, the business data corresponding to each of the business form information and the approval information of the business process are organized and integrated to generate a business list form and display it to the user end.
[0009] In one or more embodiments, it also includes: setting the operation functions of the business list form, the functions including adding, modifying, deleting, list query and detail query.
[0010] In one or more embodiments, the fields of the public record table include: primary key, business ID, business type, applicant number, application date, applicant company number, applicant department number, review status, process definition number, process instance number, current review node and current reviewer.
[0011] According to a second aspect, the present application provides a device for recording business public approval information in a process engine, comprising: A construction module, used to construct a public record table and store it in the process database of the process engine, wherein the public record table is used to record the approval information of each business process; The acquisition and recording module is used to acquire the business form information submitted by the user on the business system, and generate the approval information of the current business process according to the user login information and the business form information and record it in the public record table; Start the approval module, which is used to call the process engine to execute the corresponding business approval process according to the user login information and the business form information; The updating module is used to update the public record table when the current business approval process meets the preset event triggering rules.
[0012] According to a third aspect, the present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and wherein the processor implements the steps of the method described in any of the aforementioned embodiments when executing the computer program.
[0013] According to a fourth aspect, the present application provides a storage medium having a computer program stored thereon, characterized in that when the computer program is executed by a processor, the steps of the method described in any of the aforementioned embodiments are implemented.
[0014] Compared with the prior art, the technical solution of this application has the following beneficial technical effects: In the above-mentioned method and device for recording business public approval information in the process engine, after the user submits the business form information on the business system, the approval information of the current business process is generated and recorded in the public record table according to the user login information and business form information of the current user, and the process engine is started to execute the corresponding business approval process. In this way, the approval information of each business process is uniformly recorded through the public record table, and each business approval process is monitored through preset event triggering rules. When developing a new business system, developers do not need to write code programs to obtain the required approval information from the process instance table, task instance table and reviewer table, thereby reducing development difficulty and improving development efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 A flowchart of a method for recording business public approval information in a process engine provided in an embodiment of the present application; Figure 2 A schematic diagram of the principle of a device for recording business public approval information in a process engine provided in an embodiment of the present application; Figure 3 A schematic diagram of the principles of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0016] In order to facilitate understanding of the present application, the present application will be described more fully below with reference to the relevant drawings. Embodiments of the present application are provided in the drawings. However, the present application can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present application more thorough and comprehensive.
[0017] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application.
[0018] See also Figure 1 , Figure 1 A method for recording business public approval information in a process engine provided by an embodiment of the present application is shown, comprising the following steps: S10, construct a public record table and store it in the process database of the process engine. The public record table is used to record the approval information of each business process; S20, obtaining the business form information submitted by the user on the business system, and generating the approval information of the current business process according to the user login information and business form information of the current user and recording it in the public record table; S30, starting the process engine to execute the corresponding business approval process according to the user login information and business form information of the current user; S40: When the current business approval process meets the preset event triggering rules, the public record table is updated.
[0019] It should be noted that the process engine is a workflow management system, which belongs to the underlying support platform. It can automatically coordinate the execution order of different tasks and the allocation of resources according to predefined process models and rules to realize the automated management of business processes. A complete process engine usually includes major functional modules such as process definition, process instantiation, task scheduling, and historical audit. The process database refers to a database used to store and manage process-related data. The process engine records and manages process definitions, process instances, tasks, historical records and other data through the process database. Business system refers to an information system used by an enterprise or organization to manage and support its core business processes, such as financial management system (ERP), customer relationship management system (CRM), human resource management system (HRM), office automation system (OA), etc. Multiple business systems of an enterprise can be integrated into a process engine and share a set of user systems. When a general business system determines to use a certain process engine, it only needs user login information including user number, company number and department number.
[0020] Specifically, constructing a public record table includes determining table fields and operation functions. The public record table is stored in a process database, and the approval information of each business process from each business system is recorded through the public record table. In this embodiment, the fields of the public record table include: primary key, business ID, business type, applicant number, application date, applicant company number, applicant department number, process status, process definition number, process instance number, current review node and current reviewer, so as to uniformly record the approval information of each business process, without obtaining the required approval information from the process instance table, task instance table and reviewer table.
[0021] When a user fills out and submits a business form on a business system, such as a leave form, a car form, a contract form, etc. The server obtains the business form information, which includes the business ID, business type, and business data. According to the user login information, business ID, and business type, the corresponding business approval process is matched in the process definition table of the process database to generate the approval information of the current business process, which includes the business ID, business type, applicant number, application date, applicant company number, applicant department number, review status, process definition number, process instance number, current review node, and current reviewer, where the applicant is also the user. Then the approval information of the current business process is inserted into the public record table as a new data, and the review status of the current business process is under review. It should be noted that when a user fills out a business form on a business system and clicks Save, a new business process approval information will also be inserted into the public record table, and its review status is Draft.
[0022] At the same time, according to the user login information and business form information of the current user, the process engine is started to execute the corresponding business approval process, that is, according to the applicant number, the applicant company number, the applicant department number, the business ID and the business type, the corresponding business approval process is matched in the process definition table of the process database, and the process engine is started to execute the business approval process. Further, during the execution of the current business approval process, if the preset event triggering rule is met, the public record table is updated, wherein the event triggering rule refers to the event rule that triggers the modification of the approval information of the current business process, for example, if a process rollback event or a process end event occurs, the review information of the current business process in the public record table is updated, such as the review status, the current review node and the current reviewer. In this way, the public record table is used to uniformly record the various approval information that needs to be displayed to the user end, and the review information of each business approval process is tracked. When developing a new business system, it is not necessary for developers to write code programs to obtain the required approval information from the process instance table, the task instance table and the reviewer table, thereby reducing the development difficulty and improving the development efficiency.
[0023] In some embodiments, when the current business approval process meets the event triggering rule, the public record table is updated, including: When a process rollback event or a process end event occurs in the current business approval process, the approval status of the current business process in the public record table is modified to the corresponding rejection or approval.
[0024] Specifically, during the execution of the current business approval process, if a process rollback event occurs, it indicates that a reviewer in the current business approval process clicked on the disagree or rejection operation, and the approval failed. In this case, the approval status of the current business process in the public record table is modified to not passed or rejected, and the current review node and the current reviewer are updated. During the execution of the current business approval process, if a process end event occurs, it indicates that the last reviewer in the current business approval process clicked on the agree or pass operation, and the approval passed. In this case, the approval status of the current business process in the public record table is modified to passed, and the current review node and the current reviewer are updated. In this way, by presetting event trigger rules for the process engine, the business approval process is monitored, and the review status of each business approval process is tracked, so as to timely update the approval information of the corresponding business process in the public record table.
[0025] In some embodiments, after obtaining the business form information submitted by the user on the business system, the method of this embodiment further includes: generating business data according to the user login information and the business form information and recording it in a business table, and the business table is stored in the business database of the business system.
[0026] It should be noted that business data refers to specific business items filled in by the user. For example, the user fills in a car use form and specifically fills in business data such as car use time, car use reason, number of car users, car use number, etc. In this embodiment, a business table is stored in the business database of each business system, and the business tables of different business systems are different, for example, the table fields are different.
[0027] Specifically, the user login information and business form information are used to generate business data and recorded in the business table, which is stored in the business database of the business system. In this way, the business table records detailed business data, which facilitates the subsequent integration of business data and approval information to display the business list form.
[0028] In some embodiments, the method of this embodiment further includes: If the type of the business database is the same as that of the process database, the business table and the public record table are associated according to the table name. According to the business ID and business type, the business data corresponding to each business form information and the approval information of the business process are organized and integrated to generate a business list form and display it to the user end.
[0029] Specifically, if the type of the business database is the same as that of the process database, for example, both are MySQL databases, the business table and the public record table can be directly associated according to the table name (for example, schema.table name), and then the business data corresponding to each business form information and the approval information of the business process are integrated and packaged according to the business ID and business type, and a business list form is generated and displayed to the user end. The business list form is used for users to query, modify, etc. In this way, when the type of the business database is the same as that of the process database, it is convenient for developers to directly associate the business table with the public record table, reducing the difficulty of development.
[0030] In some embodiments, the method of this embodiment further includes: If the type of the business database is different from that of the process database, a microservice interface is set for the process engine. The business data of each business table in the business database is obtained, and the approval information of each business process is obtained from the public record table of the process database by calling the microservice interface. According to the business ID and business type, the business data corresponding to each business form information and the approval information of the business process are organized and integrated to generate a business list form and display it to the user end.
[0031] Specifically, if the type of the business database is different from the type of the process database, for example, one of the databases is a MySQL database and the other is an Oracle database, the business table and the public record table cannot be directly associated. Add an externally exposed microservice interface to the process engine, such as a feign interface. By calling the microservice interface, the approval information of each business process is obtained from the public record table of the process database, and then the various business data of the business table in the business database are obtained. Then, according to the business ID and business type, the business data corresponding to each business form information and the approval information of the business process are integrated and packaged, and a business list form is generated and displayed to the user end. The business list form is used for users to query, modify, and other operations. In this way, when the type of the business database is different from the type of the process database, developers can integrate and package the business data in the business table and the approval information of the business process in the public record table by calling the microservice interface, reducing the difficulty of development and speeding up the development cycle.
[0032] In some embodiments, the method of this embodiment further includes: setting operation functions of the service list form, the operation functions including adding, modifying, deleting, list query and detail query.
[0033] Specifically, in this embodiment, the business list form displays partial approval information (for example, review status) and business data of a series of business processes. The detailed business data and approval information corresponding to the business ID can be viewed by querying the details through the business ID. In addition, the list can be queried by business type to query the approval information corresponding to the same business type. Users can add or modify the relevant data of one or more business processes in the business list form according to their needs and user permissions, or edit or delete the relevant data of one or more business processes according to actual needs. In this way, it is convenient for users to operate the business list form, and the operability and flexibility of the business list form are improved.
[0034] In one embodiment, the present application provides a device for recording business public approval information in a process engine, and the device for recording business public approval information in a process engine corresponds one-to-one to a method for recording business public approval information in a process engine in the above embodiment. Figure 2 As shown, the device 200 for recording business public approval information in a process engine includes a construction module 210, an acquisition and recording module 220, a calling module 230 and an updating module 240. The detailed description of each functional module is as follows: Construction module 210, used to construct a public record table and store it in the process database of the process engine, the public record table is used to record the approval information of each business process; The acquisition and recording module 220 is used to acquire the business form information submitted by the user on the business system, and generate the approval information of the current business process according to the user login information and the business form information and record it in the public record table; The start approval module 230 is used to start the process engine to execute the corresponding business approval process according to the user login information and business form information; The updating module 240 is used to update the public record table when the current business approval process meets the preset event triggering rules.
[0035] In some embodiments, the present application also provides a computer device, which may be a server, and its internal structure diagram may be as follows: Figure 3As shown. The computing device includes a processor, a memory, a network interface and a database connected via a system bus. The processor of the computing device is used to provide computing and control capabilities. The memory of the computing device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The process database of the computing device is used to store public record tables, user tables, process instance tables, task instance tables, reviewer tables, process definition tables, etc., and the business database is used to store business tables. The network interface of the computing device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, the steps of a method for recording business public approval information in a process engine are implemented in the above-mentioned embodiment.
[0036] In some embodiments, the present application further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the computer program implements the steps of a method for recording business public approval information in a process engine in the above embodiment.
[0037] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0038] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims
1. A method for recording business public approval information in a process engine, characterized in that: include: Constructing a public record table and storing it in the process database of the process engine, wherein the public record table is used to record the approval information of each business process; Acquire the business form information submitted by the user on the business system, and generate the approval information of the current business process according to the user login information of the current user and the business form information and record it in the public record table; According to the user login information of the current user and the business form information, the process engine is started to execute the corresponding business approval process; When the current business approval process meets the preset event triggering rules, the public record table is updated.
2. The method for recording business public approval information in a process engine according to claim 1, characterized in that: When the current business approval process meets the event triggering rule, updating the public record table includes: When a process rollback event or a process end event occurs in the current business approval process, the approval status of the current business process in the public record table is modified to a corresponding rejection or approval.
3. The method for recording business public approval information in a process engine according to claim 1, characterized in that: After obtaining the business form information submitted by the user on the business system, the method further includes: generating business data according to the user login information and the business form information and recording the business data in a business table, wherein the business table is stored in a business database of the business system.
4. The method for recording business public approval information in a process engine according to claim 3, characterized in that: Also includes: If the type of the business database is the same as the type of the process database, then associating the business table with the public record table according to the table name; According to the business ID and business type, the business data corresponding to each of the business form information and the approval information of the business process are organized and integrated to generate a business list form and display it to the user end.
5. The method for recording business public approval information in a process engine according to claim 3, characterized in that: Also includes: If the type of the business database is different from the type of the process database, a microservice interface is set for the process engine; Obtain each business data of the business table in the business database, and obtain the approval information of each business process from the public record table of the process database by calling the microservice interface; According to the business ID and business type, the business data corresponding to each of the business form information and the approval information of the business process are organized and integrated to generate a business list form and display it to the user end.
6. The method for recording business public approval information in a process engine according to claim 4 or 5, characterized in that: Also includes: Set the operation functions of the business list form, including adding, modifying, deleting, list query and detail query.
7. The method for recording business public approval information in a process engine according to claim 4 or 5, characterized in that: The fields of the public record table include: primary key, business ID, business type, applicant number, application date, applicant company number, applicant department number, review status, process definition number, process instance number, current review node and current reviewer.
8. A device for recording business public approval information in a process engine, characterized in that: include: A construction module, used to construct a public record table and store it in the process database of the process engine, wherein the public record table is used to record the approval information of each business process; The acquisition and recording module is used to acquire the business form information submitted by the user on the business system, and generate the approval information of the current business process according to the user login information and the business form information and record it in the public record table; Start the approval module, which is used to call the process engine to execute the corresponding business approval process according to the user login information and the business form information; The updating module is used to update the public record table when the current business approval process meets the preset event triggering rules.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.