Bpm form data third party storage method for visualizing drag and drop connections
Patent Information
- Application Number
- CN202611179867.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-05
- Publication Date
- 2026-10-27
AI Technical Summary
若仍按目标数据表中的原字段位置生成参数列表,或者删除未变化字段后未同步调整其后字段的参数位置,容易使字段列表和参数列表发生错位,导致字段值写入错误字段;若重复写入节点关联的全部字段,又会增加无效数据库操作,并可能覆盖其他节点已写入的数据
[0016]本发明可视化拖拽连线的BPM表单数据第三方存储方法的技术效果和优点:本发明在流程开始节点提交时即按照拖拽映射将表单数据写入目标数据表,并记录定位字段值,使后续写入节点能够准确更新首次写入形成的同一目标记录。后续节点完成时,结合节点位置、实际分支、来源BPM表单字段的最近修改顺序及第三方数据库字段的最近写入完成顺序,确定数据库写入字段范围,从而排除最近成功写入后未发生变化的字段,减少重复写入及非当前节点字段被覆盖的情况。针对动态排除字段造成的字段位置变化,本发明统计各待写入字段之前未进入写入范围的字段数量,并据此重新确定参数位置,使字段列表中的第三方数据库字段与参数列表中的字段值保持准确对应,降低参数错位导致数据写入错误字段的概率。对于多个BPM表单字段共同生成一个第三方数据库字段的情况,任一来源字段发生变化时重新组合完整字段值,避免局部字段值覆盖组合字段。更新成功后记录实际更新字段及写入完成顺序,为后续节点继续判断字段变化提供依据,由此形成首次写入、增量更新及结果反馈的连续处理闭环。
Smart Images

Figure CN122985901A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and more specifically, to a third-party storage method for BPM form data with visual drag-and-drop connections. Background Technology
[0002] Business Process Management (BPM) systems typically use electronic forms to carry business data and utilize a process engine to control the flow of forms between nodes such as start, approval, branching, and completion. To enable process data to enter external business systems, existing BPM platforms usually pre-configure the mapping relationship between BPM form fields and third-party database fields, and generate database write instructions when a process node is completed, writing the corresponding field values to the third-party database.
[0003] In some applications, the target record needs to be created in the third-party database when the initial node submits the form. Subsequent nodes or conditional branches then update different fields according to their respective configurations. Since different nodes correspond to different field ranges, and some source BPM form fields haven't been modified since the most recent successful write, the third-party database fields actually involved in the update will dynamically change. If the parameter list is still generated according to the original field positions in the target data table, or if the parameter positions of subsequent fields are not adjusted synchronously after deleting unchanged fields, the field list and parameter list are easily misaligned, leading to incorrect field values being written. Repeatedly writing all fields associated with a node will increase invalid database operations and may overwrite data already written by other nodes.
[0004] Furthermore, a third-party database field may be generated by combining multiple BPM form fields, and any change to any source field requires reconstructing the complete field value. Therefore, a third-party storage method is needed that can accurately determine the field being written and maintain the correspondence between the field list, parameter list, and target record by combining node and branch configurations, field modification records, and database write records. Summary of the Invention
[0005] To overcome the aforementioned deficiencies of the prior art, embodiments of the present invention provide a third-party storage method for BPM form data with visual drag-and-drop connections, in order to solve the problems mentioned in the background art.
[0006] To achieve the above objectives, the present invention provides the following technical solution: A third-party method for storing BPM form data that visualizes drag-and-drop connections includes the following steps: obtaining drag-and-drop mappings and node database write actions; When the starting node is submitted, the target data table is written according to the mapping. After successful submission, the location field value, the third-party database fields written, and the writing completion order are recorded. When subsequent nodes are completed, determine whether to continue database write analysis based on the write action activation status and branch results. When the database write analysis continues, determine the fields to be analyzed, compare the most recent modification order of the source BPM form fields corresponding to the fields to be analyzed with the most recent write completion order of the fields, and add the fields to be analyzed that have no successful records or whose source fields have been modified after the most recent write to the write field range. For fields within the range, count the number of preceding fields that are not within the range to be analyzed, and subtract this number from the sorted order to obtain the parameter position; A field list and a parameter list are generated based on the parameter position. An update command is generated and executed by combining the value of the located field. Upon successful execution, the updated fields and the order in which they were written are recorded.
[0007] In a preferred embodiment, determining whether to continue database write analysis based on the write action's enabled status and the branch result includes: The node following the configuration node database write action is determined as the subsequent write node; Read the enabled status of the database write action of the corresponding node for the subsequent write node, the associated conditional branch identifier, and the actual conditional branch identifier corresponding to the current process instance; When the enabled status is enabled, and subsequent write nodes are not associated with conditional branches, or the associated conditional branch identifier contains the actual conditional branch identifier, the database write analysis results are obtained. When the enabled status is disabled, or when the enabled status is enabled but the associated conditional branch identifier does not contain the actual conditional branch identifier, the database write result is stopped.
[0008] In a preferred embodiment, after obtaining the results of the continued database write analysis, the fields to be analyzed are determined, including: Read the target data table configured for subsequent write nodes, and limit the read range for enabling drag-and-drop mapping according to the target data table identifier; When subsequent write nodes are not associated with condition branches, the drag-and-drop mapping associated with subsequent write nodes is retained; When writing subsequent nodes to associated conditional branches, retain the drag-and-drop mapping that is associated with both the subsequent write nodes and the actual conditional branches. By enabling drag-and-drop mapping based on the field identifiers of the third-party databases to be merged and retained, the third-party database fields corresponding to each merge group are identified as fields to be analyzed, and the source BPM form fields corresponding to each field to be analyzed are determined.
[0009] In a preferred embodiment, the most recent modification order of the source BPM form field corresponding to the field to be analyzed is compared with the most recent write completion order of that field. Fields to be analyzed that have no successful records or whose source fields have been modified after the most recent write are added to the write field range. This includes: after the start node is successfully written and a target record is formed, for each field to be analyzed, from the initial field records and field modification records corresponding to each source BPM form field in the current process instance, the record with the largest sequence number is selected, and the sequence number of the selected record is determined as the most recent modification order; according to the current process instance identifier, the third-party database identifier, the target data table identifier, and the third-party database field identifier, from the database write records with the largest write completion order, the write completion order of the selected record is determined as the most recent write completion order; if no most recent write completion order is found, or if the most recent modification order of at least one source BPM form field is later than the most recent write completion order, the corresponding field to be analyzed is added to the write field range; if the most recent modification order of each source BPM form field is not later than the most recent write completion order, the corresponding field to be analyzed is excluded.
[0010] In a preferred embodiment, the number of preceding fields not included in the analysis range is counted, and the parameter position is obtained by subtracting this number from the sorted order, including: Arrange all fields to be analyzed in the order of the fields in the target data table, and determine the order of each field to be analyzed starting from the first field. For each third-party database field within the write field range, count the number of fields to be analyzed that are ranked before the current field but are not included in the write field range. Subtract the number of fields to be analyzed from the current field's sort order, and use the result of the subtraction to determine the parameter position of the current field.
[0011] In a preferred embodiment, a field list and a parameter list are formed according to parameter position, and an update instruction is generated and executed by combining the location field value, including: Generate field values for each third-party database field within the specified field range based on drag-and-drop mapping; The third-party database fields are arranged according to their parameter positions to form a field list, and the corresponding field values are read according to the field list to form a parameter list; Save the correspondence between the field identifiers of the third-party database and the positions of the updated field parameters; Read the location field and its value from the successful write record of the start node, and form parameterized query conditions based on the location field and its value; When the query result uniquely identifies a target record, an update instruction is generated based on the target data table, field list, parameter list, and parameterized query conditions, and the update instruction is executed through the database connection. The update will stop if the query results are zero or more than one. After a successful update, record the identifiers of the third-party database fields that were actually updated and the order in which they were written.
[0012] In a preferred embodiment, obtaining the drag-and-drop mapping includes: Connect to a third-party database, read the target data table and the fields from the third-party database, and display the BPM form fields and the third-party database fields on both sides of the visual configuration interface. Drag and drop lines between response fields to save BPM form field identifiers, third-party database field identifiers, field conversion rules, null value filtering rules, and enabled status; When multiple drag-and-drop lines point to the same third-party database field, the arrangement order, fixed characters, and field separators of the fields from each source BPM form are saved. Associate the drag-and-drop connection with the node database write action; when the node database write action is associated with a conditional branch, associate the drag-and-drop connection with the corresponding conditional branch.
[0013] In a preferred embodiment, when multiple drag-and-drop lines point to the same third-party database field, and the corresponding third-party database field has entered the write field range, a third-party database field value is generated, including: The source BPM form fields for generating field values are determined according to the null value filtering rules; Read the current field value of all fields from the source BPM form that participated in generating the field values; Each current field value is processed according to the field conversion rules, and the processing results are combined according to the sorting order, fixed characters and field separators to generate complete third-party database field values.
[0014] In a preferred embodiment, when the database write result indicates that the field type is inconsistent or the field length exceeds the limit: When the database write result contains the field name of a third-party database, determine the field that failed to write based on the field name; When the database write result does not contain field names but contains the position of the updated field parameters, the field that failed to write is determined according to the correspondence between the field identifier of the third-party database and the position of the updated field parameters; If the database write result contains neither field names nor the position of the updated field parameters, record the database write failure and stop error handling for the single field; After identifying the fields that failed to write, drag and drop to determine the corresponding source BPM form fields. When field types are inconsistent, determine the source BPM form fields that do not meet the target data type according to the field conversion rules and generate input type restrictions; When the field length exceeds the limit, an input length limit is generated based on the allowed length of the field that failed to be written.
[0015] In a preferred embodiment, when a write failure field corresponds to multiple source BPM form fields and the field length exceeds the limit: When the most recent write completion order is found, select the source BPM form field with the largest sort order number from the source BPM form fields whose values were generated in this instance and whose most recent modification order is later than the most recent write completion order, and use it as the field to be corrected. If the most recent write completion order is not found, select the BPM form field with the largest sort order number from all the source BPM form fields generated from the field values of this transaction as the field to be corrected. The input length limit of the field to be corrected is obtained by subtracting the sum of the lengths of the processing results of other source BPM form fields, fixed characters, and field separators from the allowed length of the field that failed to write. Retrieve the field values corrected according to the input length limit and generate a new field modification record; Based on the new field modification record, the write field range is re-formed, the parameter positions and the correspondence between the third-party database field identifier and the updated field parameter position are redefined, a new update instruction is generated and executed, and after the update is successful, the actual updated third-party database field identifier and the new write completion order are recorded.
[0016] The technical effects and advantages of this invention's visual drag-and-drop connection method for third-party storage of BPM form data are as follows: At the start of the process, the invention writes form data to the target data table according to the drag-and-drop mapping and records the location field values, ensuring that subsequent write nodes accurately update the same target record formed during the initial write. Upon completion of subsequent nodes, the invention determines the database write field range by combining the node position, actual branch, the most recent modification order of the source BPM form fields, and the most recent write completion order of the third-party database fields. This excludes fields that have not changed since the most recent successful write, reducing duplicate writes and the overwriting of fields not currently in the current node. To address field position changes caused by dynamically excluded fields, the invention counts the number of fields that were not previously included in the write range for each field to be written and re-determines the parameter positions accordingly. This ensures that the third-party database fields in the field list accurately correspond to the field values in the parameter list, reducing the probability of data being written to incorrect fields due to parameter misalignment. For cases where multiple BPM form fields jointly generate a single third-party database field, any change in any source field recombines the complete field values, preventing partial field values from overwriting the combined field. After a successful update, the actual updated fields and the order in which they were written are recorded, providing a basis for subsequent nodes to continue judging field changes, thus forming a continuous processing closed loop of initial write, incremental update and result feedback. Attached Figure Description
[0017] Figure 1 This is the overall flowchart of the third-party storage method for BPM form data visualization and drag-and-drop connection according to the present invention; Figure 2 This is a schematic diagram illustrating the drag-and-drop mapping and node database write operation configuration of the present invention; Figure 3 This is a schematic diagram illustrating the subsequent write nodes and conditional branch judgments of this invention; Figure 4 This is a schematic diagram illustrating the determination of the database write field range and parameter position in this invention; Figure 5 This is a schematic diagram illustrating the generation of complete field values after changes to multiple source fields in this invention. Figure 6 This is a schematic diagram illustrating the reverse location, correction, and rewriting of database update errors according to the present invention. Detailed Implementation
[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] Example Please see Figure 1 As shown, this embodiment of the invention provides a third-party storage method for BPM form data with visual drag-and-drop connections. This method can be executed by a data processing program deployed on a BPM platform server, or by a database writing program that runs in conjunction with the BPM process engine.
[0020] This embodiment applies to a business process where data is written to a third-party database for the first time when the BPM form is submitted at the start node, and the corresponding fields in the third-party database are selectively updated according to the node configuration and actual conditions when subsequent process nodes are completed. Subsequent process nodes can be configured to perform database writing respectively, and different third-party database fields can be configured for different subsequent process nodes.
[0021] The BPM platform is used to configure business forms and processes, while third-party databases are used to store data from customer management systems, financial management systems, supply chain management systems, or other third-party business systems. The BPM platform can access third-party databases through database drivers, database connection pools, or database connection components, and directly manipulate target data tables based on generated database write commands, without going through application programming interfaces or web service interfaces provided by the third-party business systems.
[0022] The BPM platform establishes drag-and-drop mappings between BPM form fields and third-party database fields through visual drag-and-drop connections, and configures node database write actions to the start node or subsequent process nodes. When the start node is submitted, the system generates third-party database field values according to the drag-and-drop mapping associated with the start node, adding a target record to the target data table. After the first successful write, the system records the process instance identifier, third-party database identifier, target data table identifier, located field value, the actual third-party database field identifier written, and the write completion order; if the first write fails, no target record is created for subsequent updates, and subsequent database updates based on the target record are stopped.
[0023] Upon completion of subsequent process nodes, the system reads the enabled status and conditional branch configuration of the corresponding node's database write action to determine whether to continue database write analysis. If it is determined to continue database write analysis, the system determines the third-party database fields to be analyzed based on the current node, the actual branch, and the enabled drag-and-drop mapping corresponding to the target data table.
[0024] For each third-party database field to be analyzed, the system reads the most recent modification order of the corresponding source BPM form field and the most recent write completion order of the third-party database field. If the most recent modification order of at least one source BPM form field is later than the most recent write completion order, or if no corresponding successful write record is found, the corresponding third-party database field is added to the database write field range. If the most recent modification order of each source BPM form field is not later than the most recent write completion order, the corresponding third-party database field is excluded from the database write field range.
[0025] The system arranges the fields of the third-party database to be analyzed according to the field order in the target data table, and then determines the sorting order of the fields to be analyzed in turn. For each third-party database field within the scope of the database write fields, the system counts the number of fields to be analyzed that are in the sorting order before the current field but are not within the scope of the database write fields. The system subtracts this number from the current field's sorting order to obtain the parameter position of the current field in the parameter list.
[0026] The system generates a field list and a parameter list based on parameter positions, saves the correspondence between third-party database field identifiers and parameter positions, and generates a database update instruction based on the location field value recorded when the initial node commits. This instruction updates the target record created during the initial write. After a successful database update, the system records the actual updated third-party database field identifiers and the write completion order, allowing subsequent nodes to determine whether the fields have changed.
[0027] The method provided in this embodiment includes the following steps: Step S101: Establish drag-and-drop mapping and configure node database write actions; Operators enter database connection information on the third-party data source configuration page of the BPM platform. This information may include the database address, port, database name, access account, access password, and database type. The database type can be a relational database such as MySQL, Oracle, SQL Server, or PostgreSQL.
[0028] The BPM platform accesses a third-party database based on the database connection information and verifies the database connection status and access permissions. After the database connection verification is successful, it reads the target data table selected by the operator and the field information in the target data table. Field information should include at least the field name of the third-party database, the field identifier of the third-party database, the data type, and the order of the field in the target data table. It may also include the allowed length of the field, the precision of the numeric value, whether null values are allowed, and the default value.
[0029] The BPM platform displays the BPM form fields contained in the current BPM form on one side of the visual configuration interface, and the third-party database fields contained in the target data table on the other side; operators can connect the corresponding fields in the two areas by dragging and dropping lines.
[0030] The BPM platform responds to drag-and-drop connection operations, saving the third-party database identifier, target data table identifier, BPM form field identifier, third-party database field identifier, field conversion rules, null value filtering rules, and enabled status for each drag-and-drop connection.
[0031] The third-party database identifier and the target data table identifier are used to define the data storage location corresponding to the drag-and-drop connection; the third-party database field identifier is used to group drag-and-drop connections that point to the same target data table field into the same group; the BPM form field identifier is used to determine the source BPM form field corresponding to each third-party database field.
[0032] When a BPM form field is linked to a third-party database field in the same target data table, a one-to-one drag-and-drop mapping is formed; for example, linking the application date field in the BPM form to the application date field in the target data table.
[0033] When multiple BPM form fields are connected to the same third-party database field, a many-to-one drag-and-drop mapping is formed; for example, the province, city, and detailed address fields of the BPM form can be connected to the complete address field in the target data table.
[0034] When multiple drag-and-drop lines point to the same third-party database field, the BPM platform also saves the order of fields, fixed characters, and field separators of each source BPM form.
[0035] Fixed characters can be preset text added before, after, or between source field values; field separators are used to separate adjacent source field values and can be spaces, hyphens, forward slashes, or other characters determined by the target data table field format.
[0036] Field conversion rules include source field processing content and field combination content. Source field processing content is used to process individual BPM form field values, and can include date format conversion, numeric format conversion, option code conversion, character format conversion, and numeric precision processing.
[0037] For example, date format conversion can convert the page date July 15, 2026 to 2026-07-15 used by a third-party database; numeric format conversion can remove thousands separators from amount text; and option code conversion can convert the "approved" message displayed on the page to code 1 used by a third-party database.
[0038] The field combination content is used to combine the processing results of various source fields according to the order of the source BPM form fields, and to add fixed characters and field separators during the combination process. For example, the complete address field can be combined in the order of province, city, and detailed address, with spaces added between adjacent source fields.
[0039] Null value filtering rules are used to determine whether to allow the source field of a null value to participate in the generation of field values in a third-party database. When the null value filtering rule indicates that the source field should be excluded, the excluded source field will not participate in the current field value combination. When the null value filtering rule indicates that the source field should be retained, the system will process the corresponding null value according to the field conversion rules or use a preset substitute value.
[0040] After completing the drag-and-drop mapping, the operator will write the node database to the start node or subsequent process nodes.
[0041] The node database write action configured on the start node is used to perform an add operation when the start node is committed; the node database write action configured on subsequent process nodes is used to perform an update operation when the subsequent process node is completed.
[0042] Each node database write action records at least the third-party database identifier, target data table identifier, database operation type, enabled status, and associated drag-and-drop mapping. When a node database write action is associated with a conditional branch, the corresponding conditional branch identifier is also recorded.
[0043] The database operation type corresponding to the starting node is an insert operation. The database operation type corresponding to subsequent process nodes is an update operation. Different subsequent process nodes can be associated with different drag-and-drop mappings, allowing different nodes to update different third-party database fields respectively. The BPM platform records the order of each field corresponding to the current node's database write action according to the field order of each associated third-party database field in the target data table. After the node's database write action is triggered, the system first forms a sequence of fields to be analyzed according to the aforementioned order. If some fields to be analyzed are excluded because no source field modification has occurred since the most recent successful write, the order of the unexcluded fields in the original sequence of fields to be analyzed may be discontinuous. The system will then re-determine the parameter positions accordingly.
[0044] When the database operation type is an update operation, the node database write action also records the location field used to locate the target record. The location field can be the order number, customer number, application number, or other third-party database fields that can uniquely identify the target record, or it can be composed of multiple third-party database fields.
[0045] Location fields are linked to their corresponding BPM form fields via drag-and-drop mapping. When a node is submitted, the system retrieves the location field value according to the drag-and-drop mapping and writes it to the target data table. After the first successful write, the system associates and saves the location field value with the current process instance identifier; subsequent database updates use the associated and saved location field value instead of rereading the potentially changed current form field values.
[0046] like Figure 2 As shown, BPM form fields and third-party database fields are displayed on opposite sides of the visual configuration interface; a single drag-and-drop line represents a one-to-one mapping, and multiple drag-and-drop lines pointing to the same third-party database field represent a many-to-one mapping; field conversion rules, null value filtering rules, sorting order, fixed characters, and field separators are associated with the corresponding drag-and-drop lines; node database write actions and conditional branches are further associated with the corresponding drag-and-drop lines.
[0047] Step S102: Create a process execution record and perform the first write to the start node; After business personnel complete and submit the BPM form at the start node, the process engine generates initial field records.
[0048] The initial field record must include at least the process instance identifier, BPM form field identifier, initial field value, and sequence number. When a BPM form field changes during process execution, the process engine generates a field modification record. The field modification record must include at least the process instance identifier, BPM form field identifier, modified field value, process node identifier where the modification occurred, and sequence number.
[0049] Upon completion of subsequent process nodes, the process engine generates a node completion record. This record includes at least the process instance identifier, process node identifier, node completion order, and actual conditional branch identifier. The node completion record is used to trigger the corresponding node's database write action; it is not required to contain approval results for each BPM form field.
[0050] The conditional branch execution record includes at least the process instance identifier, the conditional branch judgment position, the actual executed conditional branch identifier, and the sequence number. The system generates a database write record after a successful or failed database write.
[0051] Initial field records, field modification records, node completion records, conditional branch execution records, and database write records all follow the same process recording order. When saving a new record in the current process instance, the process engine reads the maximum sequence number from the already saved records in the current process instance and assigns the result of incrementing the maximum sequence number to the new record. The maximum sequence number reading, sequence number increment, and new record saving are all completed within the same transaction. After the database write program completes the database operation, it returns the write result to the process engine, which then forms the database write record in the same way. Therefore, initial field records, field modification records, and database write records within the same process instance have unique and comparable sequence numbers.
[0052] When the start node is submitted, the process engine first generates initial field records, and then triggers the database write action corresponding to the start node; therefore, the database write completion order corresponding to the start node is later than the sequence number of each initial field record.
[0053] The system reads the drag-and-drop mappings associated with the start node and that are in an enabled state, merges the drag-and-drop mappings according to the field identifiers of the third-party database, processes the field values of the BPM forms from various sources according to the field conversion rules, and generates the field values of the third-party database corresponding to the start node.
[0054] For one-to-one drag-and-drop mapping, the system processes the corresponding BPM form field values according to field conversion rules and generates a third-party database field value.
[0055] For many-to-one drag-and-drop mapping, the system determines the source BPM form fields involved in generating field values according to the null value filtering rules, processes each source field value according to the field conversion rules, and then combines the processing results according to the sorting order, fixed characters and field separators to generate complete third-party database field values.
[0056] The system arranges the third-party database fields corresponding to the starting node according to the field order in the target data table to form the first-write field list; it then reads the third-party database field values according to the order of the first-write field list to form the first-write parameter list.
[0057] The system generates a parameterized database add command based on the target data table, the list of fields to be written for the first time, and the list of parameters to be written for the first time, and sends the parameterized database add command to the third-party database through the database connection.
[0058] After the initial successful write, the system generates a database write record. This record includes at least the process instance identifier, third-party database identifier, target table identifier, the identifier of the third-party database field actually written, the value of the location field, the write success result, and the write completion order. The process instance identifier, third-party database identifier, target table identifier, and third-party database field identifier collectively limit the range of records whose most recent write completion order is being queried in subsequent queries. Each third-party database field actually written in the same database add operation can correspond to the same write completion order. If the initial add operation at the starting node fails entirely, the system does not generate a write success record, nor does it generate a target record uniquely identified by the location field value. If the initial add operation at the starting node succeeds, but the newly associated third-party database field in subsequent nodes is not included in the initial add operation, the target record already exists, but the corresponding third-party database field does not have a successfully written record. In the former case, subsequent updates are stopped; in the latter case, the corresponding third-party database field is treated as a field yet to be successfully written and analyzed.
[0059] In the same database insert operation, the fields actually written to each third-party database can have the same write completion order; when querying the most recent write completion order for each third-party database field, the corresponding sequence number can be obtained from the write record of that database.
[0060] When the first write operation fails, the system records the failure result returned by the database and does not proceed to subsequent updates based on the target record; the starting node can re-trigger the add operation according to the preset retry rules, or output a message indicating that the first write operation failed.
[0061] Step S103: Determine whether to continue database write analysis based on the results of subsequent write nodes and branches; After a subsequent process node is completed, the system reads the process node identifier from the node completion record and queries the corresponding node database write action. When a node database write action is found, the current subsequent process node is identified as the subsequent write node. The system determines whether to continue database write analysis based on the node database write action's enable status and conditional branch configuration, and no longer determines the database write method based on the subsequent process node's position in the overall process.
[0062] In this embodiment, the subsequent process node configured with a node database write action is referred to as the subsequent write node. The node database write action can be in an enabled or disabled state.
[0063] The system reads the enabled status of the database write action of the corresponding node for the subsequent write node, the associated conditional branch identifier, and the actual conditional branch identifier saved in the conditional branch execution record of the current process instance.
[0064] When the enabled state is disabled, the system receives a result indicating that database writing has stopped, does not read the drag-and-drop mapping associated with the current node, and does not generate database update commands.
[0065] When the enabled status is active and subsequent write nodes are not associated with conditional branches, the system obtains the database write analysis results.
[0066] When the enabled status is "on" and the conditional branch identifier associated with the subsequent write node is the same as the actual conditional branch identifier, the system obtains the database write analysis results.
[0067] When the system is enabled but the conditional branch identifier associated with a subsequent write node differs from the actual conditional branch identifier, the system will stop database writing.
[0068] When a subsequent write node is associated with multiple optional condition branches, as long as the actual condition branch identifier belongs to the range of condition branch identifiers associated with the node's database write action, the analysis result of the continued database write can be obtained.
[0069] like Figure 3 As shown, the enabling status of the node database write action forms the first level of judgment, and whether the condition branch identifier is consistent forms the second level of judgment. If both levels of judgment are satisfied, the subsequent field analysis proceeds; if either judgment is not satisfied, the database update process corresponding to the current node is terminated.
[0070] For example, the procurement application process includes a fixed asset procurement branch and a general materials procurement branch. Subsequent write nodes in the fixed asset procurement branch are only associated with the fixed asset procurement branch identifier. When the current process instance actually enters the fixed asset procurement branch, if the two conditional branch identifiers are the same, the system continues database write analysis; when the current process instance actually enters the general materials procurement branch, if the two conditional branch identifiers are different, the system stops the current database write.
[0071] Step S104: Determine the fields of the third-party database to be analyzed; After obtaining the results of the continued database write analysis, the system reads the target data table configured for subsequent write nodes and limits the read range of drag-and-drop mapping according to the target data table identifier.
[0072] When a subsequent write node is not associated with a conditional branch, the system reads the drag-and-drop mapping associated with the subsequent write node.
[0073] When writing subsequent nodes and associating conditional branches, the system reads the drag-and-drop mappings that are associated with both the subsequent write nodes and the actual conditional branches, excluding drag-and-drop mappings associated with other unexecuted conditional branches.
[0074] The system categorizes drag-and-drop mappings by target table identifier and third-party database field identifier. Drag-and-drop mappings with the same target table identifier and third-party database field identifier are grouped together, with each group corresponding to one third-party database field to be analyzed.
[0075] The system reads the BPM form field identifier in each drag-and-drop mapping and identifies the corresponding BPM form field as the source BPM form field of the current third-party database field.
[0076] When one third-party database field corresponds to one drag-and-drop connection, it corresponds to one source BPM form field; when one third-party database field corresponds to multiple drag-and-drop connections, it corresponds to multiple source BPM form fields.
[0077] When a BPM form is mapped to multiple target data tables at the same time, the system limits the reading range by the target data table identifier configured in the current subsequent write node, and does not include third-party database fields in other target data tables in the current analysis range.
[0078] For example, the financial review node is associated with the purchase amount field and the payment account field, while the final review node is associated with the final approval status field. When the financial review node is completed, the system only identifies the purchase amount field and the payment account field as the third-party database fields to be analyzed, and does not include the final approval status field in the scope of this analysis.
[0079] Step S105: Form the database write field range based on the order of most recent modifications and the order of most recent write completions; The system processes the fields of the third-party database to be analyzed, as determined in step S104, one by one.
[0080] For each third-party database field to be analyzed, the system reads the initial field record and field modification record of the corresponding BPM form field from each source.
[0081] For each source BPM form field, the system selects the record with the largest sequence number from the initial field record and the field modification record, and determines the sequence number of the selected record as the most recent modification order of the corresponding source BPM form field.
[0082] The "most recently modified order" here is used to uniformly represent the sequence number of the record corresponding to the currently valid field value of the source BPM form field. When the source BPM form field has not been modified after submission at the start node, the sequence number of the initial field record is the most recently modified order; when the source BPM form field is modified once or multiple times during the process, the sequence number corresponding to the field modification record with the largest sequence number is the most recently modified order.
[0083] If the initial write to the starting node is successful and a target record is formed, the system queries the database write records with successful write results according to the current process instance identifier, third-party database identifier, target data table identifier, and current third-party database field identifier. It then selects the record with the highest write completion order from the queried records and determines the write completion order of the selected records as the most recent write completion order of the current third-party database field.
[0084] If no successful write record is found for the current third-party database field, but the starting node has successfully formed the target record, it means that the current third-party database field has not been successfully written. The system will add the corresponding third-party database field to the write field range. If the starting node has not successfully formed the target record, the system will stop the subsequent database update and will not directly add the corresponding field to the write field range.
[0085] When querying the order of most recent write completions, the system compares the order of most recent modifications with the order of most recent write completions for each source BPM form field.
[0086] If the most recent modification order of at least one source BPM form field is later than the most recent write completion order, it indicates that the source data corresponding to the current third-party database field has changed after the most recent successful write. The system will then add the current third-party database field to the database write field range.
[0087] If the order of most recent modifications of each source BPM form field is no later than the order of most recent write completion, it means that all source data corresponding to the current third-party database field has not changed since the most recent successful write, and the system excludes the current third-party database field from the range of fields written to the database.
[0088] For example, the purchase amount field corresponds to a source BPM form field. The purchase amount was last modified in the order of 35, and the purchase amount field was last written in the order of 28. Since 35 is later than 28, the system adds the purchase amount field to the database write field range.
[0089] The payment account field was last modified in the order of 12, and last written to the payment account field was last completed in the order of 28. Since 12 is no later than 28, the system excludes the payment account field from the range of fields written to the database.
[0090] When multiple BPM form fields from different sources jointly generate a single third-party database field, the corresponding third-party database field will be added to the database write field range as long as the most recent modification order of any of the participating field values in the source BPM form field is later than the most recent write completion order.
[0091] For example, the province, city, and detailed address together generate the complete address field. The complete address field is last written in order of 30, while the province, city, and detailed address are last modified in order of 10, 15, and 36, respectively. Since the detailed address's last modification order of 36 is later than 30, the system adds the complete address field to the database write field range.
[0092] After all fields to be analyzed have been processed, the retained third-party database fields together form the database write field range. When the database write field range is empty, the system does not generate a database update instruction and records that no third-party database fields requiring updating have been formed in the current subsequent write nodes.
[0093] Step S106: Determine the parameter position based on the range of fields written to the database; When the range of fields written to the database is not empty, the system reads the field order of each field in the target data table based on the field information of the target data table.
[0094] The system reads the arrangement relationship recorded in step S101 according to the field order of the target data table, arranges all the fields of the third-party database to be analyzed according to this arrangement relationship, and determines the arrangement order of each field to be analyzed sequentially starting from the first position. This arrangement order corresponds to the position of the field in the sequence of fields to be analyzed before any change filtering is performed. The arrangement order is used to indicate the relative order of the fields to be analyzed corresponding to the current subsequent write node, and does not directly use the physical column numbers of all fields in the target data table.
[0095] For example, the fields in the third-party database to be analyzed for the current node are supplier name, procurement project, procurement amount, payment account, and final status. These fields are ordered sequentially in the target data table, so the system assigns them the order 1, 2, 3, 4, and 5 respectively.
[0096] For each third-party database field within the scope of database write fields, the system determines the third-party database fields to be analyzed that are arranged before the current field, and counts the number of fields among the aforementioned fields that are not included in the scope of database write fields.
[0097] The system subtracts the counted number of fields from the current field's order, and uses the subtraction result to determine the current field's parameter position in the current parameter list. The range of fields to be written consists of a subset of the fields in the sequence to be analyzed. After a field is excluded, gaps may form between the original order of the retained fields. The system counts the number of fields to be analyzed that were excluded before the currently retained field, subtracts this number from the current field's original order, and uses the resulting consecutive positions as the parameter positions for the updated fields.
[0098] For example, the five fields to be analyzed are arranged in the order of the fields in the target data table as follows: Supplier name, procurement project, procurement amount, payment account, and final status.
[0099] The five fields mentioned above are numbered 1, 2, 3, 4, and 5 in that order. The fields written to the database this time only include the procurement project and its final status.
[0100] The order of the procurement items is 2. The field that precedes the procurement items and is not included in the database write field range is the supplier name, which has 1 field. Therefore, the parameter position of the procurement items is 1.
[0101] The final state is arranged in order of 5. The fields that are before the final state and have not yet entered the database write field range are supplier name, purchase amount and payment account, with a total of 3 fields. Therefore, the parameter position of the final state is 2.
[0102] like Figure 4 As shown, the system first determines the range of fields to be written to the database based on the order of most recent modifications and the order of most recent write completions. Then, it counts the number of fields to be analyzed that were excluded before each retained field. The system then subtracts the number of excluded fields from the sorted order to obtain the position of the parameter in this case.
[0103] Therefore, the field list includes the procurement project and the final status in sequence, and the first and second parameters in the corresponding parameter list are the procurement project field value and the final status field value, respectively.
[0104] By compressing the parameter positions according to the number of preceding fields that are not included in the database write field range, the parameter positions of each third-party database field within the database write field range can be kept continuous after dynamically excluding unchanged fields, and the fields in the field list and the field values in the parameter list can be kept in a one-to-one correspondence.
[0105] Step S107: Generate field values from the third-party database and update the target record written for the first time; The system generates corresponding field values for each third-party database field within the range of fields to be written to the database.
[0106] When a third-party database field corresponds to a source BPM form field, the system reads the current field value of the source BPM form field, processes the current field value according to the field conversion rules in the drag-and-drop mapping, and generates the third-party database field value.
[0107] When a third-party database field corresponds to multiple source BPM form fields, the system determines the source BPM form field for generating field values based on the null value filtering rules.
[0108] The system processes the current field values of each source BPM form field according to the field conversion rules, and then combines all the processing results according to the sorting order, fixed characters and field separators to generate complete third-party database field values.
[0109] For example, the province, city, and detailed address are used together to generate the complete address field. If the detailed address is modified after the most recent successful write, the system rereads the current values of the province, city, and detailed address fields and recombines them according to their order in the complete address field, instead of simply writing the modified detailed address into the complete address field.
[0110] like Figure 5 As shown, when any source field is modified after the most recent write completion order, a complete reorganization of the corresponding third-party database field is triggered to avoid partial source field values overwriting complete combined field values.
[0111] After generating the third-party database field values within the range of fields to be written to the database, the system arranges the third-party database fields according to the parameter positions determined in step S106 to form a field list, and reads the corresponding third-party database field values according to the order of the field list to form a parameter list.
[0112] The system stores the correspondence between third-party database field identifiers and update field parameter positions. When a database update instruction includes both update field parameters and location field parameters used in parameterized query conditions, the system records the parameter type, update field parameter position, and location field parameter position respectively to prevent the location field parameter position returned by the database from being incorrectly converted into a write failure field. This correspondence includes at least the process instance identifier, the current subsequent write node identifier, the third-party database field identifier, and the parameter position.
[0113] The system reads the location field and its value saved after the first successful write to the starting node, and forms parameterized query conditions based on the location field and its value.
[0114] When the location field is a single field, the parameterized query conditions include the location field and its corresponding value; when the location field consists of multiple fields, the parameterized query conditions include each location field and its corresponding value.
[0115] The system first queries the target data table according to the parameterized query conditions; then, based on the query results, it determines whether the target record can be uniquely identified.
[0116] For example, if the field list includes the procurement project field and the final status field, the parameter list includes the corresponding procurement project field value and the final status field value, and the location field is the application number, then the database update instruction is used to update the procurement project field and the final status field in the target record where the application number is the same as the value saved in the starting node.
[0117] If the query result is zero, it means that the target record initially written by the starting node does not exist or the location field value does not match. The system stops this database update and records that no target record was found.
[0118] If the query results are more than one, it means that the location field and its value cannot uniquely identify the target record. The system will then stop the current database update and record that the target record cannot be uniquely identified.
[0119] When the query result uniquely identifies the target record, the system generates a database update instruction based on the target data table, field list, parameter list, and parameterized query conditions, executes the database update instruction through the database connection, and receives the database write results returned by the third-party database.
[0120] After a successful database update, the system generates a database write record. This record includes at least the process instance identifier, subsequent write node identifier, target data table identifier, identifier of the third-party database field actually updated, the database write success result, and the write completion order.
[0121] The system only records the third-party database fields that were actually entered into the database write range and successfully updated. Fields that were not entered into the database write range are not updated in their most recently written order.
[0122] Therefore, when the next subsequent write node completes, it can re-determine which fields need to be included in the database write field range based on the latest field modification record and the recent write completion order of each third-party database field.
[0123] Step S108: Determine the fields that failed to write based on the database write results and generate input restrictions; like Figure 6 As shown, when the database write result indicates that the field type is inconsistent or the field length exceeds the limit, the system will prioritize reading the field name of the third-party database contained in the database write result.
[0124] When the database write result contains the field name of a third-party database, the system determines the field that failed to write based on the field name.
[0125] When the database write result does not contain the field name of the third-party database but contains the parameter position, the system converts the parameter position into the field name of the third-party database according to the correspondence between the third-party database field identifier and the parameter position saved in step S107, and determines the field that failed to write.
[0126] When a database update instruction includes both update field parameters and location field parameters used in parameterized query conditions, the system saves the positions of the update field parameters and the location field parameters respectively. In this embodiment, the correspondence between third-party database field identifiers and parameter positions at least records the actual parameter position of the update field parameters in the complete database update instruction, ensuring that the parameter position returned by the database directly corresponds to the write failure field.
[0127] If the database write result contains neither the name of the third-party database field nor the position of the updated field parameter that can uniquely correspond to the third-party database field, the system records the database write failure, does not generate input restrictions for a single BPM form field, and terminates the current error reverse location process.
[0128] After identifying the fields that failed to write, the system queries the drag-and-drop mapping based on the third-party database field identifier of the fields that failed to write, and determines the corresponding source BPM form field.
[0129] When a write failure field corresponds to a source BPM form field, and the database write result indicates that the field types are inconsistent, the system reads the data type and field conversion rules of the write failure field, generates input type restrictions, and associates the input type restrictions with the corresponding BPM form field.
[0130] For example, if a third-party database field is numeric and the source BPM form field value contains characters that cannot be converted to numeric values, the system will generate numeric input restrictions at the corresponding BPM form field input location.
[0131] When the database write result indicates that the field length exceeds the limit, the system reads the allowed length of the field that failed to write and generates an input length limit based on the allowed length.
[0132] When a write failure field corresponds to multiple source BPM form fields and the database write results indicate inconsistent field types, the system processes the values of each source BPM form field sequentially according to the field conversion rules, determines the source BPM form field that does not meet the target data type based on the processing failure location, and generates input type restrictions at the corresponding input location.
[0133] If a write failure field corresponds to multiple source BPM form fields and the database write result indicates that the field length exceeds the limit, and if the most recent write completion order has been found, the system selects the source BPM form field with the largest sort order number from the source BPM form fields whose values were generated in this instance and whose most recent modification order is later than the most recent write completion order as the field to be corrected; if the most recent write completion order has not been found, the system selects the source BPM form field with the largest sort order number from all source BPM form fields whose values were generated in this instance as the field to be corrected.
[0134] Selecting the field with the largest sequence number of the source of change allows you to prioritize the length limit of the combined field on the later parts of the change list while retaining the preceding source field and the fixed combination format.
[0135] The system subtracts the sum of the lengths of the processing results of other source BPM form fields, the fixed character length, and the length of the field separator from the allowed length of the field that failed to write, to obtain the input length limit of the field to be corrected.
[0136] When a third-party database limits the field length based on the number of characters, the system calculates the length of each part based on the number of characters; when a third-party database limits the field length based on the number of bytes, the system calculates the number of bytes after encoding each part based on the character set used by the target field.
[0137] When the calculation result is greater than or equal to zero, the calculation result is determined as the input length limit of the field to be corrected.
[0138] When the calculation result is less than zero, the input length limit of the field to be corrected is set to zero, and the processing results of the remaining source fields, fixed characters and field separators are output as a prompt that the length of the field to be written has exceeded the allowed length.
[0139] For example, if the full address field is allowed to be 50 characters long, the province processing result is 3 characters long, the city processing result is 3 characters long, the separator between the two fields occupies 2 characters, and the detailed address is the source field that has changed most recently and has the largest sort order number, then the input length of the detailed address is limited to 42 characters.
[0140] Step S109: After the fields are corrected, the database write analysis is re-executed; After business personnel modify the field values of the BPM form according to the input type or input length restrictions, the process engine generates a new field modification record.
[0141] The new field modification record must include at least the process instance identifier, BPM form field identifier, corrected field value, process node identifier where the modification occurred, and new sequence number. If the most recent write completion order has been found, the sequence number of the new field modification record is later than the most recent write completion order. If the most recent write completion order has not been found, the new field modification record is the field modification record with the largest current sequence number of the corresponding source BPM form field.
[0142] After the correction operation is completed, the system re-triggers the database write action for the node corresponding to the subsequent write node that failed to write, or re-executes the database write analysis when the next subsequent process node configured with a database write action completes. The system reads the current enabled status and conditional branch identifier of the subsequent write node to determine whether to continue the database write analysis; if it decides to continue the database write analysis, it re-determines the third-party database fields to be analyzed.
[0143] The system re-determines the most recent modification order of the corresponding source BPM form fields based on the new field modification records, and re-executes steps S105 to S107. Specifically, the write field range is re-formed based on the new most recent modification order and the most recent write completion order; according to the arrangement order of all fields to be analyzed, the number of fields to be analyzed that were not included in the write field range before each write field is counted, and the position of the updated field parameter is re-determined. When a write failure field corresponds to multiple source BPM form fields, all source BPM form fields involved in the generation of field values are reread, and the complete third-party database field values are regenerated based on the corrected field values.
[0144] The system generates a new field list and parameter list based on the newly determined update field parameter positions, re-saves the correspondence between the third-party database field identifiers and the update field parameter positions, and generates and executes a new database update instruction based on the positioning field values recorded at the start node submission, thus updating the target record formed during the initial write. After a successful database update, the system records the actual updated third-party database field identifiers and the new write completion order; if the database still returns results indicating inconsistent field types or excessive field lengths, the system continues to follow step S108 to determine the fields that failed to write and generate corresponding input restrictions.
[0145] Through the above processing, the field correction result will not directly overwrite any field in the third-party database. Instead, it will be re-processed through node and branch judgment, database field writing range formation, parameter position determination, and target record location, thereby maintaining the correspondence between the corrected field values, field list, parameter list, and target record.
[0146] The following describes the method provided in this embodiment in different business scenarios: In an embodiment of initial write at the start node and incremental update at subsequent nodes, the BPM form is a purchase requisition form, including requisition number, supplier name, purchase project, purchase amount, payment account, and final status. The target data table in the third-party database is the purchase requisition data table. Operators establish mappings between BPM form fields and third-party database fields by dragging and dropping, configuring the requisition number as the location field, and configuring the node database write action at the start node as a new operation. When business personnel submit the purchase requisition form at the start node, the system processes the values of each BPM form field according to the drag-and-drop mapping associated with the start node, adding a target record to the purchase requisition data table. After the initial write is successful, the location field value corresponding to the requisition number is associated with and saved with the current process instance identifier, and the actual write completion order of the fields is recorded. The financial audit node configures node database write actions for the purchase amount and payment account. Before the financial audit node is completed, the purchase amount is changed from 10,000 yuan to 12,000 yuan, with a recent modification order of 35; the payment account has not been modified, with a recent modification order of 6; the initial write completion order at the start node is 20. After the financial audit node is completed, the system determines that the node's database write operation is in progress and has no associated conditional branches, obtaining the database write analysis results. The "Purchase Amount" and "Payment Account" fields are identified as the third-party database fields to be analyzed. The "Purchase Amount" field, with a recent modification order of 35, is later than the "Last Write Completion Order" field of 20, and therefore falls within the scope of the database write fields. The "Payment Account" field, with a recent modification order of 6, is not later than the "Last Write Completion Order" field of 20, and is therefore excluded. Based on this, the system generates a field list and parameter list containing only the "Purchase Amount" field. Using the application number, it creates parameterized query conditions, updates the purchase amount in the target record initially written to 12,000 yuan, and records the new write completion order of the "Purchase Amount" field.
[0147] In a subsequent write implementation corresponding to a conditional branch, the procurement application process enters either the fixed asset procurement branch or the general materials procurement branch according to the procurement category. In the fixed asset procurement branch, the subsequent write node is associated with the equipment name, asset category, user department, and equipment address fields, and the node database write action is associated with the fixed asset procurement branch identifier; the general materials procurement branch is associated with the material name, specifications, and procurement quantity fields. When the current process instance enters the fixed asset procurement branch, if the actual conditional branch identifier in the conditional branch execution record is the same as the conditional branch identifier associated with the node database write action, the system obtains a continue database write analysis result, retains the enabled drag-and-drop mapping simultaneously associated with the current subsequent write node and the fixed asset procurement branch, and merges them into fields to be analyzed according to the third-party database field identifiers. When the current process instance enters the general materials procurement branch, if the two conditional branch identifiers are different, the system obtains a stop database write result, does not read the drag-and-drop mapping corresponding to the fixed asset procurement branch, and does not generate a corresponding database update instruction. Therefore, the subsequent write node and the actual conditional branch jointly limit the fields processed in this instance; fields in branches not executed will not enter the database write field range.
[0148] When configuring the database write action for the current subsequent write node, the system has already recorded the supplier name, purchase project, purchase amount, payment account, and final status in the order of the target data table fields. After the node is triggered, the five fields first form a sequence of fields to be analyzed, and then fields that have not changed are excluded based on the order of most recent modifications and the order of most recent write completions. In an embodiment where the parameter position is re-determined after excluding a field, a subsequent write node is associated with five third-party database fields: supplier name, purchase project, purchase amount, payment account, and final status. The system arranges the five fields according to their field order in the target data table, resulting in ordering 1, 2, 3, 4, and 5 respectively. After comparing the order of most recent modifications and the order of most recent write completions, the purchase project and final status are included in the database write field range, while the supplier name, purchase amount, and payment account are excluded. The first field excluded from the procurement project list is the supplier name (1 field). The system subtracts this field number from the procurement project's order (2) to obtain the parameter position 1 for the procurement project. The second field excluded from the final state list is the supplier name, procurement amount, and payment account (3 fields). The system subtracts this field number from the final state's order (5) to obtain the parameter position 2 for the final state. The system generates a list of fields sequentially including the procurement project and the final state, based on their parameter positions, and creates a corresponding parameter list. It maintains the correspondence between the procurement project fields and parameter position 1, and between the final state fields and parameter position 2. This, combined with the location field values, generates a database update instruction. Through this process, even after some preceding fields are dynamically excluded, the parameter positions of the remaining fields remain continuous, and the field list and parameter list maintain a one-to-one correspondence.
[0149] In an embodiment where multiple BPM form fields generate the same third-party database field and a length error occurs, the province, city, and detailed address BPM form fields are connected to the device address field via multiple drag-and-drop lines, arranged in the order of province, city, and detailed address, with spaces separating adjacent fields. The device address field's most recently written completion order is 30, while the province, city, and detailed address's most recently modified orders are 10, 15, and 36, respectively. Since the detailed address's most recently modified order (36) is later than the device address field's most recently written completion order (30), the system adds the device address field to the database write field range and rereads the current field values of province, city, and detailed address, generating the complete device address field value according to the arrangement order and space separators, instead of only writing the changed detailed address to the device address field. If the third-party database returns a device address field length exceeding the result, and the device address field's allowed length is 50 characters, the system identifies the three source fields along the drag-and-drop lines and selects the detailed address with the largest arrangement number from the source fields modified after the most recently written completion order as the field to be corrected. The province processing result has a length of 3 characters, the city processing result has a length of 3 characters, and the separator between the two fields occupies 2 characters. The system subtracts 3, 3, and 2 from 50 to obtain the detailed address input length limit of 42 characters. After the business personnel correct the detailed address, the workflow engine generates a new field modification record. The system re-adds the device address field to the database write field range, regenerates the complete device address field value, redetermines the parameter positions and the correspondence between the third-party database field identifiers and parameter positions, and updates the target record formed by the initial write at the start node again.
[0150] In addition, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module.
[0151] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0152] In conclusion, the above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A third-party storage method for BPM form data with visual drag-and-drop connection, characterized in that: Includes the following steps: Retrieve drag-and-drop mappings and node database write actions; When the starting node is submitted, the target data table is written according to the mapping. After successful submission, the location field value, the third-party database fields written, and the writing completion order are recorded. When subsequent nodes are completed, determine whether to continue database write analysis based on the write action activation status and branch results. When the database write analysis continues, determine the fields to be analyzed, compare the most recent modification order of the source BPM form fields corresponding to the fields to be analyzed with the most recent write completion order of the fields, and add the fields to be analyzed that have no successful records or whose source fields have been modified after the most recent write to the write field range. For fields within the range, count the number of preceding fields that are not within the range to be analyzed, and subtract this number from the sorted order to obtain the parameter position; A field list and a parameter list are generated based on the parameter position. An update command is generated and executed by combining the value of the located field. Upon successful execution, the updated fields and the order in which they were written are recorded.
2. The third-party storage method for BPM form data with visual drag-and-drop connection as described in claim 1, characterized in that, Determine whether to continue database write analysis based on the write action's enabled status and branch results, including: The node following the configuration node database write action is determined as the subsequent write node; Read the enabled status of the database write action of the corresponding node for the subsequent write node, the associated conditional branch identifier, and the actual conditional branch identifier corresponding to the current process instance; When the enabled status is enabled, and subsequent write nodes are not associated with conditional branches, or the associated conditional branch identifier contains the actual conditional branch identifier, the database write analysis results are obtained. When the enabled status is disabled, or when the enabled status is enabled but the associated conditional branch identifier does not contain the actual conditional branch identifier, the database write result is stopped.
3. The third-party storage method for BPM form data with visual drag-and-drop connection as described in claim 2, characterized in that, After obtaining the results of the database write analysis, determine the fields to be analyzed, including: Read the target data table configured for subsequent write nodes, and limit the read range for enabling drag-and-drop mapping according to the target data table identifier; When subsequent write nodes are not associated with condition branches, the drag-and-drop mapping associated with subsequent write nodes is retained; When writing subsequent nodes to associated conditional branches, retain the drag-and-drop mapping that is associated with both the subsequent write nodes and the actual conditional branches. By enabling drag-and-drop mapping based on the field identifiers of the third-party databases to be merged and retained, the third-party database fields corresponding to each merge group are identified as fields to be analyzed, and the source BPM form fields corresponding to each field to be analyzed are determined.
4. The third-party storage method for BPM form data with visual drag-and-drop connection as described in claim 3, characterized in that, The process compares the most recent modification order of the source BPM form fields corresponding to the field to be analyzed with the most recent write completion order of that field. Fields with no successful records or whose source fields were modified after the most recent write are added to the write field range. This includes: after a successful write at the start node and the formation of a target record, for each field to be analyzed, selecting the record with the largest sequence number from the initial field records and field modification records corresponding to each source BPM form field in the current process instance, and determining the sequence number of the selected record as the most recent modification order; selecting the record with the largest write completion order from the database write records with successful write results according to the current process instance identifier, third-party database identifier, target data table identifier, and third-party database field identifier, and determining the write completion order of the selected record as the most recent write completion order; if no most recent write completion order is found, or if the most recent modification order of at least one source BPM form field is later than the most recent write completion order, the corresponding field to be analyzed is added to the write field range; if the most recent modification order of each source BPM form field is not later than the most recent write completion order, the corresponding field to be analyzed is excluded.
5. The third-party storage method for BPM form data with visual drag-and-drop connection as described in claim 4, characterized in that, For fields within the range, count the number of preceding fields that are not included in the range, and subtract this number from the sorted order to obtain the parameter position, including: Arrange all fields to be analyzed in the order of the fields in the target data table, and determine the order of each field to be analyzed starting from the first field. For each third-party database field within the write field range, count the number of fields to be analyzed that are ranked before the current field but are not included in the write field range. Subtract the number of fields to be analyzed from the current field's sort order, and use the result of the subtraction to determine the parameter position of the current field.
6. The third-party storage method for BPM form data with visual drag-and-drop connection as described in claim 5, characterized in that, A field list and a parameter list are generated based on the parameter location. An update instruction is then generated and executed by combining the location field values, including: Generate field values for each third-party database field within the specified field range based on drag-and-drop mapping; The third-party database fields are arranged according to their parameter positions to form a field list, and the corresponding field values are read according to the field list to form a parameter list; Save the correspondence between the field identifiers of the third-party database and the positions of the updated field parameters; Read the location field and its value from the successful write record of the start node, and form parameterized query conditions based on the location field and its value; When the query result uniquely identifies a target record, an update instruction is generated based on the target data table, field list, parameter list, and parameterized query conditions, and the update instruction is executed through the database connection. The update will stop if the query results are zero or more than one. After a successful update, record the identifiers of the third-party database fields that were actually updated and the order in which they were written.
7. The third-party storage method for BPM form data with visual drag-and-drop connection according to any one of claims 1-6, characterized in that, To obtain the drag-and-drop mapping, including: Connect to a third-party database, read the target data table and the fields from the third-party database, and display the BPM form fields and the third-party database fields on both sides of the visual configuration interface. Drag and drop lines between response fields to save BPM form field identifiers, third-party database field identifiers, field conversion rules, null value filtering rules, and enabled status; When multiple drag-and-drop lines point to the same third-party database field, the arrangement order, fixed characters, and field separators of the fields from each source BPM form are saved. Associate the drag-and-drop connection with the node database write action; when the node database write action is associated with a conditional branch, associate the drag-and-drop connection with the corresponding conditional branch.
8. The third-party storage method for BPM form data with visual drag-and-drop connection as described in claim 7, characterized in that, When multiple drag-and-drop lines point to the same third-party database field, and the corresponding third-party database field has entered the write field range, the third-party database field value is generated, including: The source BPM form fields for generating field values are determined according to the null value filtering rules; Read the current field value of all fields from the source BPM form that participated in generating the field values; Each current field value is processed according to the field conversion rules, and the processing results are combined according to the sorting order, fixed characters and field separators to generate complete third-party database field values.
9. The third-party storage method for BPM form data with visual drag-and-drop connection as described in claim 7, characterized in that, When a database write result indicates that the field type is inconsistent or the field length exceeds the limit: When the database write result contains the field name of a third-party database, determine the field that failed to write based on the field name; When the database write result does not contain field names but contains the position of the updated field parameters, the field that failed to write is determined according to the correspondence between the field identifier of the third-party database and the position of the updated field parameters; If the database write result contains neither field names nor the position of the updated field parameters, record the database write failure and stop error handling for the single field; After identifying the fields that failed to write, drag and drop to determine the corresponding source BPM form fields. When field types are inconsistent, determine the source BPM form fields that do not meet the target data type according to the field conversion rules and generate input type restrictions; When the field length exceeds the limit, an input length limit is generated based on the allowed length of the field that failed to be written.
10. The third-party storage method for BPM form data with visual drag-and-drop connection as described in claim 9, characterized in that, When a write failure field corresponds to multiple source BPM form fields and the field length exceeds the limit: When the most recent write completion order is found, select the source BPM form field with the largest sort order number from the source BPM form fields whose values were generated in this instance and whose most recent modification order is later than the most recent write completion order, and use it as the field to be corrected. If the most recent write completion order is not found, select the BPM form field with the largest sort order number from all the source BPM form fields generated from the field values of this transaction as the field to be corrected. The input length limit of the field to be corrected is obtained by subtracting the sum of the lengths of the processing results of other source BPM form fields, fixed characters, and field separators from the allowed length of the field that failed to write. Retrieve the field values corrected according to the input length limit and generate a new field modification record; Based on the new field modification record, the write field range is re-formed, the parameter positions and the correspondence between the third-party database field identifier and the updated field parameter position are redefined, a new update instruction is generated and executed, and after the update is successful, the actual updated third-party database field identifier and the new write completion order are recorded.