A dynamic data table based workflow management system

CN123011921APending Publication Date: 2026-10-30HANGZHOU REACH PROD TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610958402.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-30
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0008]本发明的目的在于提供一种基于动态数据表的工作流管理系统,能够提升业务敏捷性、保障系统稳定可靠和降低运维成本,且结构简单,使用方便,以解决上述背景技术中提出的难以适应业务变化、缺乏联动机制、并发控制和分布式协调能力弱、多租户隔离能力不足以及部署运维复杂的问题

Benefits of technology

1、本发明通过基于元数据动态创建数据表并引入数据驱动引擎,能够实现数据表结构的运行时灵活扩展及数据变更自动触发业务流程的闭环,提升业务敏捷性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123011921A_ABST
    Figure CN123011921A_ABST
Patent Text Reader

Abstract

The application discloses a kind of workflow management systems based on dynamic data table, including the dynamic data table management module of data access layer, general data model, and the data-driven engine and workflow engine of business logic layer.Data-driven engine intercepts operation and sets up hook when data changes, matches and evaluates trigger condition, obtains distributed lock, executes drive logic under transaction protection and records operation log.The application realizes runtime extension to avoid maintenance by shutdown through dynamic data table management module, realizes the closed loop of process triggered by data change through data-driven engine, and ensures data consistency in high-concurrency scenarios through distributed lock mechanism.Belongs to the field of computer software technology, can improve business agility, guarantee system stability and reliability and reduce operation and maintenance cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a data processing system, and more particularly to a workflow management system based on dynamic data tables. Background Technology

[0002] As enterprises deepen their digital transformation, traditional static forms and fixed workflow systems can no longer meet the rapidly changing business needs of enterprises. Existing technologies mainly have the following shortcomings: First, static table structures are difficult to adapt to business changes. Traditional solutions fix field definitions during the database design phase and use predefined fixed table structures. When business fields change, the database table structure needs to be modified, involving downtime maintenance and data migration. They lack dynamic expansion capabilities and affect system availability.

[0003] Second, there is a lack of linkage between process configuration and data operation. In the existing solution, process nodes and data operations are independent of each other. There is a lack of a data-driven layer to connect data changes and process execution, making it difficult to realize automated scenarios where data changes trigger process flow.

[0004] Third, the concurrency control and distributed coordination capabilities are weak. Existing solutions mostly adopt a single-machine architecture design, which lacks a sound distributed lock mechanism in high-concurrency scenarios, making it difficult to guarantee the consistency of data operations.

[0005] Fourth, the multi-tenant isolation capability is insufficient. Most systems do not support a true multi-tenant architecture. Data from different business branches are mixed together without considering tenant isolation, which can easily lead to security risks of unauthorized data access.

[0006] Fifth, deployment and maintenance are complex. Existing solutions require the pre-installation of specific operating environments and dependencies during deployment, resulting in significant environment compatibility issues and increasing the complexity of operations and maintenance.

[0007] Therefore, there is an urgent need to develop a workflow management system based on dynamic data tables to solve the problems in the existing technology. Summary of the Invention

[0008] The purpose of this invention is to provide a workflow management system based on dynamic data tables, which can improve business agility, ensure system stability and reliability, and reduce operation and maintenance costs. It is also simple in structure and easy to use, thus solving the problems mentioned in the background art, such as difficulty in adapting to business changes, lack of linkage mechanism, weak concurrency control and distributed coordination capabilities, insufficient multi-tenant isolation capabilities, and complex deployment and operation and maintenance.

[0009] To achieve the above objectives, the present invention provides the following technical solution: A workflow management system based on dynamic data tables includes: The infrastructure layer implements services based on a persistent in-memory framework, uses an in-memory data structure storage system for caching and distributed locks, and uses a relational database for persistent data storage. The data access layer includes a dynamic data table management module, a general data model, a filter engine, an operation log recording module, a field validation engine, and a data comparison engine. The dynamic data table management module is used to define the metadata of the data table and create it at runtime. The general data model provides a unified interface for adding, deleting, modifying, and querying data. The business logic layer includes a data-driven engine, a workflow engine, an approval engine, and an event-driven engine. The data-driven engine comprises a data change interceptor, a rule matcher, a trigger condition evaluator, and a lock acquisition module. The data change interceptor is coupled with the CRUD methods of the general data model to trigger the rule matcher to query driving rules when data changes. The trigger condition evaluator is connected to the filter engine to evaluate whether the current data meets the trigger conditions. The lock acquisition module acquires a distributed lock through a distributed lock function and then calls the business logic under transaction protection. The workflow engine manages process definition, instantiation, and state transitions. The application service layer includes a multi-tenant isolation module, a multi-language support module, and an access control module; the multi-tenant isolation module implements tenant data isolation through business branch code; When data changes, the data-driven engine performs the following steps: intercepting data operations by setting hooks in the add, delete, and modify methods of the data model; matching driving rules by querying the driving rules configured for the data table; evaluating trigger conditions by using a filter engine to assess whether the current data meets the trigger conditions; acquiring a distributed lock by sending a lock acquisition request with atomicity parameters to the in-memory data structure storage system; executing driving logic by executing the business logic configured under transaction protection; and recording operation logs by writing data changes to a log table. The dynamic data table management module enables runtime expansion to avoid downtime maintenance, the data-driven engine enables a closed loop for data change triggering processes, and the distributed lock mechanism ensures data consistency in high-concurrency scenarios.

[0010] By adopting the above technical solutions, a layered architecture of the system was constructed. The data-driven engine intercepts, matches, locks, executes, and records data changes, thereby achieving the overall functions of data table runtime expansion, automatic triggering of business process closures by data changes, and data consistency under high concurrency.

[0011] As a further aspect of the present invention: the dynamic data table management module stores the field metadata of the data table through a field metadata table, including field name, type, length, display configuration, validation rules, and association relationships, and implements the grouping and display of fields through a field grouping table; when configuring a new data table, a table creation statement is generated based on the metadata, the table creation statement is executed to create a physical table, the metadata is cached in the in-memory data structure storage system, and a corresponding data operation log table is created; when adding a new field at runtime, a table structure modification instruction for adding the field is executed, the field metadata cache in the in-memory data structure storage system is updated, and null values ​​of existing data are filled with default values.

[0012] By adopting the above technical solution, configuring the data table through field metadata storage, and dynamically generating table creation statements and field addition statements at runtime, the functions of flexible expansion of the data table structure, metadata cache synchronization, and filling of default values ​​for existing data are realized.

[0013] As a further aspect of the present invention: the general data model implements unified data operations through a general model class, including: a data query interface for querying, a data insertion interface for inserting and automatically recording operation logs, a data update interface for updating and supporting field-level change tracking, and a data deletion interface for deleting and employing a soft deletion mechanism.

[0014] By adopting the above technical solution, a unified CRUD interface is provided through a general model class, which realizes the functions of standardized data operation, automatic recording of operation logs, field-level change tracking, and soft deletion mechanism.

[0015] As a further aspect of the present invention: the field validation engine implements a multi-layer validation mechanism, including: implementing field-level validation rules through a field validation rule table, supporting table-level uniqueness checks, validating field formats through regular expressions, and supporting complex validation by calling custom scripting language functions; the multi-layer validation mechanism also includes data interceptors, which include a creation interceptor that performs preprocessing before data insertion and an update interceptor that performs preprocessing before data updates, and the interceptors are dynamically loaded through namespaces and support chained calls.

[0016] By adopting the above technical solution, through field validation rule tables and data interceptors, the functions of strict format validation, uniqueness check, custom complex validation, and chained preprocessing logic before data operations are realized.

[0017] As a further aspect of the present invention: the system provides a dynamic model instantiation function to realize the dynamic creation of the data model. The dynamic model instantiation function obtains table metadata from the cache or database, obtains the field list and structured data field configuration, creates a general model instance and sets the cache. The dynamic model instantiation function has lazy loading, cache optimization and type awareness features, automatically identifies structured data fields and performs serialization and deserialization.

[0018] By adopting the above technical solution, configurations are obtained from the cache or database through the dynamic model instantiation function, realizing the functions of lazy loading of general models and automatic recognition and serialization processing of structured data.

[0019] As a further aspect of the present invention: the permission control module implements data permission management through a permission configuration table, supporting application user permissions, application node user permissions, application node user filtering permissions, application node rule user permissions, process node user permissions, process node user filtering permissions, and process node rule user permissions; permissions are granted to specified objects through permission granting methods, permissions are revoked to specified objects through permission revocation methods, and permission usage checks are performed to determine whether permissions are being used; the permission isolation mechanism is based on data isolation of business branch code, data access control based on user roles, and data operation permissions based on process nodes. The permission configuration table is stored in a relational database and is read and updated through a unified interface provided by the data access layer. When a user accesses data, the permission verification module queries this table and performs permission verification based on the business branch code and user role fields.

[0020] By adopting the above technical solution, and through permission configuration tables and multiple permission types, fine-grained multi-tenant data isolation and permission control functions based on business branches, user roles, and process nodes are realized.

[0021] As a further aspect of the present invention: the system adopts a multi-layered caching strategy that combines an in-memory data structure storage system with files, including metadata caching, list mapping caching, and configuration caching; the system integrates a full-text search engine, configures searchable fields and filterable fields, and automatically updates the search index to provide a full-text search response when data changes.

[0022] By adopting the above technical solution and integrating a multi-layer caching strategy with a full-text search engine, high-performance retrieval functions such as efficient metadata caching, query condition mapping, and automatic index updates after data changes are achieved.

[0023] As a further aspect of the present invention: the workflow engine defines the workflow using a process master table, a process version table, a process node table, a node connection table, a branch rule table, and a process splitting table; when a process is triggered to start, the start conditions are checked through the start condition check table, the applicable process version is matched through the process splitting table, a process instance table is created to record process instances, and a process step instance table is created to record process step instances, and the initialization driver of the node is executed; the process flow is implemented through the process flow service, supporting exclusive branches and parallel branches, and the branch rules are implemented through the filter engine.

[0024] By adopting the above technical solution, and through multiple workflow definition tables and flow services, the functions of process start-up check, version matching, instantiation, node initialization, and exclusive and parallel branch flow control are realized.

[0025] As a further aspect of the present invention: when the business data meets the push conditions, the event-driven engine triggers a push event, sends a globally unique request identifier to the queue, initializes the push consumer to obtain the request identifier from the queue, queries the push configuration, generates multilingual push content based on the push template and business data, writes the push content into the email push table and the instant messaging push table, and delivers the push task to the email sending queue and the instant messaging sending queue; the multilingual push content is dynamically generated based on the user's language preferences, loads the list of languages ​​supported by the system from the language information table, and generates rich text-enabled hypertext markup language email content.

[0026] By adopting the above technical solution, and through the queue and consumer mechanism, the function of dynamically generating and asynchronously sending multilingual rich text push messages based on user language preferences after business data is triggered is realized.

[0027] As a further aspect of the present invention: the system supports packaging the entire scripting language application into a single executable file, using an archive format file to package the application code into an archive file, downloading the scripting language micro-executable program, injecting a custom configuration file into the binary header, appending the archive file to the scripting language micro-executable program, adding execution permissions to generate the executable file; the system implements a database connection pool mechanism through an object-relational mapping framework, uses database transactions in data-driven execution, process flow, and batch operation scenarios, and uses the repeatable read isolation level by default.

[0028] By adopting the above technical solutions, and by packaging the script application into a single executable file and using database connection pools and transaction management, the system achieves simplified deployment and maintenance, as well as efficient reuse and consistency assurance of database connections.

[0029] Compared with the prior art, the beneficial effects of the present invention are: 1. This invention dynamically creates data tables based on metadata and introduces a data-driven engine, enabling flexible runtime expansion of the data table structure and automatic triggering of business processes by data changes, thereby improving business agility.

[0030] 2. By introducing distributed locks and transaction protection mechanisms into data operations, this invention can ensure the consistency of data operations and process flow in high-concurrency scenarios, thereby improving the reliability and stability of the system.

[0031] 3. This invention, through a multi-tenant isolation module and fine-grained permission control, can achieve complete independence of data and configuration for different tenants, thus ensuring system data security.

[0032] 4. By packaging the application into a single executable file, this invention simplifies system deployment and maintenance processes and avoids environmental compatibility issues.

[0033] Other features and advantages of the present invention will be disclosed in detail in the following detailed description and accompanying drawings. Attached Figure Description

[0034] Figure 1 This is a schematic diagram of the overall structure of a workflow management system based on a dynamic data table in an embodiment of the present invention. Detailed Implementation

[0035] 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.

[0036] In this embodiment of the invention, a workflow management system based on dynamic data tables is described, see [link to relevant documentation]. Figure 1 As shown, the architecture is layered, divided into the following layers from bottom to top: The infrastructure layer implements high-performance HTTP services based on the Workerman (a high-performance PHP socket framework) resident memory framework, uses Redis (remote dictionary service) as a cache, distributed lock, and message queue, and uses MySQL (relational database management system) as persistent data storage; the data access layer includes a dynamic data table management module, a general data model, a filter engine, operation log recording, a field validation engine, and a data comparison engine; the business logic layer includes a data-driven engine, a workflow engine, an approval engine, and an event-driven engine; the application service layer includes multi-tenant isolation, multi-language support, and access control; and the interface layer provides RESTful APIs (presentation layer state transition application programming interfaces) and binary packages.

[0037] Example 1 This embodiment details the dynamic data table management module and the dynamic model instantiation process in the data access layer.

[0038] The system stores the field metadata of the data table through the SheetfieldsModel table, including: Field name, type, length; Field display configuration, including labels and prompts; Field validation rules, including regular expressions, required fields, etc.; Field relationships, including associated tables and associated fields; Field grouping management: The SheetfieldgroupsModel is used to display fields in groups; Field system lock: Identifies core system fields to prevent accidental deletion.

[0039] The system supports 30+ field types, categorized as follows: basic type, selection type, time type, rich text type, file type, user type, geographic type, tag type, composite type, and system type (ID primary key).

[0040] The aforementioned metadata structure not only records the static attributes of the fields, but also provides a data foundation for the subsequent dynamic generation of physical table structures. By parsing this metadata, the system can accurately map the DDL (Data Definition Language) definitions required by the database.

[0041] When a user configures a new data table in the background, the system performs the following steps: generates a CREATETABLE SQL statement based on the metadata; executes the SQL to create the physical table; caches the metadata in Redis to improve query efficiency; and creates the corresponding data operation log table.

[0042] The system supports adding new fields at runtime without affecting existing data: executing the ALTER TABLE ADD COLUMN statement; updating the field metadata cache in Redis; and filling null values ​​in existing data with default values.

[0043] In this process, to prevent model instantiation errors caused by inconsistencies between the cache and the database, the system adopts a write penetration strategy, that is, the transaction is only committed after the physical table structure is successfully modified and the Redis cache is successfully updated; if an error occurs, the physical table changes are rolled back and the expired cache keys in Redis are deleted.

[0044] Unified data operations are achieved through the CommonModel data model, specifically including: The query interface `public function getDatas(fields, extends, map, order, page, limit)` is used to construct queries with complex conditions. The insert interface public function insert(data) automatically records the operation log during insertion; The update interface public function update(where, data) supports field-level change tracking; The delete interface public function del(where) uses a soft delete mechanism.

[0045] In this soft delete mechanism, the system marks status fields (such as dstatus) in the metadata. When the del method is executed, the actual SQL statement is intercepted and rewritten as an UPDATE statement, setting the dstatus field to 1. The filter condition dstatus = 0 is automatically appended to the query interface getDatas, thereby achieving logical isolation of the data.

[0046] The system implements a multi-layered validation mechanism: field-level validation rules are implemented through Sheetchecks; uniqueness validation supports table-level uniqueness checks; regular expression validation verifies field format using regular expressions; and custom function validation supports calling custom scripting language functions for complex validation.

[0047] Data interceptors support interception of creation and update operations. Creation interceptors perform preprocessing before data insertion, and update interceptors perform preprocessing before data update. Interceptors are dynamically loaded through the namespace: branches\{tenant}\functions\sheet\InterceptCreate. Chained calls of interceptors are supported to implement complex business logic.

[0048] In addition, the field comparison engine uses CompareLogic to perform complex data comparisons, supports comparisons of fields of the same type and across types, and supports field comparison symbols including equality comparison, range comparison, set comparison and fuzzy matching, and supports multi-level field access such as user.department.name.

[0049] The system provides the sheet() function to dynamically create the data model. Its execution logic is as follows: First, it retrieves table metadata from the cache or database. Next, retrieve the list of fields and the JSON field configuration: `fields = Fields->cache()->getFields(id);` and filter for JSON type fields. Finally, create a common model instance: `Model = new CommonModel(id, sheet['realsheet'], sheet['database']);` and set up caching.

[0050] This mechanism features lazy loading, caching optimization, and type awareness, automatically recognizing JSON fields and correctly serializing / deserializing them. In type-aware processing, when a field is detected as JSON type, the system automatically calls json_encode for serialization before writing to the database and json_decode for deserialization after reading, ensuring smooth access to complex structured data in relational databases.

[0051] Example 2 The technical difference between this embodiment and Embodiment 1 is that this embodiment details the data-driven engine, workflow engine, and related concurrency control mechanisms in the business logic layer.

[0052] The system stores data driver configurations through the DriversModel table, including driver type (e.g., insert / update / delete driver), trigger conditions (e.g., filter expressions), and execution content (e.g., SQL statements, function calls, process triggers).

[0053] When data changes, the system performs the following steps: intercepts data operations by setting hooks in the insert / update / delete methods of the data model; matches driving rules by querying all driving rules configured for the data table; evaluates trigger conditions by using the filter engine to assess whether the current data meets the trigger conditions; acquires a distributed lock by using the withLock() function to acquire a Redis distributed lock to prevent concurrent conflicts; executes driving logic by executing the business logic configured in the driving mechanism under transaction protection; and records operation logs by writing data changes to the DatalogsModel table.

[0054] When evaluating trigger conditions, the filter engine recursively computes the values ​​based on the configured Boolean expression tree. Let the conditional expression of the driving rule be C, and the current dataset be D. For a single condition node... ,in For field names, For comparison operators, such as >, =, in, like, The evaluation function is defined as follows, with the target value as the objective:

[0055] For complex conditions, logical operators are used for combination. Let the "AND" operation be... The "or" operation is The overall evaluation formula is:

[0056] when When the conditions are met, the system enters the distributed lock acquisition phase.

[0057] The system implements a Redis-based distributed lock mechanism: function withLock(lockKey, callback, maxRetries = 50).

[0058] This mechanism sends a lock acquisition request with atomic parameters, such as the NX and EX parameters in the SET NX EX command, to the memory data structure storage system to achieve atomic lock acquisition. The lock value is stored in the request's reqGuid to identify the lock owner. It also has an automatic retry mechanism, retrying up to 50 times, and the lock timeout is automatically calculated to avoid deadlock.

[0059] The logic for calculating the lock's timeout is crucial; let the maximum number of retries be... The retry waiting interval is The maximum execution time for a single business logic drive is The safety margin time constant is Then the lock timeout period The calculation formula is:

[0060] This formula ensures that the lock timeout is greater than the sum of the maximum retry time and the maximum execution time, which guarantees that the current thread has enough time to complete the transaction commit and drive execution, while preventing deadlocks caused by thread crashes from occupying resources for a long time.

[0061] The system must complete driver matching and lock acquisition before committing data operations to ensure the atomicity of driver execution and data operations.

[0062] The workflow engine uses the following core models to define workflows: WorkflowsModel (workflow master table), WorkflowversionsModel (workflow version table), WorkflownodesModel (workflow node table), WorkflowlinksModel (node ​​connection table), WorkflowbranchrulesModel (branch rule table), and WorkflowsplitsModel (workflow split table).

[0063] When a process is triggered to start: the start conditions are checked via WorkflowstartchecksModel; the applicable process version is matched via WorkflowsplitsModel; a RunworkflowsModel process instance is created; a RunworkflowstepsModel process step instance is created; and the initialization driver for the node is executed.

[0064] The workflow is implemented through the FlowService service: checking the current node status and permissions; executing the node commit driver; determining the next node based on connection relationships and branch rules; creating a step instance for the next node; and executing the node initialization driver.

[0065] The system supports two branch types: exclusive branch, which executes only the first branch that meets the condition, and parallel branch, which executes all branches that meet the condition simultaneously.

[0066] In addition, the system supports version management at the data table level, including: version number management, which automatically increments the version number each time the table structure changes; version compatibility check, which checks version compatibility during upgrades; and canary release support, which supports running new and old versions simultaneously.

[0067] The system records all data change operations through the DatalogsModel table. The log records include: operation type (such as insert, update, delete), data before operation (a complete snapshot of the data before the change), data after operation (a complete snapshot of the data after the change), operator information (the ID and timestamp of the operator), and request trace (all operations of the same request are associated with a globally unique identifier for the request). The log data is written asynchronously, so it does not affect the performance of the main business.

[0068] Example 3 The technical difference between this embodiment and Embodiment 1 is that this embodiment describes the specific implementation methods of the application service layer, data caching mechanism, and interface layer.

[0069] The system implements flexible data permission management through AuthsModel, supporting permission usage scenarios such as appuser, appnodeuser, appnodeuserFilter, appnoderuleuser, flownodeuser, flownodeuserFilter, and flownoderuleuser.

[0070] Permission operation methods include giveauth() to grant permissions to a specified object, removeauth() to revoke permissions to a specified object, and checkUsed() to check whether permissions are being used to prevent accidental deletion.

[0071] The access control mechanism is based on data isolation of business branch code, data access control based on user roles, and data operation permissions based on process nodes.

[0072] When performing data queries, the system automatically appends branchcode = current tenant code to the WHERE condition of the SQL query based on the current user's tenant identifier, thereby achieving physical data isolation for multiple tenants.

[0073] The system adopts a multi-layered caching strategy using Redis and files, including metadata caching, list mapping caching, and configuration caching. In one feasible embodiment, the list mapping cache includes a query condition mapping cache with a 10-minute validity period.

[0074] The system integrates MeiliSearch (an open-source full-text search engine), and its search features include: configurable searchable fields (specifying which fields participate in the full-text search); configurable filterable fields (specifying which fields are used for precise filtering); automatic index management (automatically updating the search index when data changes); and millisecond-level full-text search response time.

[0075] When the system performs an insert or update operation, it will asynchronously trigger an index update task, which will push the unique identifier of the changed data and the latest field value to the MeiliSearch engine, and the engine will complete the reconstruction of the inverted index internally.

[0076] The event-driven push system stores push configurations through the SheetpushsModel push main table, SheetpushextsModel push extension table, PushsModel push instance table, PushemailsModel email push table, and PushdingsModel DingTalk push table.

[0077] When business data meets the push conditions: a Push event is triggered, and reqGuid is sent to the Redis queue; the Initpush consumer retrieves the request ID from the queue; all push configurations for the request are queried; multilingual push content is generated based on the push template and business data; the push content is written to PushmailsModel and PushdingsModel; and the push task is delivered to the send-mail and send-dingmsg queues.

[0078] Multilingual push notification generation supports dynamic push content generation based on user language preferences: load the list of supported languages ​​from LangsModel; generate titles and content for each language according to the push template; format the field values ​​of associated data by language; and generate HTML email content that supports rich text.

[0079] To ensure the reliability of push notifications, the queue consumer implements an idempotency check mechanism. Before sending, it checks whether a successful sending record already exists in the PushsModel based on the reqGuid and push configuration ID. If it does, it skips the sending process to avoid duplicate pushes due to retries.

[0080] The system supports packaging the entire PHP application into a single executable file. The specific packaging process is as follows: use Phar (PHP archive file format) to package the application code into a phar file; download the corresponding version of the PHP microprogram (php.micro.sfx); inject the custom PHP.ini configuration into the binary header; append the Phar file to the PHP microprogram; add execution permissions, and generate a directly runnable executable file.

[0081] This technology eliminates the need for a pre-installed PHP environment, simplifies operations and maintenance with its single-file deployment, includes all dependencies, and avoids environment compatibility issues.

[0082] The system implements a database connection pool mechanism through ThinkORM (a PHP object-relational mapping framework). The connection pool parameters include max_connections (maximum number of connections, default 5); min_connections (minimum number of connections, default 1); wait_timeout (wait timeout, default 3 seconds); and idle_timeout (idle timeout, default 60 seconds).

[0083] The system uses database transactions in data-driven execution, process flow, and batch operation scenarios, and uses the REPEATABLE READ isolation level by default to prevent non-repeatable reads and phantom reads, thus ensuring data consistency.

[0084] This invention provides a workflow management system based on dynamic data tables, which can improve business agility, ensure system stability and reliability, and reduce operation and maintenance costs.

[0085] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.

[0086] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.

Claims

1. A workflow management system based on dynamic data tables, characterized in that, include: The infrastructure layer implements services based on a persistent in-memory framework, uses an in-memory data structure storage system for caching and distributed locks, and uses a relational database for persistent data storage. The data access layer includes a dynamic data table management module, a general data model, a filter engine, an operation log recording module, a field validation engine, and a data comparison engine. The dynamic data table management module stores field metadata through a field metadata table and generates table creation statements based on the metadata to create physical tables. The general data model provides a unified interface for adding, deleting, modifying, and querying operations. The business logic layer includes a data-driven engine, a workflow engine, an approval engine, and an event-driven engine. The data-driven engine includes a data change interceptor, a rule matcher, a trigger condition evaluator, and a lock acquisition module. The data change interceptor is coupled with the add, delete, and modify methods of the general data model to trigger the rule matcher to query the driving rules when data changes. The trigger condition evaluator is connected to the filter engine to evaluate whether the current data meets the trigger condition; After acquiring the distributed lock through the distributed lock function, the lock acquisition module calls the business logic under transaction protection; the workflow engine is used to manage process definition, instantiation, and state transition. The application service layer includes a multi-tenant isolation module, a multi-language support module, and an access control module; The multi-tenant isolation module achieves tenant data isolation through business branch code; The data-driven engine performs the following steps when data changes: intercepting data operations and setting hooks in the add, delete, and modify methods of the data model; Match driving rules by querying the driving rules configured for the data table; evaluate trigger conditions by using the filter engine to assess whether the current data meets the trigger conditions. To acquire a distributed lock, a lock acquisition request with atomicity parameters is sent to the memory data structure storage system. Execute the driving logic, and execute the business logic configured by the driver under transaction protection; Record operation logs and write data changes to the log table.

2. The workflow management system based on dynamic data tables according to claim 1, characterized in that, The dynamic data table management module stores data tables through a field metadata table, where field metadata includes field name, type, length, display configuration, validation rules, and association relationships, and displays fields in groups through a field grouping table; When configuring a new data table, a table creation statement is generated based on the metadata, the table creation statement is executed to create the physical table, the metadata is cached in the in-memory data structure storage system, and the corresponding data operation log table is created. When adding a new field at runtime, a table structure modification instruction for adding the field is executed, the field metadata cache in the in-memory data structure storage system is updated, and null values ​​of existing data are filled with default values.

3. A workflow management system based on dynamic data tables according to claim 1, characterized in that, The general data model implements unified data operations through a general model class, including: a data query interface for querying, a data insertion interface for inserting and automatically recording operation logs, a data update interface for updating and supporting field-level change tracking, and a data deletion interface for deleting and using a soft deletion mechanism.

4. A workflow management system based on dynamic data tables according to claim 1, characterized in that, The field validation engine implements a multi-layer validation mechanism, including: implementing field-level validation rules through a field validation rule table, supporting table-level uniqueness checks, validating field formats through regular expressions, and supporting complex validation by calling custom scripting language functions; the multi-layer validation mechanism also includes data interceptors, which include a creation interceptor that performs preprocessing before data insertion and an update interceptor that performs preprocessing before data updates. The interceptors are dynamically loaded through namespaces and support chained calls.

5. A workflow management system based on dynamic data tables according to claim 1, characterized in that, The system provides a dynamic model instantiation function to realize the dynamic creation of data models. The dynamic model instantiation function retrieves table metadata from the cache or database, obtains the field list and structured data field configuration, creates a general model instance and sets the cache. The dynamic model instantiation function features lazy loading, cache optimization, and type awareness, automatically identifying structured data fields and performing serialization and deserialization.

6. A workflow management system based on dynamic data tables according to claim 1, characterized in that, The permission control module implements data permission management through a permission configuration table, supporting application user permissions, application node user permissions, application node user filtering permissions, application node rule user permissions, process node user permissions, process node user filtering permissions, and process node rule user permissions. Grant permissions to a specified object using the permission grant method, revoke permissions to a specified object using the permission revoke method, and check whether a permission is being used using the permission use check method. The access control mechanism is based on data isolation of business branch code, data access control based on user roles, and data operation permissions based on process nodes. The permission configuration table is stored in a relational database and is read and updated through a unified interface provided by the data access layer. When a user accesses data, the permission verification module queries the table and performs permission verification based on the business branch code and user role field.

7. A workflow management system based on dynamic data tables according to claim 1, characterized in that, The system employs a multi-layered caching strategy that combines an in-memory data structure storage system with files, including metadata caching, list mapping caching, and configuration caching. The system integrates a full-text search engine, configures searchable and filterable fields, and automatically updates the search index to provide full-text search responses when data changes.

8. A workflow management system based on dynamic data tables according to claim 1, characterized in that, The workflow engine defines workflows using a master process table, a version process table, a node process table, a connection node table, a branch rule table, and a split process table. When a process is triggered to start, the engine checks the start conditions using a start condition check table, matches the applicable process version using a split process table, creates a process instance table to record process instances and a process step instance table to record process step instances, and executes the node initialization driver. Process transitions are implemented through a process transition service, supporting exclusive branches and parallel branches, with branch rules implemented through a filter engine.

9. A workflow management system based on dynamic data tables according to claim 1, characterized in that, When the business data meets the push conditions, the event-driven engine triggers a push event, sends a globally unique request identifier to the queue, initializes the push consumer to obtain the request identifier from the queue, queries the push configuration, generates multilingual push content based on the push template and business data, writes the push content into the email push table and the instant messaging push table, and delivers the push task to the email sending queue and the instant messaging sending queue. The multilingual push content is dynamically generated based on the user's language preferences. It loads the list of languages ​​supported by the system from the language information table and generates email content in hypertext markup languages ​​that support rich text.

10. A workflow management system based on dynamic data tables according to claim 1, characterized in that, The system supports packaging the entire scripting language application into a single executable file, using an archive format file to package the application code into an archive file, downloading the scripting language micro-executor, injecting a custom configuration file into the binary header, appending the archive file to the scripting language micro-executor, adding execution permissions to generate the executable file; The system implements a database connection pool mechanism through an object-relational mapping framework, and uses database transactions in data-driven execution, process flow, and batch operation scenarios, with the repeatable read isolation level used by default.