Workflow model establishment and execution method supporting multiple tenants and related system
By supporting a multi-tenant workflow model establishment method, using organizational codes to identify tenants, configuring relevant parameters and process nodes of the workflow model, and generating unique codes, the problem of different branches being unable to execute the same process model is solved, achieving consistency and scalability of cross-organizational process management, and improving the system's uniformity, flexibility, and controllability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XIAN THERMAL POWER RES INST CO LTD
- Filing Date
- 2026-01-16
- Publication Date
- 2026-05-08
AI Technical Summary
Different branches cannot implement the same workflow model, which makes it impossible to define approval processes in business systems differently, affecting the consistency and scalability of cross-organizational process management.
Tenants are identified by organizational codes. A workflow model that supports multiple tenants is adopted. The relevant parameters and process nodes of the workflow model are configured to generate unique codes, so as to achieve a balance between isolation and sharing of the process model and ensure the independence and security of each branch.
It achieves consistency and scalability in cross-organizational process management, simplifies the reuse and maintenance of process models, improves the traceability and reliability of the system, reduces development and maintenance costs, and enhances the uniformity, flexibility and controllability of the workflow system.
Smart Images

Figure CN121998395A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of workflow model establishment, specifically relating to a method and related system for establishing a workflow model that supports multi-tenancy. Background Technology
[0002] Workflow is a widely used technology. For large group enterprises with numerous branches, there are differences in organizational hierarchy and job positions. Even with the same approval process, the specific approval steps can vary. For example, in the expense reimbursement approval process, an employee in branch A might need two levels of approval, an employee in branch B might need three levels, and an employee in branch C might need four levels. This requires the business system's approval process to be differentiated based on the branch. Workflow multi-tenancy is one solution. This solution allows different branches to define their own approval process models. When employees from different branches log into the system and initiate the same application, they actually execute the process model defined by their respective branches. Summary of the Invention
[0003] The purpose of this invention is to overcome the problem that different branches cannot execute the same process model, and to provide a method and related system for establishing a workflow model that supports multi-tenancy.
[0004] To achieve the above objectives, the present invention adopts the following technical solution: In a first aspect, the present invention provides a method for establishing a workflow model that supports multi-tenancy, comprising the following steps: Obtain the command to execute the newly created workflow model; Create a new workflow model, configure the relevant parameters of the workflow model and the corresponding organization code of the workflow model, and use the organization code as the tenant ID of the workflow model to complete the configuration of the basic data of the workflow model. Configure the workflow and process nodes of the workflow model, and configure the key information of the workflow and process nodes to complete the configuration of the workflow model process data. Save the basic data and process data of the workflow model as a new workflow model; The new workflow model is published, key data for its publication is generated, and a unique code is generated and saved based on the basic data of the new workflow model, thus completing the establishment of a multi-tenant workflow model.
[0005] A further improvement of this invention is that the relevant parameters of the workflow model include the workflow model name and the workflow model code.
[0006] A further improvement of this invention is that the key information of the process node includes the approver or role of the process node, as well as the listener information of the process node.
[0007] A further improvement of this invention is that the unique code of the new workflow model includes the model code, version number, and tenant ID of the new workflow model.
[0008] Secondly, the present invention provides a workflow model establishment system supporting multi-tenancy, comprising: Build a data acquisition module to acquire the execution commands of the newly created workflow model; The basic data configuration module is used to create a new workflow model and configure the relevant parameters of the workflow model and the organization code corresponding to the workflow model. The organization code is used as the tenant ID of the workflow model to complete the configuration of the basic data of the workflow model. The process data configuration module is used to configure the workflow and process nodes of the workflow model, and to configure the key information of the workflow and process nodes, thus completing the configuration of the workflow model process data. The workflow model generation module is used to save the basic data and process data of the workflow model as a new workflow model. The model publishing module is used to publish new workflow models, generate key data for publishing new workflow models, and generate and save unique codes based on the basic data of new workflow models, thus completing the establishment of workflow models that support multi-tenancy.
[0009] Thirdly, the present invention provides a workflow model execution method supporting multi-tenancy, comprising the following steps: Obtain the tenant ID and related workflow; Select the corresponding workflow model based on the obtained tenant ID, match the selected workflow model with the corresponding workflow based on the obtained relevant workflow, and generate workflow to-do tasks based on the completed workflow model with the matched workflow. Once the current workflow task is completed, a corresponding workflow task is generated at the next workflow node based on the workflow model's process data, until the workflow ends.
[0010] A further improvement of this invention is that, after generating a workflow task, the corresponding workflow task can be obtained by inputting the corresponding tenant ID and current user information, and the current workflow task can be completed.
[0011] Fourthly, the present invention provides a workflow model execution system supporting multi-tenancy, comprising: The execution information acquisition module is used to obtain the tenant ID and related workflows; The task generation module is used to select the corresponding workflow model based on the obtained tenant ID, match the selected workflow model with the corresponding workflow based on the obtained relevant workflow, and generate workflow tasks based on the completed workflow model with the matched workflow. The pending task processing module is used to generate corresponding pending tasks in the next process node based on the process data of the workflow model when the current pending task is completed, until the process ends.
[0012] Fifthly, the present invention provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement a method for establishing a workflow model that supports multi-tenancy.
[0013] In a sixth aspect, the present invention provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of a workflow model execution method supporting multi-tenancy.
[0014] Compared with the prior art, the present invention has the following beneficial effects: This invention achieves a unified balance between multi-tenant isolation and shared workflow models. By identifying tenants through organizational codes, different branches can build process models based on a unified workflow modeling framework, while ensuring their independence and security, and avoiding interference between process definitions. This invention improves the consistency and scalability of cross-organizational process management. The unified modeling method ensures consistency across branches in process logic, node configuration, and key data generation, facilitating centralized management and overall optimization by headquarters. Simultaneously, it supports generating and saving unique codes for different tenants, ensuring rapid identification and tracking even during system expansion. This invention simplifies the reuse and maintenance of process models. When executing the same type of business, branches can directly and quickly build or reuse workflow models based on a unified template without repeatedly designing process structures and node configurations, reducing development and maintenance costs and improving deployment efficiency. This invention enhances the traceability and reliability of the workflow system. Each newly released model generates a corresponding unique code and key release data, which not only provides a reliable basis for model lifecycle management but also ensures rapid location and backtracking during subsequent audits, upgrades, or anomaly handling. In conclusion, this invention effectively solves the problem of different branches being unable to execute the same process model in a multi-tenant environment, improving the system's uniformity, flexibility, and controllability, and providing robust support for workflow management in large-scale enterprises or institutions. Attached Figure Description
[0015] Figure 1 This is a flowchart of the workflow model establishment method supporting multi-tenancy in this invention; Figure 2 This is a system diagram of the workflow model establishment method supporting multi-tenancy in this invention; Figure 3 This is a flowchart of the workflow model execution method supporting multi-tenancy in this invention; Figure 4 This is a system diagram of the workflow model execution method supporting multi-tenancy in this invention; Figure 5 This is a system diagram of Example 3. Detailed Implementation
[0016] To further understand the content of this invention, the invention will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the embodiments are merely illustrative and not limiting of the invention.
[0017] See Figure 1 A method for establishing a workflow model that supports multi-tenancy includes the following steps: S1, retrieve the command to execute the newly created workflow model.
[0018] S2, create a new workflow model, configure the relevant parameters of the workflow model and the corresponding organization code of the workflow model, use the organization code as the tenant ID of the workflow model, and complete the configuration of the basic data of the workflow model.
[0019] S3 configures the workflow and process nodes of the workflow model, and configures the key information of the workflow and process nodes to complete the configuration of the workflow model process data.
[0020] S4 saves the basic data and process data of the workflow model as a new workflow model.
[0021] S5 publishes the new workflow model, generates key data for its publication, and saves a unique code based on the basic data of the new workflow model, thus completing the establishment of a multi-tenant workflow model.
[0022] See Figure 2 A workflow model establishment system supporting multi-tenancy includes: Build a data acquisition module to obtain the execution commands for the newly created workflow model.
[0023] The basic data configuration module is used to create a new workflow model, configure the relevant parameters of the workflow model and the corresponding organization code of the workflow model, and use the organization code as the tenant ID of the workflow model to complete the configuration of the basic data of the workflow model.
[0024] The process data configuration module is used to configure the workflow and process nodes of the workflow model, and to configure the key information of the workflow and process nodes, thus completing the configuration of the workflow model process data.
[0025] The workflow model generation module is used to save the basic data and process data of the workflow model as a new workflow model.
[0026] The model publishing module is used to publish new workflow models, generate key data for publishing new workflow models, and generate and save unique codes based on the basic data of new workflow models, thus completing the establishment of workflow models that support multi-tenancy.
[0027] See Figure 3 A workflow model execution method that supports multi-tenancy includes the following steps: S1, obtain the tenant ID and related workflow.
[0028] S2: Select the corresponding workflow model based on the obtained tenant ID, match the selected workflow model with the corresponding workflow based on the obtained relevant workflow, and generate workflow to-do tasks based on the completed workflow model with the matched workflow.
[0029] S3: When the current workflow task is completed, the corresponding workflow task is generated at the next workflow node based on the workflow model's process data, until the process ends.
[0030] See Figure 4 A workflow model execution system supporting multi-tenancy includes: The execution information acquisition module is used to obtain the tenant ID and related workflows; The task generation module is used to select the corresponding workflow model based on the obtained tenant ID, match the selected workflow model with the corresponding workflow based on the obtained relevant workflow, and generate workflow tasks based on the completed workflow model with the matched workflow. The pending task processing module is used to generate corresponding pending tasks in the next process node based on the process data of the workflow model when the current pending task is completed, until the process ends.
[0031] Example 1: In this embodiment, the workflow model management module, workflow model designer module, workflow model saving interface, and workflow model publishing interface work together to achieve the following steps: The workflow model management module receives the execution command for creating a new workflow model, triggering the creation of a new process. The system generates a model name, model code, and corresponding organization code within the new process. The organization code is set as the tenant ID of the workflow model, used to distinguish workflow models corresponding to different organizations, thus ensuring independence in a multi-tenant environment.
[0032] The system generates basic data for the workflow model based on the newly created information. This basic data includes the model name, model code, and tenant ID. When the workflow model saving interface receives this basic data, it verifies the model code and tenant ID to prevent duplicate codes and ensure the uniqueness of the model data.
[0033] After completing the basic data configuration, the system calls the workflow model designer module to perform process-oriented modeling of the workflow model. The designer module establishes workflows and process nodes in a configurable manner. The process nodes contain settings for key information, including the approval role corresponding to the node, the node processing conditions, and listener parameters, thereby forming complete process data.
[0034] Once the basic data and process data are configured, the system calls the save interface to store the workflow model. The saved model includes the basic data and process data, and serves as a callable process model for subsequent operations.
[0035] Furthermore, the system calls the workflow model deployment interface to deploy the saved process model to the process definition deployment table. During the deployment process, the system automatically generates a version number, and the uniqueness of the process definition is determined by the model code, version number, and tenant ID. Through the above constraints, models of the same business process have the same model code, while differentiated models between different organizations are distinguished by the tenant ID, thereby realizing process model management in a cross-organizational multi-tenant environment.
[0036] In addition, the workflow model management module also provides extended management functions for process models, including but not limited to: model list query, new model creation, model editing, model saving, model deletion, model viewing, model copying, model downloading, model importing, and model publishing, to support flexible management and iterative updates of workflow models throughout their entire lifecycle.
[0037] Through the above embodiments, the method of the present invention can not only realize the rapid construction and unique management of process models in a multi-tenant environment, but also ensure the version controllability, flexible expansion and cross-organizational distinguishability of process models, thereby effectively improving the maintainability and adaptability of workflow systems.
[0038] Example 2: In this embodiment, the method includes the following steps: Step one: The user initiates a workflow operation within a specific business function module, passing the workflow model code, tenant ID, and business-related workflow variables to the workflow system. Upon receiving these parameters, the workflow system determines the corresponding latest version of the workflow model based on the workflow model code and tenant ID, and starts the corresponding workflow instance. After the workflow instance starts successfully, the workflow system returns the workflow instance ID to the business function module and simultaneously generates the first workflow task according to the workflow model definition.
[0039] Step two: During the execution of the workflow instance, the workflow pending task query module returns the pending task information to be processed by the user based on the input workflow model code, tenant ID, and current user information. Users can perform task query operations within specific business function modules, and the system will provide a list of pending tasks based on the current status of the workflow instance and the workflow model definition.
[0040] Step three: Users execute pending tasks according to business needs. After receiving the user's task execution result, the workflow task execution module automatically generates new pending tasks based on the process model definition of the process instance. When the task at a certain process node is completed, the system automatically generates the corresponding pending task at the next process node based on the process data of the process model, until all nodes of the process instance are executed.
[0041] Step four: Throughout the entire process, the system uses tenant IDs to isolate and manage different tenants. Each tenant ID serves as a unique identifier for its organization and corresponds one-to-one with the process model code, ensuring that each tenant in a multi-tenant environment can independently execute its own workflow model, and that workflow tasks between different tenants do not interfere with each other. This approach enables precise workflow initiation, orderly task flow, and closed-loop control in a multi-tenant environment, improving the system's scalability and versatility.
[0042] Through the above implementation methods, the present invention achieves unified management and efficient execution of multi-tenant workflow models under the same system platform. It can ensure the independence of different tenants and improve the overall processing efficiency by utilizing the general capabilities of the process system, thus having strong practical application value.
[0043] Example 3: Please see Figure 5 As shown, the present invention also provides an electronic device 100 that supports the establishment and execution of a multi-tenant workflow model; the electronic device 100 includes a memory 101, at least one processor 102, a computer program 103 stored in the memory 101 and executable on the at least one processor 102, and at least one communication bus 104.
[0044] The memory 101 can be used to store the computer program 103. The processor 102 implements the steps of the multi-tenant workflow model establishment and execution method described in Embodiment 1 by running or executing the computer program stored in the memory 101 and calling the data stored in the memory 101. The memory 101 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device 100 (such as audio data), etc. In addition, the memory 101 may include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other non-volatile solid-state storage device.
[0045] The at least one processor 102 may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor 102 may be a microprocessor or any conventional processor. The processor 102 is the control center of the electronic device 100, connecting various parts of the electronic device 100 via various interfaces and lines.
[0046] The memory 101 in the electronic device 100 stores multiple instructions to implement a workflow model establishment method supporting multi-tenancy, and the processor 102 can execute the multiple instructions to achieve the following: Obtain the command to execute the newly created workflow model; Create a new workflow model, configure the relevant parameters of the workflow model and the corresponding organization code of the workflow model, and use the organization code as the tenant ID of the workflow model to complete the configuration of the basic data of the workflow model. Configure the workflow and process nodes of the workflow model, and configure the key information of the workflow and process nodes to complete the configuration of the workflow model process data. Save the basic data and process data of the workflow model as a new workflow model; The new workflow model is published, key data for its publication is generated, and a unique code is generated and saved based on the basic data of the new workflow model, thus completing the establishment of a multi-tenant workflow model.
[0047] The memory 101 in the electronic device 100 stores multiple instructions to implement a workflow model execution method supporting multi-tenancy, and the processor 102 can execute the multiple instructions to achieve the following: Obtain the tenant ID and related workflow; Select the corresponding workflow model based on the obtained tenant ID, match the selected workflow model with the corresponding workflow based on the obtained relevant workflow, and generate workflow to-do tasks based on the completed workflow model with the matched workflow. Once the current workflow task is completed, a corresponding workflow task is generated at the next workflow node based on the workflow model's process data, until the workflow ends.
[0048] Example 4: If the modules / units integrated in the electronic device 100 are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).
[0049] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0050] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0051] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0052] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0053] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A method for establishing a workflow model that supports multi-tenancy, characterized in that, Includes the following steps: Obtain the command to execute the newly created workflow model; Create a new workflow model, configure the relevant parameters of the workflow model and the corresponding organization code of the workflow model, and use the organization code as the tenant ID of the workflow model to complete the configuration of the basic data of the workflow model. Configure the workflow and process nodes of the workflow model, and configure the key information of the workflow and process nodes to complete the configuration of the workflow model process data. Save the basic data and process data of the workflow model as a new workflow model; The new workflow model is published, key data for its publication is generated, and a unique code is generated and saved based on the basic data of the new workflow model, thus completing the establishment of a multi-tenant workflow model.
2. The method for establishing a workflow model supporting multi-tenancy according to claim 1, characterized in that, The relevant parameters of the workflow model include the workflow model name and the workflow model code.
3. The method for establishing a workflow model supporting multi-tenancy according to claim 1, characterized in that, Key information for process nodes includes the approver or role of the process node, as well as the listener information for the process node.
4. The method for establishing a workflow model supporting multi-tenancy according to claim 1, characterized in that, The unique code for the new workflow model includes the model code, version number, and tenant ID.
5. A workflow model establishment system supporting multi-tenancy, characterized in that, include: Build a data acquisition module to acquire the execution commands of the newly created workflow model; The basic data configuration module is used to create a new workflow model and configure the relevant parameters of the workflow model and the organization code corresponding to the workflow model. The organization code is used as the tenant ID of the workflow model to complete the configuration of the basic data of the workflow model. The process data configuration module is used to configure the workflow and process nodes of the workflow model, and to configure the key information of the workflow and process nodes, thus completing the configuration of the workflow model process data. The workflow model generation module is used to save the basic data and process data of the workflow model as a new workflow model. The model publishing module is used to publish new workflow models, generate key data for publishing new workflow models, and generate and save unique codes based on the basic data of new workflow models, thus completing the establishment of workflow models that support multi-tenancy.
6. A workflow model execution method supporting multi-tenancy, characterized in that, The workflow model established based on the workflow model establishment method supporting multi-tenancy as described in claim 1 includes the following steps: Obtain the tenant ID and related workflow; Select the corresponding workflow model based on the obtained tenant ID, match the selected workflow model with the corresponding workflow based on the obtained relevant workflow, and generate workflow to-do tasks based on the completed workflow model with the matched workflow. Once the current workflow task is completed, a corresponding workflow task is generated at the next workflow node based on the workflow model's process data, until the workflow ends.
7. The workflow model execution method supporting multi-tenancy according to claim 6, characterized in that, After generating a workflow task, the user can retrieve the corresponding workflow task by inputting the tenant ID and current user information, and then complete the current workflow task.
8. A workflow model execution system supporting multi-tenancy, characterized in that, include: The execution information acquisition module is used to obtain the tenant ID and related workflows; The task generation module is used to select the corresponding workflow model based on the obtained tenant ID, match the selected workflow model with the corresponding workflow based on the obtained relevant workflow, and generate workflow tasks based on the completed workflow model with the matched workflow. The pending task processing module is used to generate corresponding pending tasks in the next process node based on the process data of the workflow model when the current pending task is completed, until the process ends.
9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the workflow model establishment method supporting multi-tenancy as described in any one of claims 1 to 4.
10. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the workflow model execution method supporting multi-tenancy as described in any one of claims 6 to 7.