Approval form control method, device, electronic device and readable storage medium
By using process approval templates and control scripts in the approval system, the problem of the inability to effectively control the permissions of complex business approval forms in the existing technology is solved, flexible permission control and quick response are achieved, different business needs are met, and data security is improved. .
Patent Information
- Application Number
- CN202010983374.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-17
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2040-09-17
AI Technical Summary
Existing technology cannot effectively control complex business approval forms that strictly require permissions, resulting in rigid permission control that cannot meet the needs of different business objects.
Provides an approval form control method that flexibly adjusts the form control permissions of each node by using process approval templates and control scripts in the approval system, generates user interfaces, and supports real-time updating of control scripts to achieve pluggable and pluggable permission control. Quick response.
It realizes flexible permission control on complex business approval forms, meets different business needs, improves data security and operational permissions, and supports quick response and real-time updates.
Smart Images

Figure CN112116325B
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of computer technology, and in particular to an approval form control method, device, electronic device, and readable storage medium. Background Art
[0002] Currently, there are two types of workflow forms: built-in forms and external forms. Built-in forms are forms that are hard-coded into the process file, while external forms are stored separately and associated with the process file.
[0003] The current technical solution cannot control the form at all, including read and write permissions, disabling hiding, form component association, multi-person collaborative editing, etc. This form directly bound to the process definition is too rigid and does not allow users to customize it. The same business process may have completely different control requirements for the form due to different business objects. Therefore, for complex businesses that strictly require control permissions, the current solution obviously cannot meet the needs. Summary of the invention
[0004] The embodiments of the present invention provide an approval form control method, device, electronic device and readable storage medium to solve the problem of approval control for complex services that strictly require control authority in the prior art.
[0005] In order to solve the above-mentioned technical problems, the present invention is achieved as follows:
[0006] In a first aspect, an embodiment of the present invention provides an approval form control method, which is applied to an approval system, wherein the approval system supports at least one process approval template, each process approval template includes multiple nodes, the multiple nodes include an initiation node and an approval node, and each node corresponds to a form; including:
[0007] Receiving a business request for an approval form for a current node initiated by a user in a user interface of an approval system; wherein the approval system supports at least one process approval template, each process approval template includes multiple nodes, the multiple nodes include an initiation node and an approval node, and each node corresponds to a form;
[0008] Obtain first form data of at least one node before the current node;
[0009] Scan the control script corresponding to the process approval template to determine and execute the form processing rules of the current node;
[0010] A user interface of the current node is generated according to the form processing rule and the first form data.
[0011] Optionally, the method further includes: updating a control script corresponding to the process approval template.
[0012] Optionally, the form data of the at least one node includes: form input data of each node and second form data obtained based on the form processing rule of the node and the form input data.
[0013] Optionally, the form processing rules include:
[0014] The display rules of the corresponding form items are determined according to the attributes of the form input data.
[0015] Optionally, if the current node is an initiating node, the initiating form of the initiating node has an approval form number, and the method further includes:
[0016] A process approval template and a control script corresponding to the process approval template are determined according to the approval order number.
[0017] Optionally, the processing rule includes: defining the control authority of the current node over the first form data of at least one previous node.
[0018] Optionally, the processing rule further includes: setting a display range of the first form data of the current node.
[0019] In a second aspect, an embodiment of the present invention further provides an approval form control device, comprising:
[0020] A receiving module, used to receive a business request for an approval form for a current node initiated by a user in a user interface of an approval system; wherein the approval system supports at least one process approval template, each process approval template includes multiple nodes, the multiple nodes include an initiation node and an approval node, and each node corresponds to a form;
[0021] An acquisition module, used for acquiring first form data of at least one node before the current node;
[0022] An execution module, used to scan the control script corresponding to the process approval template, determine and execute the form processing rules of the current node;
[0023] The display module is used to generate a user interface of the current node according to the form processing rule and the first form data.
[0024] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising: a processor, a memory, and a program stored in the memory and executable on the processor, wherein when the program is executed by the processor, the steps of the approval form control method as described in any one of the first aspects are implemented.
[0025] In a fourth aspect, an embodiment of the present invention further provides a readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the approval form control method as described in any one of the first aspects are implemented.
[0026] In an embodiment of the present invention, the control script is bound to each node of each type of process approval template. The control script can flexibly adjust the control authority granularity of the form corresponding to each node. Users can flexibly deploy the control authority granularity according to their own needs and achieve rapid response. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0028] Figure 1 One of the flowcharts of the approval form control method provided in the embodiment of the present invention;
[0029] Figure 2 The second flowchart of the approval form control method provided by the embodiment of the present invention;
[0030] Figure 3 The third flowchart of the approval form control method provided by the embodiment of the present invention;
[0031] Figure 4 One of the structural schematic diagrams of the approval form control device provided in an embodiment of the present invention;
[0032] Figure 5 This is one of the structural schematic diagrams of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0033] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. 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.
[0034] Please refer to Figure 1 The present invention provides an approval form control method, which is applied to an approval system, wherein the approval system supports at least one process approval template, each process approval template includes multiple nodes, the multiple nodes include an initiation node and an approval node, and each node corresponds to a form; including:
[0035] Step 11: receiving a business request for an approval form for a current node initiated by a user in a user interface of the approval system; wherein the approval system supports at least one process approval template, each process approval template includes multiple nodes, the multiple nodes include an initiation node and an approval node, and each node corresponds to a form;
[0036] Step 12: Obtain first form data of at least one node before the current node;
[0037] Step 13: Scan the control script corresponding to the process approval template, determine and execute the form processing rules of the current node;
[0038] Step 14: Generate a user interface of the current node according to the form processing rule and the first form data.
[0039] In an embodiment of the present invention, the control script is bound to each node of each type of process approval template. The control script can flexibly adjust the control authority granularity of the form corresponding to each node. Users can flexibly deploy the control authority granularity according to their own needs and achieve rapid response.
[0040] In some embodiments of the present invention, optionally, the method further comprises:
[0041] Update the control script corresponding to the process approval template.
[0042] In an embodiment of the present invention, the control script can be updated in real time, and each time the user interface of the current node is generated, it is generated based on the latest control script and the first form data. Based on the embedded script, the approval process form permission control is pluggable, can be modified at any time and takes effect immediately.
[0043] See also Figure 2 , Figure 2 A flowchart of an approval form control method provided by an embodiment of the present invention includes:
[0044] Step 21: Process node information assembly;
[0045] Step 22: Default configuration of the node corresponding form;
[0046] Specifically, configure at least one process approval template and its related forms, and write the corresponding control script; generally, it will be made into a visual page, and the administrator responsible for the approval configuration of the company will be responsible for the operation. The administrator only needs to perform simple operations such as checking, connecting, moving, dragging, and filling in the process template and form of the current business type, and the background will automatically generate the script. Of course, you can also write the script directly.
[0047] Step 23: Check whether the current node is embedded with a script, if so, go to step 231, otherwise go to step 232;
[0048] Step 231: call the script parser and go to step 24;
[0049] Step 232: calling the form processor to generate a user display interface according to the current configuration information;
[0050] Specifically, if it is detected that the current node is embedded with a script, the main purpose of calling the script parser is to perform parsing verification on the script to ensure that the script can be executed correctly; the function of the form processor is to perform different control processing on the form based on the information extracted from the script during the process flow; if no embedded script is detected at present, the user display interface is generated according to the default configuration.
[0051] Step 24: Determine whether the script needs to be parsed currently, if yes, go to step 241, otherwise go to step 242;
[0052] Step 241: Reparse the script and go to step 2411;
[0053] Step 2411: Save the parsing result and go to step 25;
[0054] Step 242: Read the previously parsed configuration information and go to step 25;
[0055] Step 25: Overwrite the default configuration and go to step 232.
[0056] Specifically, the main purpose of determining whether the script needs to be parsed is to bind the updated script to the approval process when the script is updated. From the time the script is published and takes effect, all forms of approval initiated after this time will be processed by this script. Approval forms initiated before this time will be processed by the old script. At this point, the script is published and can be used in every approval process initiated by this business type in the future.
[0057] See also Figure 3 , Figure 3 A flowchart of an approval form control method provided by an embodiment of the present invention includes:
[0058] Step 31: The front page initiates a request;
[0059] Step 321: calling the script executor to process the form processing rules and form data to generate a form;
[0060] Step 33: Return to the web front-end to render the form.
[0061] Specifically, the user initiates a request to start a process instance on the page and passes the control script to the process approval system. When the process approval system receives the start process command and finds that there is a script, it will bind the script to the process instance and directly call the script parser to save the parsing result. During the process flow, the form mounted on the node will be built together with the process node, and the form items visible to all previous nodes will be built at the same time. The form is built by the script processor after the default configuration and script configuration are superimposed, and returned to the web front end for rendering. When the form rendering is completed, part of it is read-only and generated by the previous node, and part of it is the form items to be filled in and generated by the current node.
[0062] In some embodiments of the present invention, optionally, when viewing detailed information of a process instance, a possibly completely different form may be rendered based on the identity of the current login person, such as attributes of the process initiator, process operator, and the like.
[0063] After step 321, the following steps may also be included:
[0064] Step 322: The background receives the form data passed in by the script executor and returns the form data to the script executor.
[0065] In some embodiments of the present invention, optionally, when completing a node task, it is necessary to fill in the required items in the form, and the form processor will verify the submitted form data one by one and save them.
[0066] In some embodiments of the present invention, optionally, the first form data of the at least one node includes: form input data of each node and second form data obtained based on the form processing rule of the node and the form input data.
[0067] In some embodiments of the present invention, optionally, when the processing rules defined in the control script for the form input data of at least one previous node of the current node include calling an external interface, the nature of the form input data, such as the risk level, is judged according to the interface return value; at this time, the interface return value is obtained based on the form processing rules of the node and the form input data, and the interface return value and other data generated based on the form processing rules and form input data of each node in the process approval process are recorded as the second form data, and the user input data and the second form data of each node are recorded as the first form data.
[0068] At this time, the current user interface is generated based on the form processing rules of the current node and the first form data of at least one node before the current node, wherein the first form data of each node includes the form input data of each node and the second form data obtained based on the form processing rules of the node and the form input data.
[0069] Specifically, if the form input data of the previous node is the company name, the form processing rules of the previous node include: judging whether the group to which the currently rated company belongs has risks. At this time, the script automatically requests the risk control service. Taking the example of checking whether the company has risks, generally speaking, the script can automatically request other services and get back a result, so as to perform form control through this result, query whether the filled-in form data input has risks, and record the results in the database.
[0070] In an embodiment of the present invention, the user interface of the current node is generated based on the form processing rules of the current node and the first form data of at least one node before the current node. The first form data of each node includes second form data obtained based on the form processing rules of the node and the form input data. By binding the control script to each node of the approval process and setting the form processing rules of each node, approval authority control between nodes can be achieved. For data authority, the second form data generated during the process flow can very conveniently control the visibility of each form item and improve data security. For operation authority, the form that must be filled in for the process flow changes dynamically according to business rules, and all operations are fully in line with the business and meet the personalized needs of the business.
[0071] In some embodiments of the present invention, optionally, the form processing rules include:
[0072] The display rules of the corresponding form items are determined according to the attributes of the form input data.
[0073] In the embodiment of the present invention, the user interface can set the display rules of the corresponding form items for display according to the attributes of the form input data.
[0074] Specifically, when the attribute of a form input data is determined to be high risk, the display rule of certain target form items on the user interface may be specified as: marking “*” before the form item.
[0075] In some embodiments of the present invention, optionally, if the current node is an initiating node, the initiating form of the initiating node has an approval form number, and the method further includes:
[0076] A process approval template and a control script corresponding to the process approval template are determined according to the approval order number.
[0077] In an embodiment of the present invention, the initiation form corresponding to each initiation node has an approval form number, and the process approval template and the corresponding control script of the initiation node can be determined according to the approval form number; when there are multiple process approval templates in the approval system and multiple initiators fill in multiple initiation forms, the process approval template and the corresponding control script of each initiation form can be quickly determined through the approval form number of each initiation form, and the approval process of the current initiation form can be entered.
[0078] In some embodiments of the present invention, optionally, the form processing rule includes: defining the control authority of the current node over the first form data of at least one previous node.
[0079] In an embodiment of the present invention, the control authority of the current node over the first form data of at least one previous node is defined, so as to implement the authority control between each node and the first form data of at least one previous node in the same process approval process, thereby further refining the control granularity of the process approval process.
[0080] In some embodiments of the present invention, it is optional that the initiating node can only view the approval results of each approval process, but cannot view the approval details of each approval process. In some embodiments of the present invention, it is optional that when a form data of a previous node does not meet the form processing rules, some form items of the current node are required.
[0081] In some embodiments of the present invention, it is optional to implement form processing rules for linking user input data of specific attributes at different nodes. For example, for some risky companies, it is required that the [Document Attachments] item must be a required item at the risk control approval node and the financial approval node, and that the number of uploaded attachments must be more than 3. In other cases, [Document Attachments] is still a default non-required item.
[0082] In some embodiments of the present invention, optionally, the processing rule includes: setting a display range of the first form data of the current node.
[0083] In the embodiment of the present invention, setting the form processing rules of the control script can flexibly realize the display range of the first form data of the current node in different nodes, thereby meeting the display requirements of the approval pages of different nodes.
[0084] In some embodiments of the present invention, it is optional to implement different display permissions for the same user input data in different nodes, such as being displayed as invisible in other nodes at the first node and being displayed as visible in the next node at the second node.
[0085] Please refer to Figure 4 , Figure 4 An approval form control device provided in Embodiment 4 of the present invention includes:
[0086] The receiving module 401 is used to receive a business request for an approval form of a current node initiated by a user in the user interface of the approval system; wherein the approval system supports at least one process approval template, each process approval template includes multiple nodes, the multiple nodes include an initiation node and an approval node, and each node corresponds to a form;
[0087] An acquisition module 402 is used to acquire first form data of at least one node before the current node;
[0088] An execution module 403 is used to scan the control script corresponding to the process approval template, determine and execute the form processing rules of the current node;
[0089] The display module 404 is used to generate a user interface of the current node according to the form processing rule and the first form data.
[0090] In an embodiment of the present invention, a control script is bound to each node of each type of process approval template. The control script can flexibly adjust the control authority granularity of the form corresponding to each node. The approval form control device can flexibly deploy the control authority granularity according to user needs and achieve rapid response.
[0091] In some embodiments of the present invention, optionally, it also includes: an updating module, which is used to update the control script corresponding to the process approval template.
[0092] In an embodiment of the present invention, the control script can be updated in real time, and each time the user interface of the current node is generated, it is generated based on the latest control script and the first form data. The approval form control device realizes the pluggable, modifiable at any time and immediate effect of the approval process form authority control based on the embedded script.
[0093] In some embodiments of the present invention, optionally, the form data of the at least one node includes: form input data of each node and second form data obtained based on the form processing rule of the node and the form input data.
[0094] In an embodiment of the present invention, the user interface of the current node is generated based on the form processing rules of the current node and the first form data of at least one node before the current node. The first form data of each node includes second form data obtained based on the form processing rules of the node and the form input data. The approval form control device sets the form processing rules of each node by binding a control script to each node of the approval process to achieve approval authority control between nodes. For data authority, the second form data generated during the process flow can very conveniently control the visibility of each form item and improve data security. For operation authority, the form that must be filled in for the process flow changes dynamically according to business rules, and all operations are fully in line with the business and meet the personalized needs of the business.
[0095] In some embodiments of the present invention, optionally, the form processing rules include:
[0096] The display rules of the corresponding form items are determined according to the attributes of the form input data.
[0097] In some embodiments of the present invention, optionally, if the current node is an initiating node, the initiating form of the initiating node has an approval form number, and further includes: a determination module for determining a process approval template and a control script corresponding to the process approval template according to the approval form number.
[0098] In some embodiments of the present invention, optionally, the processing rule includes: defining the control authority of the current node over the first form data of at least one previous node.
[0099] In some embodiments of the present invention, optionally, the processing rule further includes: setting a display range of the first form data of the current node.
[0100] The present invention also provides an electronic device 500, please refer to Figure 5 , Figure 5 This is a schematic diagram of the structure of an electronic device according to Embodiment 6 of the present invention. The electronic device 500 comprises: a processor 501 and a memory 502 and a program stored in the memory 502 and executable on the processor 501. When the program is executed by the processor 501, the various processes of the embodiment of the above-mentioned approval form control method are implemented and the same technical effect can be achieved. To avoid repetition, it will not be described here.
[0101] An embodiment of the present invention further provides a readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various processes of the above-mentioned approval form control method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0102] The computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0103] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation modes, which are merely illustrative rather than restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are within the protection of the present invention.
Claims
1. A method for controlling an approval form, applied to an approval system, characterized in that: The approval system supports at least one process approval template, each process approval template includes multiple nodes, the multiple nodes include an initiation node and an approval node, and each node corresponds to a form; including: Receive business requests for approval forms for the current node initiated by users in the user interface of the approval system; Obtain first form data of at least one node before the current node; Scan the control script corresponding to the process approval template to determine and execute the form processing rules of the current node; Generate a user interface of the current node according to the form processing rule and the first form data; The first form data of the at least one node includes: form input data of each node and second form data obtained based on the form processing rule of the node and the form input data; When the processing rules defined in the control script for the form input data of at least one previous node of the current node include calling an external interface, judging the properties of the form input data of the previous node according to the interface return value; the properties include: risk level; when the property of the form input data is judged to be high risk, the display rule of the specified target form item on the user interface is: marking "*" before the form item; If the form input data of the previous node is the company name, the form processing rules of the previous node include: judging whether the group to which the currently rated company belongs has risks; for companies with risks, requiring that the document attachments in the risk control approval node and the financial approval node are mandatory items, and that more than 3 attachments are uploaded; The control script corresponding to the process approval template is updated, and each generation of the user interface of the current node is generated based on the latest control script and the first form data.
2. The approval form control method according to claim 1, characterized in that: The form processing rules include: The display rules of the corresponding form items are determined according to the attributes of the form input data.
3. The approval form control method according to claim 1, characterized in that: If the current node is an initiating node, and the initiating form of the initiating node has an approval form number, the method further includes: A process approval template and a control script corresponding to the process approval template are determined according to the approval order number.
4. The approval form control method according to claim 1, characterized in that: The form processing rule includes: defining the control authority of the current node over the first form data of at least one previous node.
5. The approval form control method according to claim 1, characterized in that: The processing rule further includes: setting a display range of the first form data of the current node.
6. An approval form control device, characterized in that: include: A receiving module, used to receive a business request for an approval form for a current node initiated by a user in a user interface of an approval system; wherein the approval system supports at least one process approval template, each process approval template includes multiple nodes, the multiple nodes include an initiation node and an approval node, and each node corresponds to a form; An acquisition module, used for acquiring first form data of at least one node before the current node; An execution module, used to scan the control script corresponding to the process approval template, determine and execute the form processing rules of the current node; A display module, used for generating a user interface of the current node according to the form processing rule and the first form data; The first form data of the at least one node includes: form input data of each node and second form data obtained based on the form processing rule of the node and the form input data; When the processing rules defined in the control script for the form input data of at least one previous node of the current node include calling an external interface, judging the properties of the form input data of the previous node according to the interface return value; the properties include: risk level; when the property of the form input data is judged to be high risk, the display rule of the specified target form item on the user interface is: marking "*" before the form item; If the form input data of the previous node is the company name, the form processing rules of the previous node include: judging whether the group to which the currently rated company belongs has risks; for companies with risks, requiring that the document attachments in the risk control approval node and the financial approval node are mandatory items, and that more than 3 attachments are uploaded; The control script corresponding to the process approval template is updated, and each generation of the user interface of the current node is generated based on the latest control script and the first form data.
7. An electronic device, characterized in that: include: A processor, a memory, and a program stored in the memory and executable on the processor, wherein when the program is executed by the processor, the steps of the approval form control method according to any one of claims 1 to 5 are implemented.
8. A readable storage medium, characterized in that: The readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the approval form control method according to any one of claims 1 to 5 are implemented.
