Transfer method of approval role, terminal equipment and storage medium
By detecting the approval results of the approval node and updating the status variables, the problem of inability to accurately track the status and number of approval nodes in traditional technology is solved, and the flexible transfer of approval roles and efficient approval are achieved.
Patent Information
- Application Number
- CN202510133329.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-06
- Publication Date
- 2025-05-27
AI Technical Summary
Traditional technology cannot accurately track the status variables and approval times of each approval node, resulting in a lack of flexibility in the circulation of approval roles.
By detecting the approval results of each approval node in the approval matter, update the status variables of each approval node, and record the number of approvals, and perform the circulation of the approval role based on the current number of approvals and status variables.
Real-time detection of status variables and number of approvals of approval nodes is realized, and the circulation of approval roles is accurately performed, which improves approval efficiency and quality, and enhances the flexibility of approval.
Smart Images

Figure CN120047103A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of data processing, and particularly relates to a method for transferring approval roles, a terminal device, and a storage medium. Background Art
[0002] With the development of business, in some cases, process approval needs to be repeatedly looped according to specific conditions until specific conditions are met.
[0003] Traditional technologies cannot accurately track key information such as status variables and approval times of each approval node, resulting in a lack of flexibility in the transfer of approval roles. Summary of the Invention
[0004] In view of this, embodiments of the present invention provide a method for transferring approval roles, a terminal device, and a storage medium, which can solve the problem of lack of flexibility in the transfer of approval roles in related technologies.
[0005] The first aspect of the present invention provides a method for transferring approval roles, including:
[0006] If an approval item is detected, detect the approval result corresponding to each approval node in the approval item;
[0007] According to each approval result, update the status variable corresponding to each approval node to obtain the current status variable corresponding to each approval node, and record the current approval times corresponding to the approval item;
[0008] According to the current approval times and the current status variable corresponding to each approval node, perform the transfer operation of the approval role.
[0009] Optionally, in the first implementation manner of the first aspect of the present invention, the step of performing the transfer operation of the approval role according to the current approval times and the current status variable corresponding to each approval node includes:
[0010] Obtain the required approval times corresponding to the approval item, and judge whether the approval item is completed according to the required approval times and the approval times;
[0011] If the approval is completed, perform the transfer operation of the approval role according to the current approval times and the current status variable corresponding to each approval node.
[0012] Optionally, in the second implementation manner of the first aspect of the present invention, the step of detecting the approval result corresponding to each approval node in the approval item includes:
[0013] Call a preset event listener to dynamically monitor each approval node in the approval item to obtain the approval result corresponding to each approval node.
[0014] Optionally, in the third implementation manner of the first aspect of the present invention, after the step of detecting the approval result corresponding to each approval node in the approval matter, the method further includes:
[0015] Obtain the approver and approval time corresponding to the approval result;
[0016] Record the approval result, approver, and approval time.
[0017] Optionally, in the fourth implementation manner of the first aspect of the present invention, before the step of detecting the approval result corresponding to each approval node in the approval matter, the method further includes:
[0018] Create an approval process template including a start node, an end node, and at least one approval node;
[0019] For each approval node, assign a status variable to obtain a target approval process template, and generate the required number of approvals corresponding to the target approval process template;
[0020] Detect whether an approval matter corresponding to the target approval process template appears.
[0021] Optionally, in the fifth implementation manner of the first aspect of the present invention, the step of creating an approval process template including a start node, an end node, and at least one approval node includes:
[0022] When receiving a template generation request, create an approval process template including a start node, an end node, and at least one approval node according to the text information carried in the generation request to respond to the template generation request.
[0023] Optionally, in the sixth implementation manner of the first aspect of the present invention, the step of creating an approval process template including a start node, an end node, and at least one approval node according to the text information carried in the generation request includes:
[0024] Extract the text information carried in the generation request;
[0025] Generate target process metadata corresponding to the text information;
[0026] According to the target process metadata, create an approval process template including a start node, an end node, and at least one approval node.
[0027] Optionally, in the seventh implementation manner of the first aspect of the present invention, the step of generating target process metadata corresponding to the text information includes:
[0028] When detecting the text information input by the user, generate initial process metadata according to the text information;
[0029] Determine whether the initial process metadata is complete;
[0030] If the initial process metadata is incomplete, perform a metadata addition operation based on the initial process metadata to obtain target process metadata.
[0031] In a second aspect, an embodiment of the present invention provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the above-mentioned approval role transfer method are implemented.
[0032] In a third aspect, an embodiment of the present invention provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned approval role transfer method are implemented.
[0033] In a fourth aspect, an embodiment of the present invention provides a computer program product, and when the computer program product runs on a terminal device, the terminal device is caused to execute the above-mentioned approval role transfer method.
[0034] The beneficial effects of the embodiments of the present invention compared with the prior art are as follows: If an approval item is detected, detect the approval result corresponding to each approval node in the approval item; according to each approval result, update the status variable corresponding to each approval node to obtain the current status variable corresponding to each approval node, and record the current approval times corresponding to the approval item; according to the current approval times and the current status variable corresponding to each approval node, perform an approval role transfer operation. Through the approval role transfer method, the approval result of each approval node in the approval item can be detected in real time, and the status variable and approval times can be updated accordingly. It solves the problem in the traditional technology that the status variable and approval times of each approval node cannot be accurately tracked. By considering the approval times and the status variable of the approval node, the approval role transfer operation can be accurately performed, improving the approval efficiency and quality. During the approval process, the status variable of each approval node can be dynamically updated according to the actual approval result, and the approval role transfer operation can be performed according to the approval times and the status variable. The flexibility of the approval is improved. Description of the Drawings
[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0036] Figure 1 It is a schematic diagram of an embodiment of the approval role transfer method in the embodiment of the present invention;
[0037] Figure 2 It is a schematic diagram of a specific embodiment of step S103 of the approval role transfer method in the embodiment of the present invention;
[0038] Figure 3 It is a schematic diagram of a specific embodiment after step S103 of the approval role transfer method in the embodiment of the present invention;
[0039] Figure 4 It is a schematic diagram of a specific embodiment before step S101 of the approval role transfer method in the embodiment of the present invention;
[0040] Figure 5 It is a schematic diagram of an embodiment of a terminal device in the embodiment of the present invention. Detailed implementation manners
[0041] In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative efforts belong to the protection scope of the present invention.
[0042] It should be noted that the terms "including", "comprising" and "having" and any variations thereof in the description and claims of the present invention and the above-mentioned drawings are intended to cover non-exclusive inclusion. For example, a process, method, terminal, product or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally further include steps or units not listed, or may optionally further include other steps or units inherent to these processes, methods, products or devices. In the terms in the claims, description and drawings of the present invention, relational terms such as "first" and "second" are only used to distinguish one entity / operation / object from another entity / operation / object, and do not necessarily require or imply any such actual relationship or order between these entities / operations / objects.
[0043] Referring to "embodiment" herein means that a specific feature, structure or characteristic described in connection with the embodiment may be included in at least one embodiment of the present invention. The phrase appears in various places in the specification and does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art explicitly and implicitly understand that the embodiments described herein may be combined with other embodiments.
[0044] With the development of business, in some cases, process approval needs to be performed in multiple cycles according to specific conditions until specific conditions are met.
[0045] Traditional technologies cannot accurately track key information such as the status variables and the number of approvals at each approval node, resulting in a lack of flexibility in the transfer of approval roles.
[0046] In view of this, embodiments of the present invention provide a method for transferring approval roles, a terminal device, and a storage medium. Through the method for transferring approval roles, the approval results of each approval node in an approval matter can be detected in real time, and the status variables can be updated accordingly and the number of approvals can be recorded. This solves the problem in traditional technologies that the status variables and the number of approvals at each approval node cannot be accurately tracked. By considering the number of approvals and the status variables of the approval nodes, the transfer operation of the approval roles can be accurately executed, improving the approval efficiency and quality. When the approval process is carried out, the status variables of each approval node can be dynamically updated according to the actual approval results, and the transfer operation of the approval roles can be executed according to the number of approvals and the status variables. This improves the flexibility of the approval.
[0047] In order to illustrate the technical solution of the present invention, the following will be described through specific embodiments.
[0048] Figure 1 The figure shows a schematic diagram of the implementation process of a method for transferring approval roles provided by an embodiment of the present invention. This method can be applied to a terminal device. The terminal device can be a mobile phone, a tablet computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, etc.
[0049] Specifically, the above method for transferring approval roles may include the following steps S101 to step S103.
[0050] Step S101, if an approval matter is detected, detect the approval result corresponding to each approval node in the approval matter.
[0051] In an embodiment of the present invention, a Flowable Designer is used to create an approval process template, which includes a start node, an end node, and at least one approval node.
[0052] Assign a status variable res to each approval node to record the approval result of the node (for example, passed or rejected).
[0053] Create a global variable approvalCount to record the number of approvals for the entire approval matter.
[0054] Configure an event listener for each approval node, and the listener is triggered when the approval task is completed.
[0055] The event listener is responsible for updating the status variable res of the corresponding approval node and increasing the global approval count approvalCount.
[0056] When the event listener is triggered, first check the status variable res of the current approval node.
[0057] If res indicates that the approval is not passed, decide whether to roll back or terminate the approval process according to the business logic.
[0058] If res indicates that the approval is passed, check whether the global approval count approvalCount reaches the preset required approval count.
[0059] If the required approval count is reached, perform the transfer operation of the approval role (for example, notify the relevant personnel or system of the approval result).
[0060] If the required approval count is not reached, continue to transfer the approval task according to the configuration of the next approval node.
[0061] In the steps of this embodiment, when a new approval item is received, an event is triggered to indicate the start of the approval item.
[0062] This event can be initiated by the user or automatically generated by other components.
[0063] For each approval node, call the preset event listener to dynamically monitor the approval result.
[0064] The event listener can be a custom class that implements a specific interface for listening to the status changes of the approval node.
[0065] When the approval node is completed (for example, the user submits the approval opinion), the event listener captures the event and obtains the approval result.
[0066] Step S102, according to each approval result, update the status variable corresponding to each approval node to obtain the current status variable corresponding to each approval node, and record the current approval count corresponding to the approval item.
[0067] In the steps of this embodiment, according to the approval result, update the status variable (such as res) corresponding to each approval node. At the same time, record the current approval count corresponding to the entire approval item.
[0068] Among them, when an approval item is detected and the approval process is started, the approval count will be initialized to 0 or set according to the starting status defined in the approval process template.
[0069] At each stage of the approval process, whenever an approval node is processed (i.e., the approval result is determined), the approval count is incremented accordingly. This can be implemented in the approval result detection. Whenever a node changes from the "not approved" state to the "approved" state, this change is recorded and the approval count is updated accordingly.
[0070] When creating the approval process template, each approval node is assigned an initial value of the status variable, indicating that the node has not been approved yet.
[0071] When the approval process is in progress, the approval results of each approval node are detected.
[0072] Based on the approval results (such as approved, rejected, pending review, etc.), the status variable value of the node is updated accordingly. For example, if a node is approved, its current status variable value changes from "not approved" to "approved".
[0073] Step S103: Perform the transfer operation of the approval role according to the current approval count and the current status variables corresponding to each approval node.
[0074] In the steps of this embodiment, based on the current approval count and the status variables corresponding to each approval node, the next transfer operation is determined.
[0075] If the approval is not completed (for example, there are still nodes to be approved or the required approval count has not been reached), continue to transfer to the next approval node.
[0076] If the approval is completed (for example, all nodes have been approved or the required approval count has been reached), perform the end operation.
[0077] In an alternative embodiment, when performing the transfer operation of the approval role, in addition to considering the current approval count and status variables, a condition-based judgment is introduced. For example, a conditional expression is set, and the transfer operation is only performed when a specific condition is met (such as approval by a specific approver).
[0078] For nodes that require multiple approvals, sequential approval or parallel approval is supported. In sequential approval, the approval nodes are transferred to different approvers in sequence. In parallel approval, the approval nodes are transferred to multiple approvers simultaneously, and the process only continues to the next node when all approvers have completed their approvals.
[0079] Optionally, it is supported to dynamically adjust the approval process during the approval. For example, approval nodes can be dynamically added, deleted, or modified according to the approval results or specific conditions. The control variables and the required approval count are updated correspondingly.
[0080] Optionally, for approvers who cannot complete the approval in a timely manner, the approval proxy function is supported. When the preset conditions are met, the approval proxy allows other users (such as superiors, colleagues, etc.) to replace the original approver to complete the approval operation. For example, if the approval is not completed after the preset time, the approver will be automatically switched to the approval proxy.
[0081] The beneficial effects of the embodiments of the present invention compared with the prior art are as follows: If an approval item is detected, the approval results corresponding to each approval node in the approval item are detected; according to each approval result, the status variable corresponding to each approval node is updated to obtain the current status variable corresponding to each approval node, and the current approval times corresponding to the approval item are recorded; according to the current approval times and the current status variable corresponding to each approval node, the transfer operation of the approval role is executed. Through the transfer method of the approval role, the approval results of each approval node in the approval item can be detected in real time, and the status variable is updated and the approval times are recorded accordingly. It solves the problem in the traditional technology that the status variable and approval times of each approval node cannot be accurately tracked. By considering the approval times and the status variable of the approval node, the transfer operation of the approval role can be accurately executed, improving the approval efficiency and quality. When the approval process is carried out, the status variable of each approval node can be dynamically updated according to the actual approval result, and the transfer operation of the approval role is executed according to the approval times and the status variable. It improves the flexibility of the approval.
[0082] Traditional approval processes are often fixed and cannot flexibly meet complex business requirements. For example, in some cases, the approval process needs to perform multiple loop approvals according to specific conditions until specific conditions are met. However, although existing process engines (such as Flowable) are powerful, there are still certain limitations in implementing such loop approvals. Based on this, the present invention proposes an optional embodiment.
[0083] Refer to Figure 2 , Figure 2 FIG. is a schematic diagram of a specific embodiment of step S103 of the transfer method of the approval role in the embodiment of the present invention. Step S103 further includes the following specific implementation manners.
[0084] Step S1031, obtain the required approval times corresponding to the approval item, and judge whether the approval item is approved according to the required approval times and the approval times.
[0085] In the steps of this embodiment, the required approval times for each approval item are preset. The required approval times can be dynamically calculated based on the trigger conditions.
[0086] Check in real time or regularly whether the current approval times have reached the required approval times.
[0087] If the current approval times are less than the required approval times, the approval is not completed, and the approval process continues.
[0088] If the current number of approvals reaches or exceeds the required number of approvals, then proceed to the next step of judging the status variables of each approval node.
[0089] Step S1032, if the approval is completed, then perform the transfer operation of the approval role according to the current number of approvals and the current status variables corresponding to each approval node.
[0090] In the steps of this embodiment, for each approval node, the next transfer operation is determined according to its current status variable (such as "node not approved" or "node approved").
[0091] If all approval nodes have been approved (that is, the status variables are all "node approved"), then the approval process ends, and subsequent operations can be performed (such as releasing decisions, notifying relevant personnel, etc.).
[0092] In the embodiment of the present invention, by dynamically judging the number of approvals and the node status, unnecessary approval links are avoided, and the approval efficiency is improved. The required number of approvals and the status of the approval nodes can be flexibly set and modified, so that the approval process can adapt to different scenarios. Automatically perform the transfer operation of the approval role, reducing the possibility of human errors.
[0093] In the traditional approval process, obtaining the approval result usually depends on manual input or the status change of fixed process nodes. Manual input of the approval result may cause delays, affecting the efficiency and timeliness of the process. The status change of fixed process nodes may not be able to adapt to complex approval logics. Based on this, an alternative embodiment of the present invention is proposed.
[0094] Step S101 also includes the following specific implementation manners.
[0095] Step S1011, call a preset event listener to dynamically monitor each approval node in the approval matter, and obtain the approval result corresponding to each approval node.
[0096] In the steps of this embodiment, in the approval process design stage, use Flowable Designer to configure an event listener for each approval node. The event listener is a Java class that implements a specific interface (such as TaskListener or ExecutionListener).
[0097] The event listener is configured to be triggered when a specific event occurs, such as task completion (complete event) or task assignment (assign event).
[0098] When the approval process executes to a certain approval node, the Flowable engine automatically calls the event listener configured for this node.
[0099] The event listener obtains relevant information of the current approval node through implemented methods (such as notify or notifyExecution), including the approval result (usually a variable value indicating whether the approval is passed).
[0100] Inside the method of the event listener, the approval result of the current approval node is obtained by accessing the APIs provided by Flowable (such as DelegateTask or Execution object).
[0101] The approval result can be a boolean value (indicating passed / failed), or it may be a complex object, such as multiple approval opinions or additional information.
[0102] In the embodiments of the present invention, the status change of the approval node is monitored in real time through the event listener, and the approval result can be processed immediately. Since the event listener can be configured to trigger on multiple events, complex approval logics can be supported.
[0103] Refer to Figure 3 , Figure 3 FIG. is a schematic diagram of a specific embodiment after step S103 of the transfer method of the approval role in the embodiments of the present invention. The following specific implementation manners are further included after step S103.
[0104] Step S201, obtain the approver and approval time corresponding to the approval result.
[0105] In the steps of this embodiment, after a certain approval node completes the approval, the approval result (such as passed, rejected, etc.) is extracted from the current approval task. At the same time, the user who performs this approval operation (i.e., the approver) and the time when the approval occurs are recorded.
[0106] Step S202, record the approval result, approver, and approval time.
[0107] In the steps of this embodiment, the information such as the extracted approval result, approver, and approval time is stored in a persistent manner.
[0108] For example, an approval record entity is created, its attributes (such as approval result, approver ID, approval time, etc.) are set, and it is saved to the database.
[0109] Optionally, obtain the approval result, approver, etc. information from the current task object (such as DelegateTask). Create an approval record entity and set its attributes. Call the data access layer method to save the approval record entity to the database.
[0110] In the embodiments of the present invention, by recording information such as approval results, approvers, and approval times, the historical records of the approval process can be conveniently traced, and the status and changes of each approval node can be understood. The accumulated approval data can be used for subsequent data analysis, such as statistical indicators like approval passing rates and approval durations.
[0111] In traditional approval process management, manually creating an approval process takes a lot of time and effort and is prone to errors. Monitoring and reminding of the approval progress also rely on manual operations and are difficult to update in real time. The approval process is difficult to quickly adjust according to different business requirements. Calculating the number of approvals usually depends on manual judgment and is prone to errors. Based on this, an alternative embodiment of the present invention is proposed.
[0112] Refer to Figure 3 , Figure 3 is a schematic diagram of a specific embodiment before step S101 of the method for the transfer of approval roles in the embodiments of the present invention. The following specific embodiments are also included before step S101.
[0113] Step S203, create an approval process template including a start node, an end node, and at least one approval node.
[0114] In the steps of this embodiment, when a template generation request is received (for example, triggered by a user interface or API call), according to the text information carried in the request (such as flowchart description, node information, transfer conditions, etc.), start creating an approval process template.
[0115] Use the API provided by a process engine (such as Flowable) to generate an approval process template including a start node, an end node, and at least one approval node according to the text information.
[0116] Step S204, assign status variables to each approval node to obtain a target approval process template, and generate the required number of approvals corresponding to the target approval process template. The status variables include node not approved and node approved.
[0117] In the steps of this embodiment, during the creation of the approval process template, assign a status variable to each approval node. The status variable is used to record the approval status of the node, such as "node not approved" and "node approved".
[0118] The status variables can be stored in the database of the process engine and associated with the process instance.
[0119] According to the structure of the approval process template and the configuration of the nodes, calculate and generate the required number of approvals. The required number of approvals can be determined based on the business rules corresponding to the text information, such as each node needs to be approved by multiple approvers, etc. The business rules can be obtained by analyzing the text information.
[0120] Detect whether new approval matters occur regularly or in real time. This can be achieved by listening for specific events.
[0121] Step S205: Detect whether the approval matters corresponding to the target approval process template occur.
[0122] In the steps of this embodiment, when a new approval matter is detected, according to the relevant information of the approval matter, the approval process template corresponding to the approval matter can be determined.
[0123] In the embodiment of the present invention, by creating a configurable approval process template, the approval process can be adjusted according to different business requirements without modifying the underlying code. The dynamic configuration of status variables and the required number of approvals can handle more complex approval logics, such as loop approval, conditional approval, etc.
[0124] In traditional approval process management, the creation of approval process templates usually relies on fixed templates. These templates cannot fully adapt to different approval scenarios, resulting in limitations for users. And the traditional creation method often requires users to manually set each node and rule of the approval process, which is not only time-consuming and laborious but also error-prone. Based on this, an alternative embodiment of the present invention is proposed.
[0125] Step S201 further includes the following specific implementation manners.
[0126] Step S2011: When a template generation request is received, according to the text information carried in the generation request, create an approval process template including a start node, an end node, and at least one approval node to respond to the template generation request.
[0127] In the steps of this embodiment, a template generation request is received. The request can come from an operation initiated by the user through the interface or a call from other components.
[0128] The request carries text information for generating the approval process template. The text information can be descriptive text input by the user.
[0129] Extract the text information from the received request.
[0130] According to the extracted text information, create an approval process template including a start node, an end node, and at least one approval node. The template defines the basic framework of the approval process.
[0131] Respond to the requester with the created approval process template. For example, save the template or display it to the user through the interface.
[0132] In the embodiments of the present invention, by receiving and parsing the text information input by the user to create an approval process template, it can adapt to different approval scenarios. The user can flexibly define the approval process according to their own needs without relying on a fixed template. The user only needs to input descriptive text information to generate an approval process template, which reduces the usage threshold and also reduces the time and effort for the user to manually set up the approval process.
[0133] The traditional approval process design process is usually rather cumbersome and requires a large amount of manual configuration and setting work. This not only increases the design cost and time cost but also affects the approval efficiency. Based on this, the present invention proposes an alternative embodiment.
[0134] Step S2011 also includes the following specific implementations.
[0135] Step S20111, extract the text information carried by the generation request;
[0136] Step S20112, generate the target process metadata corresponding to the text information;
[0137] Step S20113, according to the target process metadata, create an approval process template including a start node, an end node, and at least one approval node.
[0138] In the steps of this embodiment, the extracted text information will be converted into a more structured data form, that is, the target process metadata. The process metadata describes various elements of the approval process, such as the start node, the end node, the approval node, etc. In this process, the text information will be parsed according to predefined rules and the corresponding process metadata will be generated.
[0139] After obtaining the target process metadata, a specific approval process template can be created according to the target process metadata. The approval process template contains all necessary nodes and connections to reflect the actual operation mode of the approval process.
[0140] In the embodiments of the present invention, when the user can generate a new approval process template at any time according to the actual business needs without relying on a fixed one, since the approval process template can be automatically generated according to the process metadata, the new approval process can be deployed and implemented faster.
[0141] The creation of the approval process template usually depends on professional process modeling tools or. These tools require the user to have certain process modeling knowledge to define the approval process. However, for many non-professionals, mastering these skills is a challenge. Based on this, the present invention proposes an alternative embodiment.
[0142] Step S20112 also includes the following specific implementations.
[0143] In step S201121, when the text information input by the user is detected, initial process metadata is generated according to the text information.
[0144] In step S201122, it is determined whether the initial process metadata is complete.
[0145] In step S201123, if the initial process metadata is incomplete, a metadata addition operation is performed on the basis of the initial process metadata to obtain the target process metadata.
[0146] In the steps of this embodiment, the generated initial process metadata is checked to determine whether it contains all the necessary information required to create an approval process template.
[0147] Optionally, if it is found that the initial process metadata is incomplete, new approval nodes can be added to the initial process metadata based on the initial process metadata and a preset process template database, so as to obtain the target process metadata.
[0148] Optionally, if it is found that the initial process metadata is incomplete, natural language processing (NLP) can be used to process the text information, thereby generating new text information, and then the target process metadata is generated based on the new text information.
[0149] In the embodiment of the present invention, by parsing the text information and generating process metadata, the manual configuration work that needs to be performed by the user when creating an approval process template can be significantly reduced. The user can describe a complex approval process by inputting simple text information without having to understand the underlying process modeling technology. Non-professionals can also easily create an approval process template that meets business requirements.
[0150] As Figure 5 shown, it is a schematic diagram of a terminal device provided by an embodiment of the present invention. The terminal device 5 may include: a processor 501, a memory 502, and a computer program 503 stored in the memory 502 and executable on the processor 501, such as a transfer program for approval roles. When the processor 501 executes the computer program 503, the steps in the above-mentioned transfer embodiments of each approval role are implemented.
[0151] The computer program can be divided into one or more modules / units. One or more modules / units are stored in the memory 502 and executed by the processor 501 to complete the present invention. One or more modules / units can be a series of computer program instruction segments capable of performing specific functions, and these instruction segments are used to describe the execution process of the computer program in the terminal device.
[0152] The terminal device may include, but is not limited to, a processor 501 and a memory 502. Those skilled in the art can understand that Figure 5The following are merely examples of terminal devices, which do not constitute limitations on terminal devices. They may include more or fewer components than those shown in the figures, or combine certain components, or have different components. For example, a terminal device may also include input / output devices, network access devices, buses, etc.
[0153] The so-called processor 501 may be a central processing unit (CPU), or may also be 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. A general-purpose processor may be a microprocessor, or the processor may also be any conventional processor, etc.
[0154] The memory 502 may be an internal storage unit of the terminal device, such as the hard disk or memory of the terminal device. The memory 502 may also be an external storage device of the terminal device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal device. Further, the memory 502 may also include both an internal storage unit and an external storage device of the terminal device. The memory 502 is used to store computer programs and other programs and data required by the terminal device. The memory 502 may also be used to temporarily store data that has been output or is to be output.
[0155] It should be noted that for the convenience and conciseness of description, the structure of the above terminal device may also refer to the specific description of the structure in the method embodiments, which will not be elaborated here.
[0156] An embodiment of the present invention also provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned approval role transfer method can be implemented.
[0157] An embodiment of the present invention provides a computer program product, and when the computer program product runs on a mobile terminal, the mobile terminal can be made to execute the steps in the above-mentioned approval role transfer method.
[0158] In the above embodiments, the descriptions of the respective embodiments have their own emphases. For parts not detailed or recorded in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.
[0159] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.
[0160] In the embodiments provided by the present invention, it should be understood that the disclosed terminal devices and methods can be implemented in other ways. For example, the terminal device embodiments described above are merely illustrative. Another point is that the couplings or direct couplings or communication connections shown or discussed between each other can be through some interfaces, and the indirect couplings or communication connections of devices or units can be in electrical, mechanical or other forms.
[0161] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they can be located in one place, or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0162] In addition, the functional units in each embodiment of the present invention can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units.
[0163] When the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, to implement all or part of the processes in the above-described embodiment methods of the present invention, it can also be completed by a computer program instructing relevant hardware. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above-described various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file, or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disc, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the content included in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice within the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.
[0164] The above-described embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features. These modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. A method for transferring approval roles, characterized in that: include: If an approval item is detected, detecting the approval result corresponding to each approval node in the approval item; According to each of the approval results, the state variable corresponding to each of the approval nodes is updated to obtain the current state variable corresponding to each of the approval nodes, and the current number of approvals corresponding to the approval items is recorded; The transfer operation of the approval role is performed according to the current approval number and the current state variable corresponding to each approval node.
2. The method for transferring approval roles according to claim 1, characterized in that: The step of executing the transfer operation of the approval role according to the current approval number and the current state variable corresponding to each approval node includes: Obtaining the required number of approvals corresponding to the approval item, and judging whether the approval item has been approved based on the required number of approvals and the number of approvals; If the approval is completed, the transfer operation of the approval role is performed according to the current approval number and the current state variable corresponding to each approval node.
3. The method for transferring approval roles according to claim 1, characterized in that: The step of detecting the approval result corresponding to each approval node in the approval matter includes: The preset event listener is called to dynamically monitor each approval node in the approval matter to obtain the approval result corresponding to each approval node.
4. The transfer method of the approval role as claimed in claim 1, characterized in that: After the step of detecting the approval result corresponding to each approval node in the approval item if the approval item is detected, the method further includes: Obtain the approver and approval time corresponding to the approval result; The approval result, the approver, and the approval time are recorded.
5. The method for transferring approval roles according to claim 1, characterized in that: Before the step of detecting the approval result corresponding to each approval node in the approval matter if the approval matter is detected, the method further includes: Create an approval process template including a start node, an end node and at least one approval node; Assigning a state variable to each of the approval nodes, obtaining a target approval process template, and generating a required number of approvals corresponding to the target approval process template, wherein the state variable includes nodes that have not been approved and nodes that have been approved; Detect whether the approval item corresponding to the target approval process template appears.
6. The method for transferring approval roles as claimed in claim 5, characterized in that: The step of creating an approval process template including a start node, an end node and at least one approval node comprises: When a template generation request is received, an approval process template including a start node, an end node and at least one approval node is created according to the text information carried in the generation request to respond to the template generation request.
7. The transfer method of the approval role as claimed in claim 6, characterized in that: The step of creating an approval process template including a start node, an end node and at least one approval node according to the text information carried in the generation request includes: Extracting text information carried in the generation request; Generate target process metadata corresponding to the text information; According to the target process metadata, an approval process template is created, which includes a start node, an end node and at least one approval node.
8. The method for transferring approval roles as claimed in claim 7, characterized in that: The step of generating target process metadata corresponding to the text information includes: When text information input by the user is detected, initial process metadata is generated according to the text information; Determining whether the initial process metadata is complete; If the initial process metadata is incomplete, a metadata adding operation is performed based on the initial process metadata to obtain the target process metadata.
9. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method for transferring approval roles as described in any one of claims 1 to 8 when executing the computer program.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method for transferring approval roles as described in any one of claims 1 to 8 are implemented.