Method and system for integrating main and sub-process data

By establishing a master child process relationship table outside the process engine and adding a parent-child relationship, the problem that the existing process engine cannot start multiple subprocess instances and subprocesses at the same time lack independent business data, realizing independence and unity between processes. Functional expansion was performed.

CN119398478APending Publication Date: 2025-02-07QIMING INFORMATION TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411704479.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-26
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

When existing process engines process multiple subprocesses, they cannot start multiple subprocess instances at the same time, and the subprocesses lack independent business data, resulting in difficulty in data parsing and querying.

Method used

By establishing a master process relationship table outside the process engine and adding parent-child relationships to process instances during the run period, all processes can have independent business data objects and conduct association queries through master process relationships.

Benefits of technology

The independence and unity between processes are realized. Each process has its own business meaning, and the functional expansion of the master process is realized without modifying the source code of the process engine.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119398478A_ABST
    Figure CN119398478A_ABST
Patent Text Reader

Abstract

The invention discloses a main and sub-process data integration method and system, and the method comprises the steps: S1, starting data integration, starting sub-process nodes in sequence, and monitoring the nodes in sequence; s2, starting a monitoring service, and querying whether the current node flow id exists in the main and sub-flow relation table or not; if not, judging that the node corresponds to a conventional flow; s3, if the task state exists, judging whether the task state of the process message is creation or completion; s4, if the state is the creation state, uploading sub-process task information; and if the state is the completion state, updating the sub-process task state. According to the scheme, the mutual independence and unification of the processes are realized by processing the main and sub-process relationship between the process instances outside the process engine.
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 data processing, and in particular to a method and system for integrating main and sub-process data. Background Art

[0002] The operation of any process is meaningful only if it contains business data. Currently, mainstream open source process engines such as activiti, flowable, and communida all have sub-process functions, but sub-processes do not have independent business data. This requires that all business data must be integrated into the main process. A problem this brings is that if a process has multiple sub-processes, how to parse the overall data into each sub-process so that each sub-process has its business significance.

[0003] With the continuous development of the economy and the continuous improvement of management systems, the management processes of enterprises and governments are no longer simple single processes, and there are master-sub-process relationships between processes. For example, a purchase application contains ten purchase items. When the purchase application process reaches the node of generating a purchase order, each purchase item must generate a purchase order process. After all purchase order processes are passed, it is necessary to return to the purchase application process for purchase organization allocation. In this scenario, each purchase order process is actually a sub-process of the purchase application process, and independent purchase order data will be loaded. And it is necessary to query all the purchase order process data to which it belongs through the purchase application process.

[0004] The current activiti process engine uses a sub-process as part of the main process, with independent start nodes and end nodes, that is, it can be used as a complete process alone. One problem with this is that it is impossible to start multiple process instances at the same time. The scenario is that the purchase application above generates multiple purchase orders. Therefore, the shortcomings of the existing technology are: 1. The sub-process has no independent business data.

[0005] 2. It is not possible to start multiple sub-process instances at the same time. Summary of the invention

[0006] In response to the above technical problems, the present invention provides a method and system for main-sub-process data integration, abandoning the sub-process implementation method of the original activiti process engine. The processes are all independent relationships, and a parent-child relationship is added to its process instance during runtime, so that all processes can have their business data objects and can be associated and queried through the main-sub-process relationship.

[0007] The present invention is achieved by adopting the following technical solutions: In a first aspect, a method for integrating master-subprocess data comprises the following steps: Step S1: Data integration starts, sub-process nodes start to start in sequence, and each node is monitored in turn; Step S2: Start the monitoring service to check whether the current node process ID exists in the main-sub-process relationship table; if not, determine that the node corresponds to a regular process; Step S3: If it exists, determine whether the task status in the process message is creation or completion; Step S4: If it is in the creation state, upload the sub-process task information; if it is in the completion state, update the sub-process task status.

[0008] Specifically, step S1 also includes: after the sub-process node starts the process and ends, the start process ends monitoring.

[0009] Specifically, the process end monitoring includes: querying whether the node process id exists in the main-sub-process relationship table, if not, determining that the node corresponds to a regular process; if so, reading the sub-process completion strategy and determining whether it meets the strategy standards, if so, returning to step S1 to restart data integration.

[0010] On the other hand, a system for integrating main and sub-process data is provided, which is used to implement the main and sub-process data integration method, and the system includes the following modules: Front-end module: develop end-to-end process configuration unit, add end-to-end nodes and end-to-end configuration related pages; Table structure modification module: when publishing a process, the end-to-end configuration of the manual nodes in the process is saved to the extended information table, and fields are added to the main-sub-process relationship table and saved; Interface module: set up sub-process information integration interface, three-party system process startup interface and front-end graphic data interface; Judgment algorithm module: set the judgment algorithm to judge the node definition ID and node process ID in data integration; Process variable structure modification module: Modify the document structure according to the multiple sub-process requirements of each end-to-end node; Engine message transformation module: add process variable messages.

[0011] Specifically, the sub-process information integration interface of the interface module is as follows: adding parameters and saving them to the main-sub-process relationship table, and directly updating the business objects passed by the business into the main process variables; the third-party system process startup interface is as follows: directly using the sub-process business identifier to determine the process template name and application category, removing the variable update and query links and transferring them to the sub-process integration interface.

[0012] Specifically, the judgment of the algorithm of the judgment algorithm module includes: judging whether the node definition id of the current task has a sub-process trigger configuration in the task extension information table, and if so, calling the service to start.

[0013] Specifically, the judgment of the algorithm module algorithm also includes: judging whether the process ID of the current node exists in the main-sub-process relationship table, and if so, uploading the task information to the sub-process task table.

[0014] Specifically, the judgment of the algorithm module algorithm also includes: judging whether the process ID in the message exists in the main-sub-process relationship table, if so, obtaining the result of the process end, calling the sub-process to complete the interface for transmitting the result to the main process.

[0015] The beneficial effect of the present invention is that the present invention breaks away from the limitation of the native engine to realize the main-sub-process mode, and realizes the independence and unity of the processes by establishing the main-sub-process relationship between the process instances outside the process engine. Each process has its own business meaning, and after the merger, it is a full life cycle business. Without modifying the source code of the process engine, the main-sub-process is externalized, which is a scientific and non-invasive way to expand the engine function. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying creative work.

[0017] Figure 1 This is a flow chart of main-sub-process data integration in an embodiment of the present invention; Figure 2 The figure is a schematic diagram of a business scenario in an embodiment of the present invention. DETAILED DESCRIPTION

[0018] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.

[0019] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0020] The following is combined with Figure 1-2, some embodiments of the present invention are described in detail. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0021] The present invention proposes a method and system for integrating master and sub-process data. In one embodiment, a method for integrating master and sub-process data, such as Figure 1 As shown, the following steps are included: Step S1: Data integration starts, sub-process nodes start to start in sequence, and each node is monitored in turn; Step S2: Start the monitoring service to check whether the current node process ID exists in the main-sub-process relationship table; if not, determine that the node corresponds to a regular process; Step S3: If it exists, determine whether the task status in the process message is creation or completion; Step S4: If it is in the creation state, upload the sub-process task information; if it is in the completion state, update the sub-process task status.

[0022] In this embodiment, step S1 further includes: after the sub-process node starts the process and ends, the start process ends monitoring.

[0023] In this embodiment, process end monitoring includes: querying whether the node process id exists in the main-sub-process relationship table, if not, determining that the node corresponds to a regular process; if so, reading the sub-process completion strategy and determining whether it meets the strategy standards, if so, returning to step S1 to restart data integration.

[0024] In another embodiment, the present invention also proposes a system for integrating main and sub-process data, the system comprising the following modules: Front-end module: develop end-to-end process configuration unit, add end-to-end nodes and end-to-end configuration related pages; Table structure modification module: when publishing a process, the end-to-end configuration of the manual nodes in the process is saved to the extended information table, and fields are added to the main-sub-process relationship table and saved; Interface module: set up sub-process information integration interface, three-party system process startup interface and front-end graphic data interface; Judgment algorithm module: set the judgment algorithm to judge the node definition ID and node process ID in data integration; Process variable structure modification module: Modify the document structure according to the multiple sub-process requirements of each end-to-end node; Engine message transformation module: add process variable messages.

[0025] In this embodiment, the sub-process information integration interface of the interface module is specifically: adding parameters and saving them to the main-sub-process relationship table, and directly updating the business objects passed by the business to the main process variables; the three-party system process startup interface is specifically: directly using the sub-process business identifier to determine the process template name and application classification, removing the variable update and query links and transferring them to the sub-process integration interface.

[0026] In this embodiment, the judgment of the algorithm module algorithm includes: judging whether the node definition id of the current task has a sub-process trigger configuration in the task extension information table, and if so, calling the service to start.

[0027] In this embodiment, the judgment of the algorithm module algorithm also includes: judging whether the process id of the current node exists in the main-sub-process relationship table, and if so, uploading the task information to the sub-process task table.

[0028] In this embodiment, the judgment of the algorithm module algorithm also includes: judging whether the process ID in the message exists in the main-sub-process relationship table, if so, obtaining the result of the process end, calling the sub-process to complete the result transfer interface to the main process.

[0029] In one embodiment, the present invention abandons the sub-process implementation method of the original activiti process engine. The processes are all independent relationships. The so-called main sub-process only adds a parent-child relationship to its process instance during runtime. In this way, all processes can have their business data objects, and can be associated and queried through the main sub-process relationship, such as Figure 2 shown.

[0030] The location and function of each module are as follows: 1. Front-end: Develop end-to-end process configuration unit; add end-to-end nodes. The specific functions of the entire end-to-end configuration related pages can be found in the page prototype.

[0031] (II) Table structure modification: Task extension information table: When the process is released, the end-to-end configuration of the manual nodes in the process is saved in the extension information table; Main-sub-process relationship table: Add taskid and taskname fields for storage.

[0032] (III) Interface: Sub-process information integration interface: add parameters taskid and taskname to save into the main-sub-process relationship table, and directly update the business objects passed by the business into the main process variables; Third-party system process startup interface: no longer judge the process template name and application category, directly use the sub-process business identifier to judge, remove the variable update and query links, this process is done in the sub-process integration interface.

[0033] Front-end graphic data interface: Change the original servicecallbackid related data to taskid, taskname.

[0034] (IV) qfc-enginelink (judgment algorithm): message_send: (1) Determine whether the node definition id of the current task has a sub-process trigger configuration in the task extension information table. If so, call the service to start; (2) Determine whether the process id of the current node exists in the main-sub-process relationship table. If so, upload the task information to the sub-process task table.

[0035] process_listener: Determine whether the process id in the message exists in the main-sub-process relationship table. If so, get the result of the process end (end, rejecttoStart) and call the sub-process to complete the interface for passing the result to the main process.

[0036] (V) Modification of process variable structure: Since each end-to-end node will have multiple sub-processes, it means that each document will have multiple objects. For example, a purchase order will produce multiple original structures. If they are all defined with purorder, they cannot be distinguished and will be overwritten. Therefore, purorder is changed to an array. Each element in the array is an object of a purchase order.

[0037] (VI) Engine message transformation: task message, task message adds process variable message in execution.

[0038] For the aforementioned embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the order of the actions described, because according to the present application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily required by the present application.

[0039] The above embodiments describe the basic principles and main features of the present invention and the advantages of the present invention. Those skilled in the art should understand that the present invention is not limited by the above embodiments, and the above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the changes and modifications made by those skilled in the art shall be within the scope of protection of the appended claims of the present invention without departing from the spirit and scope of the present invention.

Claims

1. A method for integrating master and sub-process data, characterized in that: The following steps are involved: Step S1: Data integration starts, sub-process nodes start to start in sequence, and each node is monitored in turn; Step S2: Start the monitoring service to check whether the current node process ID exists in the main-sub-process relationship table; if not, determine that the node corresponds to a regular process; Step S3: If it exists, determine whether the task status in the process message is created or completed; Step S4: If it is in the creation state, upload the sub-process task information; If it is in the completed state, update the sub-process task status.

2. A method for integrating master-subprocess data as claimed in claim 1, characterized in that: Step S1 also includes: after the sub-process node starts the process and ends, the start process ends monitoring.

3. A method for integrating master-subprocess data as claimed in claim 2, characterized in that: The process end monitoring includes: querying whether the node process id exists in the main-sub-process relationship table, if not, determining that the node corresponds to a regular process; if so, reading the sub-process completion strategy and determining whether it meets the strategy standards, if so, returning to step S1 to restart data integration.

4. A system for integrating master and sub-process data, used to implement a method for integrating master and sub-process data as claimed in any one of claims 1 to 3, characterized in that: The system includes the following modules: Front-end module: develop end-to-end process configuration unit, add end-to-end nodes and end-to-end configuration related pages; Table structure modification module: when publishing a process, the end-to-end configuration of the manual nodes in the process is saved to the extended information table, and fields are added to the main-sub-process relationship table and saved; Interface module: set up sub-process information integration interface, three-party system process startup interface and front-end graphic data interface; Judgment algorithm module: set the judgment algorithm to judge the node definition ID and node process ID in data integration; Process variable structure modification module: Modify the document structure according to the multiple sub-process requirements of each end-to-end node; Engine message transformation module: add process variable messages.

5. A system for integrating master and sub-process data as claimed in claim 4, characterized in that: The sub-process information integration interface of the interface module is specifically as follows: adding parameters and saving them to the main-sub-process relationship table, and directly updating the business objects passed by the business to the main process variables; the three-party system process startup interface is specifically as follows: directly using the sub-process business identifier to determine the process template name and application category, removing the variable update and query links and transferring them to the sub-process integration interface.

6. A system for integrating master and sub-process data as claimed in claim 4, characterized in that: The judgment of the algorithm of the judgment algorithm module includes: judging whether the node definition id of the current task has a sub-process trigger configuration in the task extension information table, and if so, calling the service to start.

7. A system for integrating master and sub-process data as claimed in claim 6, characterized in that: The judgment of the algorithm module algorithm also includes: judging whether the process ID of the current node exists in the main-sub-process relationship table, and if so, uploading the task information to the sub-process task table.

8. A system for integrating master and sub-process data as claimed in claim 7, characterized in that: The judgment of the algorithm module algorithm also includes: judging whether the process ID in the message exists in the main-sub-process relationship table, if so, obtaining the result of the process end, calling the sub-process to complete the result transfer interface to the main process.