Enterprise-level workflow engine implementation method and system based on microservice SaaS

Through the implementation method of enterprise-level workflow engine based on microservice SaaS, the online process designer and the expansion node of the BPMN2.0 protocol are used to solve the problems of complex configuration and incomplete functions of the existing SaaS platform tenant workflow engine, and achieve high maintainability and high scalability approval flow.

CN114493479BActive Publication Date: 2025-05-02SHANGHAI ZHENYUN INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111556056.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-17
Publication Date
2025-05-02
Estimated Expiration
2041-12-17

AI Technical Summary

Technical Problem

The existing SaaS platform tenant workflow engine has complex configuration, high usage cost and incomplete functions, which makes it difficult to achieve high maintainability and high scalability of approval flows.

Method used

The enterprise-level workflow engine implementation method based on microservice SaaS is adopted, and process definition is performed through the online process designer, and the extended node storage of the BPMN2.0 protocol is added, including approval rules, approval methods, jump conditions and service calls. Predefined process forms, find approval personnel and execute custom logic in manual nodes through approval rules and service calls.

Benefits of technology

It realizes high maintainability and scalability of approval flows in multiple tenants and multiple business scenarios, reduces the difficulty and code volume of process engines, and improves the portability and friendliness of workflow engines.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114493479B_ABST
    Figure CN114493479B_ABST
Patent Text Reader

Abstract

An enterprise-level workflow engine implementation method and system based on microservice SaaS, which defines the process through an online process designer, adds an extension node according to the BPMN2.0 protocol to store customized business configuration, including approval rules, approval methods, jump conditions and service calls; pre-defines the process form, which includes a read-only form and an editable form, and displays the business document details during approval through the process form; searches for the approver at the manual node through the approval rules, determines whether the specified conditions are met through the approval method, leaves the current manual node and continues to flow downward, controls the direction of the process branch through the jump conditions, and remotely calls the business module at the specified node through the service call to execute the customized logic. The present invention realizes high maintainability and high scalability of the approval flow under multi-tenant and multiple business scenarios, greatly improving the availability of the workflow engine.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method and system for realizing an enterprise-level workflow engine based on microservice SaaS, and belongs to the technical field of business data processing. Background Art

[0002] As the business develops, enterprises that use traditional local deployment software often cannot keep up with the development speed and strategic changes of the enterprise. Local deployment has problems such as high operation and maintenance costs, difficult upgrades, and difficulty in meeting personalized needs in a timely manner. Therefore, the SaaS platform came into being, software as a service, and suppliers uniformly deploy the software on cloud servers for unified operation and maintenance. Customers only need to pay a certain subscription fee to use the service, and can flexibly purchase extended services and customized development. The process of enterprise information approval is also a necessary path for enterprise development. OA systems, financial systems, and almost most complex business systems require workflow engines to connect manual approval and system automation.

[0003] Traditional workflow engines are generally divided into built-in and external. Built-in means directly integrating the workflow engine into a certain business system, such as the workflow engine of the OA system, which is directly coupled with the OA system, lacks flexibility and has a narrow scope of application. External workflow engines are generally deployed independently and connected to various systems as a third-party system. The existing mainstream business systems need to access the approval process. Usually, a complex process design is required to access the approval flow for a scenario. The approval content of each scenario is different, and the content of the form submitted to the approver for review is different, resulting in different review details pages. Therefore, the business approval processing of the current business system requires professional approvers to manually verify and confirm the business requests for approval, and finally make corresponding decisions. The approval efficiency is low, and the business approval processing is greatly affected by the personal factors of the approvers, and the accuracy of the approval decision is limited. Summary of the invention

[0004] To this end, the present invention provides an enterprise-level workflow engine implementation method and system based on microservice SaaS, which overcomes the problems of complex configuration, high usage cost, and imperfect functions of tenant workflow engines on existing SaaS platforms, and achieves high maintainability and high scalability of approval flows under multi-tenant and multiple business scenarios.

[0005] In order to achieve the above object, the present invention provides the following technical solution: an enterprise-level workflow engine implementation method based on microservice SaaS, comprising:

[0006] Define the process through the online process designer, and add extension nodes according to the BPMN2.0 protocol to store customized business configurations, including approval rules, approval methods, jump conditions, and service calls;

[0007] Predefine the process form, which includes a read-only form and an editable form, and display the business document details during approval through the process form;

[0008] The approval personnel are searched at the artificial node through the approval rules, and the approval method is used to determine whether the specified conditions are met and leave the current artificial node to continue to flow downward. The jump condition is used to control the direction of the process branch, and the service call is used to remotely call the business module at the specified node to execute the custom logic.

[0009] As a preferred solution for the implementation method of an enterprise-level workflow engine based on microservice SaaS, the read-only form is implemented through an iframe, and the editable form implements cross-module page loading through dynamic routing and asynchronous loading.

[0010] As a preferred solution for the implementation method of the enterprise-level workflow engine based on microservice SaaS, the definition of the process form includes the front-end routing corresponding to the form;

[0011] When designing a flowchart, configure an approval form for any manual node and store the approval form code in the current node;

[0012] During the approval process, the form address is dynamically parsed based on the form code and process variables.

[0013] As a preferred solution for the implementation method of an enterprise-level workflow engine based on microservice SaaS, the service definition code is saved in the business configuration, and when the process is started, the service definition code in the process node is dynamically parsed;

[0014] When the approval rules do not meet the business scenario, write the person-finding logic by customizing the approval rules.

[0015] As a preferred solution of the enterprise-level workflow engine implementation method based on microservice SaaS, it also includes pre-defining the email template and the source of data required for rendering the email template, selecting the required email template in the artificial node defined in the process, and saving the template code in the artificial node;

[0016] When the process starts, the email template configuration is obtained according to the template code, and the email content is dynamically rendered through the Free marker engine combined with the pre-defined data source, and finally sent to the approver through the message service.

[0017] As a preferred solution for the implementation method of an enterprise-level workflow engine based on microservice SaaS, it also includes embedding messages according to the execution period of the listener and sending different message types to different approvers at different periods.

[0018] As a preferred solution for the implementation method of enterprise-level workflow engine based on microservice SaaS, the current to-do instance is used as the parent class to create a sub-class to-do instance, and the parent class approver is reset to a specified type. The specified type is determined by the signature type, which includes front signature and back signature.

[0019] Delete the to-do instances approved by the current approver, and control the flow of the process according to the signature type. The previous signature is traced back to the original approver, and the subsequent signature continues to flow downward according to the flowchart;

[0020] Get the most recently approved node based on the current approver, delete all to-do instances of the current node, and trace the current process back to the specified node.

[0021] As a preferred solution for the implementation method of an enterprise-level workflow engine based on microservice SaaS, for process definitions under the same category, by pre-configuring business parameter groups, different business parameter groups are designated to associate with different process definitions, so that when the workflow is started, the process definition is dynamically selected and the workflow is started through business parameters.

[0022] The present invention also provides an enterprise-level workflow engine implementation system based on microservice SaaS, including:

[0023] The process definition unit is used to define the process through the online process designer, and to add extension nodes according to the BPMN2.0 protocol to store customized business configurations, including approval rules, approval methods, jump conditions and service calls;

[0024] A form definition unit is used to predefine a process form, wherein the process form includes a read-only form and an editable form, and the business document details are displayed during approval through the process form;

[0025] The task processing unit is used to search for the approver at the artificial node according to the approval rules, to leave the current artificial node and continue to flow downward when judging whether the specified conditions are met according to the approval method, to control the direction of the flow branch according to the jump conditions, and to remotely call the business module at the specified node through the service call to execute the custom logic.

[0026] As a preferred solution for an enterprise-level workflow engine implementation system based on microservice SaaS, the read-only form is implemented through an iframe, and the editable form loads pages across modules through dynamic routing and asynchronous loading.

[0027] As a preferred solution for implementing an enterprise-level workflow engine system based on microservice SaaS, the definition of the process form includes the front-end routing corresponding to the form;

[0028] When designing a flowchart, configure an approval form for any manual node and store the approval form code in the current node;

[0029] During the approval process, the form address is dynamically parsed based on the form code and process variables.

[0030] As a preferred solution for an enterprise-level workflow engine implementation system based on microservice SaaS, the service definition code is saved in the business configuration, and when the process is started, the service definition code in the process node is dynamically parsed;

[0031] When the approval rules do not meet the business scenario, write the person-finding logic by customizing the approval rules.

[0032] As a preferred solution for the enterprise-level workflow engine implementation system based on microservice SaaS, it also includes an email approval unit, which is used to pre-define the email template and the source of the data required for rendering the email template, select the required email template in the artificial node defined by the process, and save the template code in the artificial node.

[0033] As the optimal solution for implementing the enterprise-level workflow engine system based on microservice SaaS, when the process starts, the email template configuration is obtained according to the template code, and the email content is dynamically rendered through the Free marker engine combined with the pre-defined data source, and finally sent to the approver through the message service.

[0034] As a preferred solution for the enterprise-level workflow engine implementation system based on microservice SaaS, it also includes a message reminder unit, which is used to embed messages according to the execution period of the listener and send different message types to different approvers at different periods.

[0035] As a preferred solution for implementing an enterprise-level workflow engine system based on microservice SaaS, it also includes a signature unit, which is used to create a child to-do instance with the current to-do instance as the parent class, reset the parent class's approver to a specified type, and the specified type is determined by the signature type, which includes front signature and back signature; delete the to-do instance approved by the current approver, control the flow of the process based on the signature type, and trace the front signature back to the original approver, and continue to flow downward according to the flow chart.

[0036] As a preferred solution for the enterprise-level workflow engine implementation system based on microservice SaaS, it also includes a withdrawal unit, which is used to obtain the most recently approved node based on the current approver, delete all to-do instances of the current node, and trace the current process back to the specified node.

[0037] As a preferred solution for an enterprise-level workflow engine implementation system based on microservice SaaS, it also includes a startup processing unit, which is used to pre-configure business parameter groups for process definitions under the same category and specify different business parameter groups to associate different process definitions, so that when starting the workflow, the process definition can be dynamically selected through business parameters and the workflow can be started.

[0038] The present invention has the following advantages: the process is defined through an online process designer, and an extension node is added according to the BPMN2.0 protocol to store a customized business configuration, wherein the business configuration includes approval rules, approval methods, jump conditions and service calls; the process form is defined in advance, and the process form includes a read-only form and an editable form, and the business document details are displayed during approval through the process form; the approval personnel are searched at the manual node according to the approval rules, and the approval method is used to determine whether the specified conditions are met and leave the current manual node to continue to flow downward, the process branch direction is controlled by the jump condition, and the business module is remotely called at the specified node through the service call to execute the customized logic. The present invention improves the high scalability of process startup, and based on the rule engine workflow engine receiving business parameters, it starts the process approval instance to meet the differences in approval flows of different companies under the same tenant of actual business; enhances the collaboration of other services or external systems of the process engine, and process approval supports embedding customized forms, and can use the business data in the business form to configure and control the subsequent process flow; supports mobile terminal, PC terminal and email approval methods for processing during operation; executes cross-service task scheduling through a listener to achieve business collaboration of multiple microservices; reduces the difficulty of process engine development and the amount of code, and facilitates demand expansion, collaborative development and maintenance; users and implementers use configuration, visualized flowchart configuration, and the configuration diagram can export XML files for multi-environment migration, as well as system message reminders or external message reminders for collaboration, to improve the portability and friendliness of the workflow engine. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the implementation methods of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for the implementation methods or the description of the prior art. Obviously, the drawings in the following description are only exemplary, and for ordinary technicians in this field, other implementation drawings can be derived from the provided drawings without creative work.

[0040] The structures, proportions, sizes, etc. illustrated in this specification are only used to match the contents disclosed in the specification so as to facilitate understanding and reading by persons familiar with the technology. They are not used to limit the conditions under which the present invention can be implemented, and therefore have no substantial technical significance. Any structural modification, change in proportion or adjustment of size shall still fall within the scope of the technical contents disclosed in the present invention without affecting the effects and purposes that can be achieved by the present invention.

[0041] Figure 1 A schematic diagram of a method for implementing an enterprise-level workflow engine based on microservice SaaS provided in an embodiment of the present invention;

[0042] Figure 2 The technical route of the enterprise-level workflow engine implementation method based on microservice SaaS provided in the embodiment of the present invention;

[0043] Figure 3 A schematic diagram of adding signatures in a method for implementing an enterprise-level workflow engine based on microservice SaaS provided in an embodiment of the present invention;

[0044] Figure 4 This is a schematic diagram of an enterprise-level workflow engine implementation system based on microservices SaaS provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0045] The following is a description of the implementation of the present invention by specific embodiments. People familiar with the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0046] Example 1

[0047] See also Figure 1 and Figure 2 Embodiment 1 of the present invention provides a method for implementing an enterprise-level workflow engine based on microservice SaaS, including:

[0048] S1. Define the process through the online process designer, and add extension nodes according to the BPMN2.0 protocol to store customized business configurations. Business configurations include approval rules, approval methods, jump conditions, and service calls.

[0049] S2. Define the process form in advance. The process form includes read-only form and editable form. The process form is used to display business document details during approval.

[0050] S3. Search for the approver in the manual node through the approval rules, and leave the current manual node to continue to flow downward when the specified conditions are determined through the approval method. Control the direction of the process branch through the jump conditions, and remotely call the business module at the specified node through the service call to execute the custom logic.

[0051] In this implementation, based on the Activiti official standard online process designer, the process function configuration is customized for business scenarios, the BPMN2.0 protocol is extended, and extension nodes are added to store customized business configurations, including approval rules, approval methods, jump conditions, and service calls. Based on the import and export of BPMN2.0 protocol processes, the process can be migrated to multiple environments and systems, that is, "configure once, use everywhere". When using the SaaS platform, customers can directly configure online or import existing flowcharts.

[0052] Specifically, Activiti is an independently operated and managed open source project brand. It is a lightweight, embeddable BPM engine, and is also designed for scalable cloud architecture. Activiti provides a loose Apache License 2.0 so that this project can be widely used, while promoting the matching of the Activiti BPM engine and BPMN 2.0. Compared with BPMN1.x, BPMN2.0 defines the metamodel and execution semantics of the process, that is, BPMN2.0 solves the problems of storage, exchange and execution.

[0053] In this embodiment, the read-only form is implemented through iframe, and the editable form is implemented through dynamic routing and asynchronous loading to load the page across modules. The definition of the process form includes the front-end route corresponding to the form; in the process of designing the flowchart, the approval form is configured for any manual node, and the approval form code is stored in the current node; in the approval process, the form address is dynamically parsed according to the form code and process variables.

[0054] Specifically, the process form is used to display the details of the business document during approval. There are two types: read-only form and editable form. The read-only form is implemented based on iframe, and the editable form is based on dynamic routing plus asynchronous loading to load the page across modules. By pre-defining the process form, it mainly includes the front-end routing corresponding to the form. When designing a flowchart, you can configure the approval form for any manual node and store the approval form code to the current node. During approval, the workflow engine dynamically parses the form address based on the form code and process variables, so that the form can be changed without modifying the process definition.

[0055] Specifically, iframe is an HTML tag that acts as a document within a document, or a floating frame. The iframe element creates an inline frame (i.e., an inline frame) that contains another document.

[0056] In this embodiment, the four types of business controls for controlling the direction of the process, namely, approval rules, approval methods, jump conditions, and service calls, can be abstracted as service tasks. By pre-defining, customers can directly select the above high-level configurations in the process design to achieve more complex process directions.

[0057] The above approval rules, approval methods, jump conditions, and service calls support remote calls, expressions, etc. Remote calls are based on Rest Template, and expressions are parsed based on odyssus.

[0058] In this embodiment, the service definition code is saved in the business configuration, and when the process is started, the service definition code in the process node is dynamically parsed;

[0059] When the approval rules do not meet the business scenario, you can write the logic of finding people by customizing the approval rules.

[0060] Specifically, the process definition stores the service definition code. When the process is started, the workflow engine dynamically parses the service definition code in the process node, so that the process definition does not need to be modified after the service definition is modified. To a certain extent, the function is not controlled by the process definition version, which improves the flexibility of the workflow engine to interact with other microservices, and ultimately supports more and more complex business scenarios. For example, when the built-in approval rules of the system do not meet the business scenarios, it supports custom creation of approval rules to write search logic in other microservices.

[0061] In this embodiment, S4 is also included, by pre-defining the email template and the source of data required for rendering the email template, selecting the required email template in the manual node defined by the process, and saving the template code in the manual node;

[0062] When the process starts, the email template configuration is obtained according to the template code, and the email content is dynamically rendered through the Free marker engine combined with the pre-defined data source, and finally sent to the approver through the message service.

[0063] Specifically, by pre-defining the email template and the source of data required for rendering the template, the required email template is selected in the process definition manual node, and the template code is finally saved in the manual node. When the process starts, the workflow engine will obtain the email template configuration based on the template code, dynamically render the email content through the Free marker engine combined with the pre-defined data source, and finally send it to the approver through the message service.

[0064] The email can be accompanied by approval and rejection buttons, and the mailto button is set to the email receiving server address. The email subject contains the necessary data for approval. The approver can click the corresponding button to enter the approval opinion and reply to the email. The workflow engine scans the email server inbox through a scheduled task and completes the approval of the process based on the received information.

[0065] In this embodiment, S5 is also included, which performs message embedding according to the execution period of the listener, and sends different message types to different approvers at different periods.

[0066] Specifically, the Activiti artificial node provides four listener execution periods, namely, create, assignment, complete, and delete. The present invention extends the leave period, which is executed when the approval method is met to leave the artificial node. Based on the above five execution periods, message embedding is performed, and different message types are sent to different approvers at different periods. Finally, the approvers are reminded in the system, and docking with external systems is supported to achieve to-do reminders of external systems.

[0067] See also Figure 3 In this embodiment, a subclass to-do instance is created with the current to-do instance as the parent class, and the approver of the parent class is reset to a specified type. The specified type is determined by the signature type, and the signature type includes front signature and back signature;

[0068] During the execution of pending approvals created by adding signatures, delete the pending instances approved by the current approver, and control the flow of the process based on the signature type. The previous signature is traced back to the original approver, and the next signature continues to flow downward according to the flow chart;

[0069] During the withdrawal process, the most recently approved node is obtained based on the current approver, all to-do instances of the current node are deleted, and the current process is traced back to the specified node.

[0070] Specifically, the workflow engine creates a subclass to-do instance with the current to-do instance as the parent class, and resets the parent class's approver to the specified type, which is determined by the signature type, and sets the subclass manager as the parent class's approver, that is, the current approver. The number of subclasses created depends on the number of approvers and signers. After the subclass completes the approval, it queries its parent class and processes it. The specific processing needs to be processed according to the signature type of the parent class. The first signature needs to reset the approver to the original approver and return directly, and the second signature needs to complete the approval based on the first signature.

[0071] The workflow engine obtains the node that the current approver last approved (not the current node of the process) based on the current approver, deletes all to-do instances of the current node, and finally traces the current process back to the specified node.

[0072] In this implementation, for process definitions under the same category, business parameter groups are preconfigured and different business parameter groups are associated with different process definitions, so that when a workflow is started, the process definition is dynamically selected and the workflow is started by business parameters.

[0073] Specifically, for process definitions under the same category (using the same type of business document), by pre-configuring business parameter groups (see Table 1), different business parameter groups are assigned to associate with different process definitions, so that when starting a workflow, the process definition is dynamically selected through business parameters and the workflow is started.

[0074] Serial number company Business Entity Purchasing Group Source System process Default process initiator 1 Company A Factory 1 Purchasing Group 001 SRM Process A Account a 2 Company A Factory 1 / / Process B Account b 3 / Factory 1 / SRM Process C Account c 4 Company A Factory 1 / / Process D Account d 5 / / / / Process E Account d

[0075] The parameters of a document match processes A, B, C, and D. Since process A has the most matching field values, process A is selected. If there is data that does not match process A, but it matches processes B, C, and D and the number of matching parameters is the same, since the variable [Company] is higher than [Business Entity], it is selected from processes B and D. The priorities of processes B and D are the same, so one is randomly selected. The variable values ​​of process E are all empty, which is the default process with the lowest priority. When none of the above matches, this process is selected.

[0076] In summary, the present invention defines the process through an online process designer, adds an extension node according to the BPMN2.0 protocol to store a customized business configuration, and the business configuration includes approval rules, approval methods, jump conditions and service calls; pre-defines the process form, and the process form includes a read-only form and an editable form, and displays the business document details during approval through the process form; searches for the approver at the artificial node through the approval rule, judges whether the specified conditions are met through the approval method, leaves the current artificial node and continues to flow downward, controls the flow branch direction through the jump condition, and remotely calls the business module at the specified node through the service call to execute the customized logic. By pre-defining the source of the mail template and the data required for rendering the mail template, the required mail template is selected in the artificial node defined by the process, and the template code is saved in the artificial node; when the process starts, the mail template configuration is obtained according to the template code, and the mail content is dynamically rendered by the Free marker engine in combination with the pre-defined data source, and finally sent to the approver through the message service. Message points are buried according to the execution period of the listener, and different message types are sent to different approvers at different periods. The current to-do instance is used as the parent class to create a subclass to-do instance, and the approver of the parent class is reset to a specified type. The specified type is determined by the signature type, and the signature type includes front signature and back signature; the node that has been approved the most recently is obtained according to the current approver, all to-do instances of the current node are deleted, and the current process is traced back to the specified node. The present invention improves the high scalability of process startup, based on the rule engine workflow engine receiving business parameters based on the startup process approval instance, to meet the differences in approval flows of different companies under the same tenant of the actual business; enhances the collaboration of other services or external systems of the process engine, and the process approval supports embedded customized forms, and can use the business data configuration in the business form to control the subsequent process flow; supports mobile terminal, PC terminal and email approval mode for processing during operation; performs task scheduling across services through a listener to realize business collaboration of multiple microservices; reduces the difficulty and code volume of process engine development, and facilitates demand expansion, collaborative development and maintenance; users and implementation personnel use configuration, visual flow chart configuration, configuration diagram can export XML file multi-environment migration, and system message reminder or external message reminder collaboration, to improve the portability and friendliness of workflow engine use.

[0077] Example 2

[0078] See also Figure 4 Embodiment 2 of the present invention further provides an enterprise-level workflow engine implementation system based on microservice SaaS, including:

[0079] Process definition unit 1 is used to define the process through the online process designer, and to add extension nodes according to the BPMN2.0 protocol to store customized business configurations. The business configurations include approval rules, approval methods, jump conditions, and service calls.

[0080] Form definition unit 2 is used to predefine process forms. The process forms include read-only forms and editable forms. The process forms are used to display business document details during approval.

[0081] Task processing unit 3 is used to find the approver in the artificial node through the approval rules, leave the current artificial node and continue to flow downward when judging whether the specified conditions are met through the approval method, control the direction of the process branch through the jump condition, and remotely call the business module at the specified node through the service call to execute the custom logic.

[0082] In this embodiment, the read-only form is implemented through iframe, and the editable form implements cross-module page loading through dynamic routing and asynchronous loading.

[0083] In this embodiment, the definition of the process form includes the front-end route corresponding to the form;

[0084] When designing a flowchart, configure an approval form for any manual node and store the approval form code in the current node;

[0085] During the approval process, the form address is dynamically parsed based on the form code and process variables.

[0086] In this embodiment, the service definition code is saved in the business configuration, and when the process is started, the service definition code in the process node is dynamically parsed;

[0087] When the approval rules do not meet the business scenario, you can write the logic of finding people by customizing the approval rules.

[0088] This embodiment further includes an email approval unit 4, which is used to predefine the email template and the source of data required for rendering the email template, select the required email template in the artificial node defined in the process, and save the template code in the artificial node.

[0089] In this embodiment, when the process is started, the email template configuration is obtained according to the template code, and the email content is dynamically rendered through the Free marker engine combined with the predefined data source, and finally sent to the approver through the message service.

[0090] In this embodiment, a message reminder unit 5 is also included, which is used to perform message embedding according to the execution period of the listener and send different message types to different approvers at different periods.

[0091] In this embodiment, it also includes a signature unit 6, which is used to create a child to-do instance with the current to-do instance as the parent class, reset the parent class's approver to a specified type, and the specified type is determined by the signature type, which includes front signature and back signature; delete the to-do instance approved by the current approver, control the process flow according to the signature type, and the front signature is traced back to the original approver, and the back signature continues to flow downward according to the flow chart.

[0092] This embodiment also includes a withdrawal unit 7, which is used to obtain the node that has been approved most recently according to the current approver, delete all to-do instances of the current node, and trace the current process back to the specified node.

[0093] This embodiment also includes a startup processing unit 8, which is used to pre-configure business parameter groups for process definitions under the same category and specify different business parameter groups to be associated with different process definitions, so that when starting a workflow, the process definition can be dynamically selected through business parameters and the workflow can be started.

[0094] It should be noted that the information interaction, execution process, etc. between the modules / units of the above-mentioned system are based on the same concept as the method embodiment in Example 1 of the present application, and the technical effects they bring are the same as those of the method embodiment of the present application. For specific contents, please refer to the description in the method embodiment shown in the previous part of the present application, and will not be repeated here.

[0095] Example 3

[0096] Embodiment 3 of the present invention provides a non-transitory computer-readable storage medium, in which program code for an enterprise-level workflow engine implementation method based on microservice SaaS is stored, and the program code includes instructions for executing embodiment 1 or any possible implementation method of the enterprise-level workflow engine implementation method based on microservice SaaS.

[0097] The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or a data center that includes one or more available media. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).

[0098] Example 4

[0099] Embodiment 4 of the present invention provides an electronic device, including: a memory and a processor;

[0100] The processor and the memory communicate with each other via a bus; the memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the enterprise-level workflow engine implementation method based on microservice SaaS of Example 1 or any possible implementation method thereof.

[0101] Specifically, the processor can be implemented by hardware or by software. When implemented by hardware, the processor can be a logic circuit, an integrated circuit, etc.; when implemented by software, the processor can be a general-purpose processor implemented by reading software codes stored in a memory. The memory can be integrated in the processor or can be located outside the processor and exist independently.

[0102] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center.

[0103] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0104] Although the present invention has been described in detail above by general description and specific embodiments, it is obvious to those skilled in the art that some modifications or improvements can be made to the present invention. Therefore, these modifications or improvements made without departing from the spirit of the present invention all belong to the scope of protection claimed by the present invention.

Claims

1. An implementation method of an enterprise-level workflow engine based on microservice SaaS, characterized in that: include: Define the process through the online process designer, and add extension nodes according to the BPMN2.0 protocol to store customized business configurations, including approval rules, approval methods, jump conditions, and service calls; Predefine the process form, which includes a read-only form and an editable form, and display the business document details during approval through the process form; Searching for the approver at the artificial node through the approval rule, leaving the current artificial node and continuing to flow downward when judging whether the specified conditions are met through the approval method, controlling the flow branch direction through the jump condition, and remotely calling the business module at the specified node to execute the custom logic through the service call; The service definition code is saved in the business configuration. When the process is started, the service definition code in the process node is dynamically parsed; When the approval rules do not meet the business scenario, write the logic of finding people by customizing the approval rules; It also includes, by pre-defining the email template and the source of data required for rendering the email template, selecting the required email template in the manual node of the process definition, and saving the template code in the manual node; When the process starts, the email template configuration is obtained according to the template code, and the email content is dynamically rendered through the Free marker engine combined with the pre-defined data source, and finally sent to the approver through the message service; Create a child to-do instance with the current to-do instance as the parent class, and reset the parent class's approver to the specified type. The specified type is determined by the signature type, which includes front signature and back signature. Delete the to-do instances approved by the current approver, and control the flow of the process according to the signature type. The previous signature is traced back to the original approver, and the subsequent signature continues to flow downward according to the flowchart; Get the most recently approved node based on the current approver, delete all to-do instances of the current node, and trace the current process back to the specified node; For process definitions under the same category, by pre-configuring business parameter groups, specifying different business parameter groups to associate with different process definitions, so that when starting a workflow, the process definition can be dynamically selected and the workflow can be started through business parameters.

2. The method for implementing an enterprise-level workflow engine based on microservice SaaS according to claim 1, characterized in that: The read-only form is implemented through iframe, and the editable form realizes cross-module page loading through dynamic routing and asynchronous loading.

3. The method for implementing an enterprise-level workflow engine based on microservice SaaS according to claim 2, characterized in that: The definition of the process form includes the front-end routing corresponding to the form; When designing a flowchart, configure an approval form for any manual node and store the approval form code in the current node; During the approval process, the form address is dynamically parsed based on the form code and process variables.

4. The method for implementing an enterprise-level workflow engine based on microservice SaaS according to claim 1, characterized in that: It also includes message tracking according to the execution period of the listener, and sending different message types to different approvers at different periods.

5. An enterprise-level workflow engine implementation system based on microservice SaaS, characterized by: include: The process definition unit is used to define the process through the online process designer, and to add extension nodes according to the BPMN2.0 protocol to store customized business configurations, including approval rules, approval methods, jump conditions and service calls; A form definition unit is used to predefine a process form, wherein the process form includes a read-only form and an editable form, and the business document details are displayed during approval through the process form; A task processing unit is used to search for an approver at an artificial node according to the approval rules, to leave the current artificial node and continue to flow downward when judging whether a specified condition is met according to the approval method, to control the direction of the flow branch according to the jump condition, and to remotely call a business module at a specified node to execute a custom logic through the service call; The service definition code is saved in the business configuration. When the process is started, the service definition code in the process node is dynamically parsed; When the approval rules do not meet the business scenario, write the logic of finding people by customizing the approval rules; It also includes an email approval unit, which is used to select a required email template in a manual node defined in a process by pre-defining the email template and the source of data required for rendering the email template, and save the template code in the manual node; When the process starts, the email template configuration is obtained according to the template code, and the email content is dynamically rendered through the Free marker engine combined with the pre-defined data source, and finally sent to the approver through the message service; It also includes a signature unit, which is used to create a child to-do instance with the current to-do instance as the parent class, reset the parent class approver to a specified type, which is determined by the signature type, and the signature type includes front signature and back signature; delete the to-do instance approved by the current approver, control the flow of the process according to the signature type, and the front signature is traced back to the original approver, and the back signature continues to flow downward according to the flow chart; It also includes a startup processing unit, which is used to pre-configure business parameter groups for process definitions under the same category and specify different business parameter groups to be associated with different process definitions, so that when starting a workflow, the process definition can be dynamically selected through business parameters and the workflow can be started.

6. The enterprise-level workflow engine implementation system based on microservice SaaS according to claim 5 is characterized in that: The read-only form is implemented through iframe, and the editable form realizes cross-module page loading through dynamic routing and asynchronous loading; The definition of the process form includes the front-end routing corresponding to the form; When designing a flowchart, configure an approval form for any manual node and store the approval form code in the current node; During the approval process, the form address is dynamically parsed based on the form code and process variables; It also includes a message reminder unit, which is used to embed messages according to the execution period of the listener, and send different message types to different approvers at different periods; It also includes a withdrawal unit, which is used to obtain the most recently approved node based on the current approver, delete all to-do instances of the current node, and trace the current process back to the specified node.

Citation Information

Patent Citations

  • Process customization processing method and workflow engine thereof

    CN105989440A

  • Examination and approval process implementation method in government affair cloud scene

    CN113159705A