Task approval method, device and equipment based on BPMN flow chart and computer readable storage medium
By obtaining task local variable information and judgment process stack in the BPMN flowchart and flowing with the task owner logo, the problem of difficulty in dynamically adjusting the approval process by traditional process engines is solved, and a more flexible and efficient approval process is achieved.
Patent Information
- Application Number
- CN202411494634.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2025-03-14
AI Technical Summary
Traditional process engines are difficult to dynamically adjust the approval process during the task approval life cycle, and cannot meet the needs of large enterprises for flexible approval scenarios.
By obtaining local variable information of the current task in the BPMN flowchart, determining whether there is a sequential execution stack and a reply stack, and performing task flow operations based on the task owner identification, achieving flexible adjustment of the approval process.
It improves the flexibility of the approval process, improves the efficiency of process approval, and can dynamically respond to business changes.
Smart Images

Figure CN119624343A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a task approval method, device, equipment and computer-readable storage medium based on a BPMN flowchart. Background Art
[0002] With the expansion of domestic business, traditional process engines based on activiti or flowable are often used for process approval in the industry. In the entire life cycle of task approval, only the approvers and approval order of each node are pre-set. Once the process is initiated, it is difficult to dynamically adjust the current approval process in a targeted manner when business requirements change temporarily, which cannot meet the demands of large enterprises for flexible approval scenarios.
[0003] Therefore, how to improve the flexibility of the approval process is an issue that needs to be addressed urgently. Summary of the invention
[0004] The main purpose of this application is to provide a task approval method, device, equipment and computer-readable storage medium based on the BPMN flowchart, aiming to solve the technical problem of how to improve the flexibility of the approval process.
[0005] To achieve the above purpose, the present application provides a task approval method based on a BPMN flowchart, and the task approval method based on a BPMN flowchart comprises the following steps:
[0006] When the current task in the BPMN flowchart is completed, the local variable information of the current task is obtained;
[0007] If there is no sequential execution stack corresponding to the current task and no reply stack corresponding to the current task in the local variable information, then obtaining the owner identifier corresponding to the current task;
[0008] Acquire a task processing identifier of each target subtask based on the owner identifier, wherein the target subtask is a task other than the current task in the subtask corresponding to the owner identifier;
[0009] If there is no unprocessed mark in the task processing mark, a task flow operation is performed based on the current task.
[0010] Furthermore, if the local variable information does not contain a sequential execution stack corresponding to the current task and does not contain a recovery stack corresponding to the current task, the step of obtaining an owner identifier corresponding to the current task includes:
[0011] Determine whether there is a sequential execution stack corresponding to the current task in the local variable information, wherein the sequential execution stack includes task information of the current task and sequential execution tasks in the same batch as the current task;
[0012] If the local variable information does not contain a sequential execution stack corresponding to the current task, determine whether the local variable information contains a reply stack corresponding to the current task, wherein the reply stack includes task information of the reply task corresponding to the previous signed task;
[0013] If the reply stack corresponding to the current task does not exist in the local variable information, the owner identifier corresponding to the current task is obtained.
[0014] Furthermore, after the step of determining whether there is a sequential execution stack corresponding to the current task in the local variable information, the task approval method based on the BPMN flowchart further includes:
[0015] If the local variable information contains a sequential execution stack corresponding to the current task, setting the task processing flag of the current task to task processing completion;
[0016] A sequential execution task corresponding to the current task is generated based on the sequential execution stack.
[0017] Further, after the step of determining whether there is a reply stack corresponding to the current task in the local variable information, the task approval method based on the BPMN flowchart further includes:
[0018] If there is a reply stack corresponding to the current task in the local variable information, determining whether the task processing information in the reply set corresponding to the reply stack has been processed, wherein the reply set includes the task processing information of the parallel tasks of the same batch corresponding to the current task;
[0019] If the task processing information is completed, executing a reply action based on the task processing information, and generating a next reply task based on the task information;
[0020] If there is uncompleted processing information in the task processing information, the task processing flag of the current task is set to task processing completed.
[0021] Furthermore, after the step of obtaining the task processing identifier of each subtask, the task approval method based on the BPMN flowchart further includes:
[0022] If there is an unprocessed flag in the task processing flags, the task processing flag of the current task is set to task processing completed.
[0023] Furthermore, the task approval method based on the BPMN flowchart also includes:
[0024] When receiving a post-signature request corresponding to the current task, extract the first execution ID from the task information of the current task;
[0025] Setting the processing status corresponding to the current task to a transferred status or a processed status;
[0026] A corresponding first signing subtask is generated based on the post-signing request, and the first execution ID is assigned to the first signing subtask.
[0027] Furthermore, the task approval method based on the BPMN flowchart also includes:
[0028] When receiving a previous signature request corresponding to the current task, extracting a second execution ID from the task information of the previous task corresponding to the current task;
[0029] Setting the processing status corresponding to the current task to a query status;
[0030] A corresponding second signing subtask is generated based on the previous signing request, and the second execution ID is assigned to the second signing subtask.
[0031] In addition, to achieve the above purpose, the present application also provides a task approval device based on a BPMN flowchart, and the task approval device based on a BPMN flowchart includes:
[0032] A first acquisition module is used to acquire local variable information of the current task when the current task in the BPMN flowchart is completed;
[0033] A second acquisition module is used to acquire an owner identifier corresponding to the current task if there is no sequential execution stack corresponding to the current task and no recovery stack corresponding to the current task in the local variable information;
[0034] A third acquisition module is used to acquire a task processing identifier of each target subtask based on the owner identifier, wherein the target subtask is a task other than the current task in the subtask corresponding to the owner identifier;
[0035] The task flow module is used to perform a task flow operation based on the current task if there is no unprocessed mark in the task processing mark.
[0036] In addition, to achieve the above-mentioned purpose, the present application also provides a task approval device based on a BPMN flowchart, and the task approval device based on a BPMN flowchart includes: a memory, a processor, and a task approval program based on a BPMN flowchart stored in the memory and executable on the processor, and when the task approval program based on the BPMN flowchart is executed by the processor, the steps of the aforementioned task approval method based on the BPMN flowchart are implemented.
[0037] In addition, to achieve the above-mentioned purpose, the present application also provides a computer-readable storage medium, on which a task approval program based on a BPMN flowchart is stored. When the task approval program based on the BPMN flowchart is executed by a processor, the steps of the aforementioned task approval method based on the BPMN flowchart are implemented.
[0038] The present application obtains the local variable information of the current task when the current task is completed in the BPMN flowchart; then, if there is no sequential execution stack corresponding to the current task and no reply stack corresponding to the current task in the local variable information, obtains the owner identifier corresponding to the current task; then obtains the task processing identifier of each target subtask based on the owner identifier; then, if there is no unprocessed identifier in the task processing identifier, performs a task flow operation based on the current task. When approving a process based on the BPMN flowchart, it is determined whether there is a sequential execution stack (sequential execution task) and a reply stack (co-signing task) according to the local variable information of the current task, and the task flow is determined according to the owner identifier corresponding to the current task, thereby improving the flexibility of the approval process and thereby improving the efficiency of the process approval. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0040] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0041] Figure 1 A flowchart diagram of the first embodiment of the task approval method based on the BPMN flowchart of this application;
[0042] Figure 2 This is a schematic diagram of a scenario of continuous multi-instance mixed signing in an embodiment of a task approval method based on a BPMN flowchart of this application;
[0043] Figure 3 This is a schematic diagram of the module structure of a task approval device based on a BPMN flowchart in an embodiment of the present application;
[0044] Figure 4 This is a schematic diagram of the module structure of the task approval device based on the BPMN flowchart in an embodiment of the present application.
[0045] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0046] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0047] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0048] The main solution of the present application is: when the current task in the BPMN flowchart is executed, the local variable information of the current task is obtained; if there is no sequential execution stack corresponding to the current task and there is no reply stack corresponding to the current task in the local variable information, the owner identifier corresponding to the current task is obtained; based on the owner identifier, the task processing identifier of each subtask is obtained, wherein the subtask is a task other than the current task in the subtask corresponding to the owner identifier; if there is no unprocessed identifier in the task processing identifier, a task flow operation is performed based on the current task.
[0049] At present, with the expansion of domestic business, traditional process engines based on activiti or flowable are often used for process approval in the industry. In the entire life cycle of task approval, only the approvers and approval order of each node are pre-set. Once the process is initiated, it is difficult to dynamically adjust the current approval process in a targeted manner when business requirements change temporarily, which cannot meet the demands of large enterprises for flexible approval scenarios.
[0050] The industry's signature solution usually uses the process engine to modify the flowchart interface and make changes to the existing flowchart. This method is indeed feasible when used in simple nodes, but once the signature action occurs in a multi-instance signing sub-process, since each instance of the multi-instance signing sub-process points to the same BPMN flowchart, it will affect process instances other than the current signing sub-process instance, causing other signing sub-process instances to be unable to flow normally because they cannot find the exit line normally. In addition, modifying and publishing the flowchart operation will generate additional redundant flowcharts, and at the same time further expand the process definition database table, bringing unnecessary performance overhead.
[0051] The industry's signature solutions usually have difficulty supporting multi-instance signatures, let alone the possibility that the multi-instance tasks generated by signatures may be executed in sequence (multi-instance tasks have a fixed order, and are processed one by one in sequence and then flowed backward) or counter-signed (multi-instance tasks can be processed in parallel without interfering with each other, and flowed backward after all processing is completed). The industry's signature solutions cannot support mixed signature scenarios, that is, front signatures and back signatures can be infinitely mixed and nested, and the tasks generated in the multi-instance signature scenario can be run in a sequential execution or counter-signed mode, and can still flow backward normally after all the tasks generated by signatures are executed.
[0052] Therefore, how to improve the flexibility of the approval process is an issue that needs to be addressed urgently.
[0053] This application improves the flexibility of the approval process and thus improves the efficiency of process approval by determining whether there is a sequential execution stack (sequential execution task) and a reply stack (counter-signature task) according to the local variable information of the current task when approving the process based on the BPMN flowchart, and determining the task flow based on the owner identifier corresponding to the current task.
[0054] It should be noted that the execution subject of this embodiment can be a task approval device based on a BPMN flowchart, or a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or a task approval device based on a BPMN flowchart that can realize the above functions, etc. This embodiment does not specifically limit this. The following takes the task approval device based on a BPMN flowchart as an example of the execution subject to illustrate this embodiment and the following embodiments.
[0055] Based on this, this application proposes a task approval method based on a BPMN flowchart in the first embodiment. Figure 1 The task approval method based on the BPMN flowchart includes steps S101 to S104:
[0056] Step S101, when the current task in the BPMN flowchart is completed, obtaining the local variable information of the current task;
[0057] Among them, the subtask is a task instance generated by creating a subtask API using an open source process engine. In this embodiment, the task generated by the signature is a subtask. The execution ID is the execution data that the open source process engine relies on to generate the task flow action (when the execution ID exists, the task can flow backward normally, when the execution ID does not exist, the task is only completed and will not actually flow). Signing refers to a process in which one or more task instances need to be added to participate in the current process flow in the process that flows according to the BPMN flowchart designed in advance. Front signing refers to adding a task instance in front of the current task. When the newly added task instance is processed, the current task is actually processed (after the current task is actually processed, the process flow continues to be completed backward). Post signing refers to adding a task instance after the current task. When the newly added task instance is processed, the process flow continues to be completed backward. Multiple instances refer to a single signature operation, in which multiple signature task instances will actually be generated. Sequential execution refers to the execution and transfer between multiple tasks in a predetermined specified order. Co-signing refers to the fact that multiple tasks can be processed in parallel without affecting each other. When the same batch of co-signed tasks are executed, the process actually flows backward.
[0058] It should be noted that if the current task is a task to be signed, and the subtask corresponding to the current task has a sequential execution task, the "sequential execution stack" is maintained in the local variable information of the current task; when the subtask corresponding to the current task has a parallel task (co-signed task), the "reply stack" is maintained in the local variable information of the current task, and the "reply set" is maintained in the global variable of the process that generates the signature.
[0059] In this embodiment, when the current task in the BPMN flowchart is completed, the local variable information of the current task is obtained, so as to determine whether there is a corresponding sequential execution task and parallel task for the current task through the local variable information.
[0060] Step S102, if there is no sequential execution stack corresponding to the current task and no recovery stack corresponding to the current task in the local variable information, then obtaining the owner identifier corresponding to the current task;
[0061] In this embodiment, after obtaining the local variable information, it is determined whether there is a sequential execution stack corresponding to the current task in the local variable information, and whether there is a recovery stack corresponding to the current task. If there is no sequential execution stack corresponding to the current task in the local variable information, and there is no recovery stack corresponding to the current task in the local variable information, that is, the "sequential execution stack" and "reply stack" are not maintained in the local variable information, then the owner identifier corresponding to the current task is obtained, where the owner identifier is the execution ID of the current task.
[0062] Among them, the sequential execution stack includes the task information of the current task and the sequential execution tasks in the same batch as the current task. This task information set can be used to generate subsequent sequential execution tasks. The "sequential execution stack" is maintained in the local variable information of the signed task. It is created when the task initiates the signing action of the multi-instance sequential execution mode. It saves the sequential execution task information that will be generated after the current task is processed. After processing each task and generating the next sequential execution task, a sequential execution stack variable is consumed until all are consumed and the next operation is performed.
[0063] The reply stack includes the task information of the reply task corresponding to the previous signed task. The task information set can be used to generate the original task that initiated the inquiry. The "reply stack" is maintained in the local variable of the signed task to save the source task information that will be "replied" after the current task is processed. It is created when the previous signature action is added to the task initiation. When the previous signature is repeated, the current variable is incremented and consumed when the reply action is executed. When consumption is completed, the next operation is performed. The priority is lower than the reply set.
[0064] Step S103, obtaining a task processing identifier of each target subtask based on the owner identifier, wherein the target subtask is a task other than the current task in the subtask corresponding to the owner identifier;
[0065] In this embodiment, after obtaining the owner identifier, the task processing identifier of each target subtask is obtained based on the owner identifier. Specifically, each subtask corresponding to the owner identifier is obtained, and the tasks other than the current task among the subtasks corresponding to the owner identifier are taken as target subtasks, and the task processing identifier of each target subtask is obtained.
[0066] Step S104: If there is no unprocessed task identifier in the task processing identifier, a task transfer operation is performed based on the current task.
[0067] In this embodiment, after obtaining the task processing identifier of each target subtask, it is determined whether there is an unprocessed mark in the task processing identifier of each target subtask, that is, it is determined whether all target subtasks have been processed. If there is no unprocessed mark in the task processing identifier, that is, there is no unprocessed subtask in each target subtask, then the task flow operation is performed based on the current task to realize the flow of BPMN flowchart approval tasks, thereby improving the flexibility of the approval process and the efficiency of process approval.
[0068] In a feasible implementation, after step S103, the task approval method based on the BPMN flowchart may further include step S105:
[0069] Step S105: If there is an unprocessed flag in the task processing flags, the task processing flag of the current task is set to task processing completed.
[0070] In this embodiment, if there is an unfinished flag in the task processing flag, that is, there are unfinished subtasks in each target subtask, the task processing flag of the current task is set to task processing completed, so that the task is only completed but not transferred, which improves the flexibility of the approval process and further improves the efficiency of process approval.
[0071] The task approval method based on the BPMN flowchart proposed in this embodiment obtains the local variable information of the current task when the current task is completed in the BPMN flowchart; then, if there is no sequential execution stack corresponding to the current task and no reply stack corresponding to the current task in the local variable information, the owner identifier corresponding to the current task is obtained; then, based on the owner identifier, the task processing identifier of each target subtask is obtained; then, if there is no unprocessed identifier in the task processing identifier, the task flow operation is performed based on the current task. When the process is approved based on the BPMN flowchart, it is judged whether there is a sequential execution stack (sequential execution task) and a reply stack (co-signed task) according to the local variable information of the current task, and the task flow is judged according to the owner identifier corresponding to the current task, thereby improving the flexibility of the approval process and thus improving the efficiency of the process approval.
[0072] In a feasible implementation, step S102 may include steps S201 to S203:
[0073] Step S201, determining whether there is a sequential execution stack corresponding to the current task in the local variable information, wherein the sequential execution stack includes task information of the current task and sequential execution tasks in the same batch as the current task;
[0074] Step S202, if the local variable information does not contain a sequential execution stack corresponding to the current task, determine whether the local variable information contains a reply stack corresponding to the current task, wherein the reply stack includes task information of the reply task corresponding to the previous signed task;
[0075] Step S203: if the recovery stack corresponding to the current task does not exist in the local variable information, then obtain the owner identifier corresponding to the current task.
[0076] Among them, the sequential execution stack includes the task information of the current task and the sequential execution tasks in the same batch as the current task, and the task information set can be used to generate subsequent sequential execution tasks. The reply stack includes the task information of the reply task corresponding to the previous signing task, and the task information set can be used to generate the original task that initiated the inquiry. The reply set includes the task processing information of the parallel tasks of the same batch corresponding to the current task, which is used for the previous signing scenario to manage the processing of parallel tasks generated by the same batch of signatures, as a constraint on whether to allow downward flow; the "reply set" is maintained in the global variable of the process that generates the signature, and the source task that initiates the signature is used as the identifier to maintain the task information that needs to be replied. It is created when the task initiates the multi-instance previous signing action, and a reply set variable is consumed for each task completed. When all these tasks complete the "reply" action, the next step is performed.
[0077] In this embodiment, after obtaining the local variable information, it is determined whether there is a sequential execution stack corresponding to the current task in the local variable information. If there is no sequential execution stack corresponding to the current task in the local variable information, it is determined whether there is a recovery stack corresponding to the current task in the local variable information. If there is no recovery stack corresponding to the current task in the local variable information, the owner identifier corresponding to the current task is obtained.
[0078] Furthermore, in a feasible implementation, after step S201, the task approval method based on the BPMN flowchart may further include steps S204 to S205:
[0079] Step S204, if the local variable information contains a sequential execution stack corresponding to the current task, then the task processing flag of the current task is set to task processing completed;
[0080] Step S205: Generate a sequential execution task corresponding to the current task based on the sequential execution stack.
[0081] In this embodiment, if there is a sequential execution stack corresponding to the current task in the local variable information, the task processing identifier of the current task is set to task processing completion, and the sequential execution task corresponding to the current task (the next sequential execution task) is generated based on the sequential execution stack, and the sequential execution task is executed. Specifically, it is first determined whether the variables corresponding to the sequential execution stack have been consumed. If not, the next sequential execution task is generated and the sequential execution task is executed. If the variables corresponding to the sequential execution stack have been consumed, the step of obtaining the owner identifier corresponding to the current task is executed.
[0082] Furthermore, in a feasible implementation, after step S202, the task approval method based on the BPMN flowchart may further include steps S206 to S208:
[0083] Step S206, if there is a reply stack corresponding to the current task in the local variable information, determine whether the task processing information in the reply set corresponding to the reply stack has been processed, wherein the reply set includes the task processing information of the parallel tasks of the same batch corresponding to the current task;
[0084] Step S207, if the task processing information is completed, executing a reply action based on the task processing information, and generating a next reply task based on the task information;
[0085] Step S208: If there is unfinished processing information in the task processing information, the task processing flag of the current task is set to task processing completed.
[0086] In this embodiment, if there is a reply stack corresponding to the current task in the local variable information, it is determined whether the task processing information in the reply set corresponding to the reply stack has been processed. If the task processing information has been processed, a reply action is performed based on the task processing information, and the next reply task is generated based on the task information, and the next reply task is executed. If there is unprocessed processing information in the task processing information, the task processing flag of the current task is set to task processing completed.
[0087] The task approval method based on the BPMN flowchart proposed in this embodiment determines whether there is a sequential execution stack corresponding to the current task in the local variable information, wherein the sequential execution stack includes the task information of the current task and the sequential execution tasks in the same batch as the current task; then if there is no sequential execution stack corresponding to the current task in the local variable information, it is determined whether there is a reply stack corresponding to the current task in the local variable information, wherein the reply stack includes the task information of the reply task corresponding to the previous signed task; then if there is no reply stack corresponding to the current task in the local variable information, the owner identifier corresponding to the current task is obtained; by judging whether there is a sequential execution stack (sequential execution task) and a reply stack (co-signed task) according to the local variable information of the current task, and judging the task flow according to the owner identifier corresponding to the current task, the flexibility of the approval process is further improved, thereby improving the efficiency of process approval.
[0088] In a feasible implementation, the task approval method based on the BPMN flowchart may further include steps S301 to S303:
[0089] Step S301, when receiving a post-signature request corresponding to the current task, extracting a first execution ID from the task information of the current task;
[0090] Step S302, setting the processing status corresponding to the current task to a transferred status or a processed status;
[0091] Step S303: Generate a corresponding first signing subtask based on the post-signing request, and assign the first execution ID to the first signing subtask.
[0092] In this embodiment, the operations of "task transfer" and "add approver" can be performed during the process approval process, wherein task transfer means that when a user is processing an approval task, he may be unable to process the current task due to some offline business reasons, or the current task has one or more members who are more suitable to handle the task. The current task can be marked as "transferred" and the post-task signature function can be used to add one or more approval tasks of custom approval members after the current task. After all the approved approvers have approved, the task can be transferred to the back. Adding approvers means that when a user is processing an approval task, he may need to add one or more approvers to the approval process of the current task node due to some offline business reasons, or some special reasons require that some approval members be added to process the application together. In such a scenario, the current task can be directly marked as "processed", and the post-task signature function can be used to add one or more approval tasks of custom approval members after the current task. After all the approved approvers have approved, the task can be transferred to the back.
[0093] In this embodiment, when a post-signature request corresponding to the current task is received, the first execution ID is extracted from the task information of the current task, that is, the task information of the current task is obtained, and the first execution ID (owner ID) of the current task is extracted from the task information. If the current task does not have an execution ID, it will not actually be transferred backward. At the same time, the processing status corresponding to the current task is set to the transferred status or the processed status.
[0094] Next, based on the post-signature request, the corresponding first signing subtask is generated, and the first execution ID is assigned to the first signing subtask, that is, the execution ID (owner ID) of the first signing subtask is set as the first execution ID, that is, the first execution ID is assigned to all subtasks generated by the post-signature, and the execution IDs of subtasks in different scenarios are added and deleted to achieve the ability to flow according to the above logic.
[0095] The task approval method based on the BPMN flowchart proposed in this embodiment extracts the first execution ID from the task information of the current task when receiving the post-signature request corresponding to the current task; then sets the processing status corresponding to the current task to the transferred status or the processed status; then generates the corresponding first signature subtask based on the post-signature request, and assigns the execution first ID to the first signature subtask; realizes the post-signature of the BPMN flowchart approval process, further improves the flexibility of the approval process, and thus improves the efficiency of the process approval.
[0096] In a feasible implementation, the task approval method based on the BPMN flowchart may further include steps S401 to S403:
[0097] Step S401, when receiving a previous signature request corresponding to the current task, extracting a second execution ID from the task information of the previous task corresponding to the current task;
[0098] Step S402, setting the processing status corresponding to the current task to a query status;
[0099] Step S403: Generate a corresponding second signing subtask based on the previous signing request, and assign the second execution ID to the second signing subtask.
[0100] In this embodiment, a "task inquiry" operation can be performed during the process approval process. Task inquiry means that when a user is processing an approval task, he finds that the processing of the current task needs to rely on the approval and confirmation of one or more other non-preset approval members before it can be processed. In such a scenario, the current task can be marked as "inquiry" status, and the pre-task signature function can be used to add one or more approval tasks of custom approval members in front of the current task. When all the newly added pre-signature tasks are processed, you can continue to complete the approval of the current task.
[0101] In this embodiment, when a request for adding a signature to the current task is received, the second execution ID is extracted from the task information of the previous task corresponding to the current task; that is, the task information of the current task is obtained, and the second execution ID (owner ID) of the current task is extracted from the task information. If the current task does not have an execution ID, it will not actually flow backward. At the same time, the processing status corresponding to the current task is set to the inquiry status.
[0102] Next, a corresponding second signing subtask is generated based on the previous signing request, and a second execution ID is assigned to the second signing subtask, that is, the execution ID (owner ID) of the second signing subtask is set to the second execution ID, that is, the second execution ID is assigned to all subtasks generated by the previous signing, and the ability to flow according to the above logic is achieved by adding and deleting the execution IDs of subtasks in different scenarios.
[0103] like Figure 2 As shown, Figure 2 This is a schematic diagram of the scenario of continuous multi-instance mixed signing, in which the change process of task local variables and process global variables in each stage is consumed in order: sequential execution stack, reply set, reply stack. When all the variables that need to be consumed do not exist, it is finally determined whether the current task is the only task left with the same owner. If the conditions are met, the execution ID of the task that initially initiated the signing can be used to continue to flow backward according to the BPMN flowchart definition.
[0104] The task approval method based on the BPMN flowchart proposed in this embodiment extracts the second execution ID from the task information of the previous task corresponding to the current task when receiving the previous signature request corresponding to the current task; then sets the processing status corresponding to the current task to the inquiry status; and then generates the corresponding second signature subtask based on the previous signature request, and assigns the second execution ID to the second signature subtask, thereby realizing the previous signature of the BPMN flowchart approval process, further improving the flexibility of the approval process, and thus improving the efficiency of the process approval.
[0105] The present application also provides a task approval device based on a BPMN flowchart. Figure 3 , the task approval device based on the BPMN flowchart includes:
[0106] A first acquisition module 10 is used to acquire local variable information of the current task when the current task in the BPMN flowchart is completed;
[0107] A second acquisition module 20 is used to acquire an owner identifier corresponding to the current task if there is no sequential execution stack corresponding to the current task and no recovery stack corresponding to the current task in the local variable information;
[0108] A third acquisition module 30 is used to acquire a task processing identifier of each target subtask based on the owner identifier, wherein the target subtask is a task other than the current task in the subtask corresponding to the owner identifier;
[0109] The task flow module 40 is configured to execute a task flow operation based on the current task if there is no unprocessed task processing identifier in the task processing identifier.
[0110] The task approval device based on BPMN flowchart provided in the embodiment of the present application adopts the task approval method based on BPMN flowchart in the above embodiment, which can solve the technical problem of how to improve the flexibility of the approval process. Compared with the prior art, the beneficial effects of the task approval device based on BPMN flowchart provided in the embodiment of the present application are the same as the beneficial effects of the task approval method based on BPMN flowchart provided in the above embodiment, and the other technical features in the task approval device based on BPMN flowchart are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0111] The present application provides a task approval device based on a BPMN flowchart, and the task approval device based on a BPMN flowchart includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the task approval method based on the BPMN flowchart in the above-mentioned embodiment 1.
[0112] Reference below Figure 4 , which shows a schematic diagram of the structure of a task approval device based on a BPMN flowchart suitable for implementing an embodiment of the present application. The task approval device based on a BPMN flowchart in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 4 The task approval device based on the BPMN flowchart shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0113] like Figure 4As shown, the task approval device based on the BPMN flowchart may include a processing device 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In the RAM 1004, various programs and data required for the operation of the task approval device based on the BPMN flowchart are also stored. The processing device 1001, the ROM 1002, and the RAM 1004 are connected to each other via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems may be connected to the I / O interface 1006: input devices 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 1003 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 1009. The communication device 1009 may allow the task approval device based on the BPMN flowchart to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a task approval device based on the BPMN flowchart with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be implemented or have instead.
[0114] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0115] The task approval device based on BPMN flowchart provided by the present application adopts the task approval method based on BPMN flowchart in the above embodiment, which can solve the technical problem of how to improve the flexibility of the approval process. Compared with the prior art, the beneficial effects of the task approval device based on BPMN flowchart provided by the present application are the same as the beneficial effects of the task approval method based on BPMN flowchart provided by the above embodiment, and the other technical features in the task approval device based on BPMN flowchart are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0116] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0117] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0118] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the task approval method based on the BPMN flowchart in the above-mentioned embodiment.
[0119] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0120] The computer-readable storage medium may be included in the task approval device based on the BPMN flowchart; or may exist independently without being assembled into the task approval device based on the BPMN flowchart.
[0121] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by a task approval device based on a BPMN flowchart, the task approval device based on the BPMN flowchart: when the current task in the BPMN flowchart is completed, obtains the local variable information of the current task; if there is no sequential execution stack corresponding to the current task and no reply stack corresponding to the current task in the local variable information, obtains the owner identifier corresponding to the current task; obtains the task processing identifier of each target subtask based on the owner identifier, wherein the target subtask is a task other than the current task in the subtask corresponding to the owner identifier; if there is no unprocessed identifier in the task processing identifier, perform a task flow operation based on the current task.
[0122] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0123] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0124] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0125] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned task approval method based on the BPMN flowchart, and can solve the technical problem of how to improve the flexibility of the approval process. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the task approval method based on the BPMN flowchart provided by the above-mentioned embodiment, and will not be repeated here.
[0126] An embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the task approval method based on the BPMN flowchart as described above.
[0127] The computer program product provided by this application can solve the technical problem of how to improve the flexibility of the approval process. Compared with the prior art, the beneficial effects of the computer program product provided by the embodiment of this application are the same as the beneficial effects of the task approval method based on the BPMN flowchart provided by the above embodiment, which will not be repeated here.
[0128] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A task approval method based on BPMN flowchart, characterized in that: The task approval method based on the BPMN flowchart comprises the following steps: When the current task in the BPMN flowchart is completed, the local variable information of the current task is obtained; If there is no sequential execution stack corresponding to the current task and no reply stack corresponding to the current task in the local variable information, then obtaining the owner identifier corresponding to the current task; Acquire a task processing identifier of each target subtask based on the owner identifier, wherein the target subtask is a task other than the current task in the subtask corresponding to the owner identifier; If there is no unprocessed mark in the task processing mark, a task flow operation is performed based on the current task.
2. The task approval method based on BPMN flowchart as claimed in claim 1, characterized in that: If the local variable information does not contain a sequential execution stack corresponding to the current task and does not contain a recovery stack corresponding to the current task, the step of obtaining the owner identifier corresponding to the current task includes: Determine whether there is a sequential execution stack corresponding to the current task in the local variable information, wherein the sequential execution stack includes task information of the current task and sequential execution tasks in the same batch as the current task; If the local variable information does not contain a sequential execution stack corresponding to the current task, determine whether the local variable information contains a reply stack corresponding to the current task, wherein the reply stack includes task information of the reply task corresponding to the previous signed task; If the reply stack corresponding to the current task does not exist in the local variable information, the owner identifier corresponding to the current task is obtained.
3. The task approval method based on BPMN flowchart as claimed in claim 2, characterized in that: After the step of determining whether there is a sequential execution stack corresponding to the current task in the local variable information, the task approval method based on the BPMN flowchart further includes: If the local variable information contains a sequential execution stack corresponding to the current task, setting the task processing flag of the current task to task processing completion; A sequential execution task corresponding to the current task is generated based on the sequential execution stack.
4. The task approval method based on BPMN flowchart as claimed in claim 2, characterized in that: After the step of determining whether there is a reply stack corresponding to the current task in the local variable information, the task approval method based on the BPMN flowchart further includes: If there is a reply stack corresponding to the current task in the local variable information, determining whether the task processing information in the reply set corresponding to the reply stack has been processed, wherein the reply set includes the task processing information of the parallel tasks of the same batch corresponding to the current task; If the task processing information is completed, executing a reply action based on the task processing information, and generating a next reply task based on the task information; If there is uncompleted processing information in the task processing information, the task processing flag of the current task is set to task processing completed.
5. The task approval method based on BPMN flowchart as claimed in claim 1, characterized in that: After the step of obtaining the task processing identifier of each subtask, the task approval method based on the BPMN flowchart further includes: If there is an unprocessed flag in the task processing flags, the task processing flag of the current task is set to task processing completed.
6. The task approval method based on BPMN flowchart according to any one of claims 1 to 5, characterized in that: The task approval method based on the BPMN flowchart also includes: When receiving a post-signature request corresponding to the current task, extract the first execution ID from the task information of the current task; Setting the processing status corresponding to the current task to a transferred status or a processed status; A corresponding first signing subtask is generated based on the post-signing request, and the first execution ID is assigned to the first signing subtask.
7. The task approval method based on BPMN flowchart according to any one of claims 1 to 5, characterized in that: The task approval method based on the BPMN flowchart also includes: When receiving a previous signature request corresponding to the current task, extracting a second execution ID from the task information of the previous task corresponding to the current task; Setting the processing status corresponding to the current task to a query status; A corresponding second signing subtask is generated based on the previous signing request, and the second execution ID is assigned to the second signing subtask.
8. A task approval device based on BPMN flowchart, characterized in that: The task approval device based on the BPMN flowchart includes: A first acquisition module is used to acquire local variable information of the current task when the current task in the BPMN flowchart is completed; A second acquisition module is used to acquire an owner identifier corresponding to the current task if there is no sequential execution stack corresponding to the current task and no recovery stack corresponding to the current task in the local variable information; A third acquisition module is used to acquire a task processing identifier of each target subtask based on the owner identifier, wherein the target subtask is a task other than the current task in the subtask corresponding to the owner identifier; The task flow module is used to perform a task flow operation based on the current task if there is no unprocessed mark in the task processing mark.
9. A task approval device based on BPMN flowchart, characterized in that: The task approval device based on the BPMN flowchart comprises: a memory, a processor, and a task approval program based on the BPMN flowchart stored in the memory and executable on the processor. When the task approval program based on the BPMN flowchart is executed by the processor, the steps of the task approval method based on the BPMN flowchart as described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a task approval program based on a BPMN flowchart. When the task approval program based on a BPMN flowchart is executed by a processor, the steps of the task approval method based on a BPMN flowchart as described in any one of claims 1 to 7 are implemented.