A workflow engine based on tables

Relying on the workflow engine of tables, the table data update is automatically managed, and the problem of slow update speed, error-prone and cumbersome updates is solved, and fast and safe tabular data synchronization is achieved.

CN114048720BActive Publication Date: 2025-08-15PARTNER WISDOM (BEIJING) INFORMATION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111324995.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-10
Publication Date
2025-08-15
Estimated Expiration
2041-11-10

AI Technical Summary

Technical Problem

In the prior art, the table data is updated slowly, easily lost tables, easily error-making, and cumbersome operations, which cannot meet project needs.

Method used

Using a workflow engine based on tables, the workflow storage and workflow execution parts are used to automatically manage the update of table data, and use trigger methods, trigger conditions and action execution to generate abstract syntax trees, generate table relationship trees and influence trees, and realize automatic synchronous update of table data.

Benefits of technology

It realizes the fast update speed, high security and easy operation of table data, avoiding errors and delays caused by manual intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114048720B_ABST
    Figure CN114048720B_ABST
Patent Text Reader

Abstract

This invention discloses a table-based workflow engine, divided into two parts: workflow storage and workflow execution. By creating, validating, and parsing expressions, it completes the updating of table data within a configuration and workflow storage. Using this workflow engine, the present invention can rapidly complete the creation and updating of associated table data within a configuration, as well as the expansion and implementation of related functions such as other notifications. This simplifies repetitive operator operations, automates data manipulation and the implementation of business functions, and makes data changes faster, safer, and more convenient.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data storage, and in particular to a workflow engine based on a table. Background Art

[0002] Within a workspace or enterprise, managers typically create numerous tables to categorize, store, and manage data. Due to project constraints, multiple tables are often interconnected. When data in a table changes, managers often need to manually update all related tables to prevent impacting subsequent calls. This approach significantly slows down updates when the amount of data in linked tables is large, and can easily lead to issues such as table loss, data misuse, and cumbersome operations, seriously failing to keep up with project demands. Summary of the Invention

[0003] The purpose of the present invention is to provide a table-based workflow engine to solve the problems of slow table update speed, easy table loss, easy error and cumbersomeness.

[0004] To achieve the above object, the present invention provides the following technical solutions:

[0005] A table-based workflow engine, which consists of two parts: workflow storage and workflow execution. The workflow storage is used to save workflows, while the workflow execution is used to maintain table data.

[0006] Workflow storage includes triggering methods, triggering conditions, action execution, and action storage. The triggering method creates an expression based on the instruction generation method and sends it to the table. The triggering condition verifies the table data based on the expression to determine whether to operate on the table data. When the action execution expression passes the verification, the workflow will complete one or more specific workflow execution operations. When the action storage is saved, the abstract syntax tree of the expression is generated and stored synchronously with the workflow.

[0007] Workflow execution generates a table relationship tree and a table impact tree based on the user's table configuration. The table relationship tree represents the data association relationship between tables, and the table impact tree represents the execution process of the table relationship tree. The system completes the current table data update based on the expression, and completes the data update of the related tables in sequence based on the table impact tree.

[0008] Preferably, the specific process of the workflow execution is as follows:

[0009] S1. Starting from the current table, obtain the table impact tree and related workflows;

[0010] S2. Verify the triggering conditions of the next stage of the workflow, and end if they fail;

[0011] S3. Execute the next stage of the workflow, complete the data update of the next table, and save the created data as input for the subsequent workflow;

[0012] S4. Maintain the operation behavior on the second table;

[0013] S5. According to the order of the table impact tree, the subsequent workflows are verified in sequence, and the data update of the next table is completed until the data update of the terminal table is completed.

[0014] Preferably, the abstract syntax tree is formed by lexical analysis and syntactic analysis of an expression; the lexical analysis converts the textual expression into recognizable element units, and the syntactic analysis forms an abstract syntax tree by verifying the combination of element units.

[0015] Preferably, when the action storage generates the abstract syntax tree, it also sequentially verifies whether the triggering conditions and expressions are legal.

[0016] Preferably, the triggering methods include creating data triggering, updating data triggering, deleting data triggering, data field expiration triggering, triggering after searching for data at a specified time, triggering after manually finding data, triggering at a specified time, and manual triggering.

[0017] The present invention adopts the above-mentioned structure and the workflow engine based on the table, and the table data is updated without manual intervention, with fast update speed, high security and more convenient management. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 This is a flowchart of the workflow storage phase in an embodiment of the present invention;

[0019] Figure 2 An element graph generated by lexical analysis of an expression in an embodiment of the present invention;

[0020] Figure 3 A syntax tree generated by syntax analysis of an expression in an embodiment of the present invention;

[0021] Figure 4 This is a table relationship tree in a normal state in an embodiment of the present invention;

[0022] Figure 5 A table relationship tree of an infinite loop state in an embodiment of the present invention;

[0023] Figure 6 This is the table impact tree in the embodiment of the present invention. DETAILED DESCRIPTION

[0024] The technical solution of the present invention is further described below with reference to the accompanying drawings and embodiments.

[0025] A table-based workflow engine includes two parts: workflow storage and workflow execution.

[0026] Workflow storage includes triggering methods, triggering conditions, action execution, and action storage. The triggering method creates an expression based on the instruction generation method and sends it to the table. The triggering condition verifies the table data based on the expression to determine whether to operate on the table data. Action execution completes one or more workflow execution operations when the expression verification passes. Action storage generates an abstract syntax tree for the expression when the workflow is saved and stores it synchronously with the workflow.

[0027] The workflow execution completes the data update of the current table based on the expression, and completes the data update of the related tables in sequence according to the table impact tree.

[0028] Specifically, the workflow of the workflow storage phase is as follows: Figure 1 shown.

[0029] S1: Automatically create expressions based on triggering methods;

[0030] S2: The trigger condition verifies the table data based on the expression. If the verification fails, the process can end directly or prompt the reason and return to step S1.

[0031] S3: Enter the workflow execution phase based on the expression;

[0032] S4: When saving the workflow, verify whether the trigger conditions and expressions are legal, and generate the AST structure;

[0033] S5: Save the workflow and AST.

[0034] The triggering methods include the following:

[0035] ①Create data trigger——Triggered after the bound table is created

[0036] ②Update data trigger - triggered after the bound table is updated

[0037] ③ Delete data trigger - triggered after the bound table is deleted

[0038] ④ Data field expiration trigger - execute after the specified time type field of the bound table expires

[0039] ⑤Trigger after searching for data at a specified time - after the specified time is reached, execute after obtaining data through the filtering conditions

[0040] ⑥ Manual triggering after finding data - triggered manually by the user, and executed after obtaining data through filtering conditions

[0041] ⑦Specified time trigger——Execute directly after the specified time is reached

[0042] ⑧ Manual trigger - directly executed after the user manually triggers

[0043] The expression is mainly composed of the following five elements:

[0044] ① Constants - values hardcoded in the code language, usually text or numbers, such as: 'text constant', 12, etc.

[0045] ②Methods - various methods for implementing functional logic, such as NOW(), IF, etc.

[0046] ③Variables - table fields available in the current execution environment, such as: {current data.numeric field}, {target table.text field}

[0047] ④ Operations - digital operations and comparisons, +, -, *, / , >, <

[0048] ⑤Brackets——affect priority, (), []

[0049] The expression parsing process is implemented as follows Figure 2-3 shown.

[0050] 1. Lexical analysis: converting textual expressions into the recognizable elements mentioned above.

[0051] 2. Syntax analysis: combine and verify the code elements and then generate AST.

[0052] During workflow execution, when the configuration of a workflow changes, all workflows in the entire workspace will generate a table relationship tree and a table impact tree based on the configuration.

[0053] Forms: A, B, C

[0054] Workflow: w1 relies on table A and is triggered when data in table A is created. The action is to create data in table B. w2 relies on table B and is triggered when data in table B is created. The action is to create data in table C.

[0055] The table relationship tree in normal state is as follows Figure 4 As shown. If there is a workflow w3 relying on table C, it is triggered when the data in table C is created, and the action is to create data in table A, then the generated table relationship tree is as follows Figure 5 As shown, the table falls into an infinite loop, which is not allowed by the system. Therefore, the final generated table affects the tree as follows Figure 6 shown.

[0056] The workflow is executed based on the table impact tree. When data is created in table A, the workflow is executed through the following steps:

[0057] S1. Starting from table A, obtain the table impact tree and related workflows;

[0058] S2, verify the triggering condition of workflow w1, and end if it fails;

[0059] S3. Execute the actions of workflow w1 to complete the creation of table B. and save the created data as input for subsequent workflows;

[0060] S4. Maintain the creation behavior on table B;

[0061] S5. Verify the triggering condition of workflow w2. If it fails, the process ends.

[0062] S6. Execute the action of workflow w2 to complete the creation of table C.

[0063] S7. End.

[0064] The above are specific embodiments of the present invention, but the scope of protection of the present invention should not be limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed by the present invention should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection defined in the claims.

Claims

1. A table-based workflow engine, characterized by: It is divided into two parts: workflow storage and workflow execution. Workflow storage is used to save workflows, and workflow execution is used to maintain table data. Workflow storage includes triggering methods, triggering conditions, action execution, and action storage. The triggering method creates an expression based on the instruction generation method and sends it to the table. The triggering condition verifies the table data based on the expression to determine whether to operate on the table data. When the action execution expression is verified, the workflow will complete one or more specific workflow execution operations. When the workflow is saved, the action storage generates an abstract syntax tree of the expression and stores it synchronously with the workflow. When generating the abstract syntax tree, it also verifies the triggering conditions and the legality of the expression. Workflow execution generates a table relationship tree and a table impact tree based on the user's table configuration. The table relationship tree represents the data association relationship between tables, and the table impact tree represents the execution process of the table relationship tree. The system completes the data update of the current table based on the expression, and completes the data update of the related tables in sequence based on the table impact tree. The specific process of the workflow execution is as follows: S1. Starting from the current table, obtain the table impact tree and related workflows; S2. Verify the triggering conditions of the next stage of the workflow, and end if they fail; S3. Execute the next stage of the workflow, complete the data update of the next table, and save the created data as input for the subsequent workflow; S4. Maintain the operation behavior on the second table; S5. According to the order of the table impact tree, the subsequent workflows are verified in sequence, and the data update of the next table is completed until the data update of the terminal table is completed.

2. The table-based workflow engine according to claim 1, characterized in that: The abstract syntax tree is formed by lexical analysis and syntactic analysis of an expression; the lexical analysis converts the textual expression into identifiable element units, and the syntactic analysis forms an abstract syntax tree by verifying the combination of element units.

3. The table-based workflow engine according to claim 1, characterized in that: The triggering methods include creating data triggering, updating data triggering, deleting data triggering, data field expiration triggering, triggering after searching for data at a specified time, triggering after manually finding data, triggering at a specified time, and manual triggering.

Citation Information

Patent Citations

  • Table data updating method and device, computer equipment and storage medium

    CN110163556A