CN114548916A - Approval method for complex workflow and specified approver - Google Patents
Approval method for complex workflow and specified approver Download PDFInfo
- Publication number
- CN114548916A CN114548916A CN202210116951.XA CN202210116951A CN114548916A CN 114548916 A CN114548916 A CN 114548916A CN 202210116951 A CN202210116951 A CN 202210116951A CN 114548916 A CN114548916 A CN 114548916A
- Authority
- CN
- China
- Prior art keywords
- task
- approval
- configuration information
- executing
- judging whether
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q10/00—Administration; Management
- G06Q10/10—Office automation; Time management
- G06Q10/103—Workflow collaboration or project management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/166—Editing, e.g. inserting or deleting
- G06F40/177—Editing, e.g. inserting or deleting of tables; using ruled lines
Abstract
The invention discloses an approval method for complex workflow, which comprises the following steps: s1: creating a flow instance using the configuration information, S2: create a task in the process instance, S3: triggering task to create a global listener, S4: reading the configuration information of the current task, S5: judging whether the configuration information of the current task has a plurality of pieces of configuration information, if so, executing S6, otherwise, executing S7, S6: create secondary parent task, assign configuration, and perform S3, S7: creating a subtask for each approver in the configuration, S8: and when the subtask is completed in the S7, triggering the task to complete the global monitor, and S9: judging whether a parent task is owned, if yes, executing S10, and if not, executing S2.
Description
Technical Field
The invention relates to the technical field of multi-process data processing, in particular to an approval method aiming at complex workflows and designated approvers.
Background
Activiti is an open-source workflow engine, and when facing countersigning (multi-person examination and approval), the existing technical scheme mainly comprises the following steps:
1. when drawing a BPMN graph, setting three parameters of loop cardinality, Collection and Element variable for a user task, and simultaneously setting assignment as an EL expression to realize the task, wherein in the process operation, multiple task executors are specified in two layers of variables according to configured Collection transmission process variables, and if partial persons pass through the task executors, the Completion condition needs to be set, and the task termination condition is set by the EL expression.
2. Setting an EL expression for a candidate user when drawing a BPMN graph, specifying a candidate through a variable at the beginning of an example, completing the task by replacing the task with a candidate removing operation, and completing the task when the number of candidates is less than a threshold value.
3. When drawing the BPMN graph, a gateway is utilized to draw a plurality of user tasks, and the access conditions of the gateway are configured to meet the countersigning requirement.
There are some inevitable problems with all three of the above cases: firstly, the flow chart needs to be adjusted according to a specific task flow when the flow chart is drawn by all three schemes, wherein the scheme 3 is the most serious, the scheme 1 and the scheme 2 at least need to know the passing proportion when drawing, the scheme 3 needs to know the number of people who specifically (possibly) participate in approval, so that high coupling phenomenon occurs between business and the flow chart, and the multiplexing of the flow chart is not facilitated, secondly, the EL expressions are needed in the schemes 1 and 2, when the flow is started, if the value needed by the EL expressions cannot be correctly specified, the flow cannot be correctly operated, and finally, the three schemes cannot be considered in the case that multiple groups of multiple conditions need to be approved, and the requirements cannot be met.
Disclosure of Invention
In order to overcome the defects of the prior art, the invention provides an approval method aiming at a complex workflow and a specified approver, which is used for solving the problem that the condition that multiple groups of multiple conditions need to be approved cannot be realized in the prior art.
The technical scheme adopted by the invention is as follows: an approval method for complex workflows, comprising the steps of:
s1: creating a process instance using the configuration information;
s2: creating a task in a process instance;
s3: triggering a task to create a global listener;
s4: reading configuration information of a current task;
s5: judging whether the configuration information of the current task has a plurality of pieces of configuration information, if so, executing S6, and if not, executing S7;
s6: creating a secondary parent task, dispatching configuration, and executing S3;
s7: creating a subtask for each approver in the configuration;
s8: the sub task is completed in the S7, and a task completion global monitor is triggered;
s9: judging whether the parent task is owned, if yes, executing S10, and if not, executing S2;
s10: reading configuration information stored in a parent task, and acquiring the number of subtasks related to the parent task;
s11: judging whether the current task is in accordance with the completion condition of the parent task after being completed, if yes, entering S12, and if not, ending the monitoring process
Preferably, the method for determining whether the completion condition of the parent task is met after the current task is completed in S11 includes: and judging whether the signing subtask is completely finished and/or whether the number of partial approval persons reaches a threshold value.
Preferably, in S12, after the parent task is completed, the configuration information and the final state of the process instance are stored, and are used for checking and auditing the process approval process.
The invention also provides an approval method for the workflow system of the specified approver, which comprises the following steps:
s1: acquiring configuration information;
s2: judging whether the subtask exists, if yes, executing S3, and if not, executing S4;
s3: deleting the existing subtask;
s4: and establishing a new subtask according to the configuration to complete the process.
Compared with the prior art, the scheme of the invention mainly comprises the following steps:
1. the service is low coupled with the flow chart, which is beneficial to the multiplexing of the flow chart. In the scheme, when the flow chart faces a complex countersign task, the flow chart can be represented by only one user task, almost no extra configuration is needed under the condition of ensuring that the identification is not conflicted, and meanwhile, the specific meanings of all stages in the flow chart are blurred, so that the flow chart can be adapted to a plurality of business flows, and even if the specific business flows have certain differences (mainly on examination and approval conditions and personnel), the same flow chart can be used.
2. And multiple groups of multi-condition examination and approval are supported. According to the scheme, multiple levels of subtasks are used, so that multiple independent subtask groups with different conditions can exist in the same task stage, and the original unsupported multiple-group multi-condition approval can be realized.
3. According to the scheme, an EL expression is not used, the threshold of entry for drawing the flow chart is reduced, learning and use of a user are facilitated, the number of user tasks under complex conditions is combined, and workload for drawing the flow chart is reduced.
4. The scheme supports the dynamic designation of the approvers and the approval schemes in the subsequent steps in the process execution, allows the executors to designate tasks in batches step by step, executes the method, and allows the approvers to designate a plurality of groups of different approval requirements to approve one task for a plurality of times.
Drawings
FIG. 1 is a schematic flow chart of an approval method for a complex workflow according to the present invention;
FIG. 2 is a schematic flow chart of an approval method for a workflow of a designated approver according to the present invention;
FIG. 3 is a diagram of: a flow chart of the BPMN flow definition;
FIG. 4 is a diagram of: the invention relates to a flow schematic diagram of an approval method for complex workflow.
Detailed Description
The invention is further described below with reference to the accompanying drawings.
Activiti is an open source workflow engine, uses BPMN as the definition of the process, and the form of the defined flow chart is shown in figure 3
The terms used in the present invention define:
1. the flow chart is as follows: the process defined by BPMN is uploaded and stored in an engine in the form of xml, and the function of the process is to define the form of a certain (class) process, and is not a specific process.
2. And (3) user tasks: the graphical representation of "approval" in fig. 3 shows a certain approval stage, which is not identical to the "task" described below.
3. Example of the procedure: for example, according to a flow chart, a workflow is generated that is associated with a specific service and can be executed, where the flow includes one or more tasks being executed.
4. Task: in the workflow instance, a task is called a parent task if the task is depended on by other tasks, is called a child task if the task is depended on by other tasks, is called an N-level parent task if the parent task is also depended on by other tasks, when the task depended on by the task is destroyed or completed, the task is synchronously destroyed, and only the current task is created when the instance runs.
5. An approver: the object of delegation of a task is unique to the approver of the task.
6. Process variables: data present in the instance is not destroyed as the task ends.
Example 1:
referring to fig. 1-2, an approval method for a complex workflow provided by the present invention includes the following steps:
s1: creating a process instance using the configuration information;
s2: creating a task in a process instance;
s3: triggering a task to create a global listener;
s4: reading configuration information of a current task;
s5: judging whether the configuration information of the current task has a plurality of pieces of configuration information, if so, executing S6, and if not, executing S7;
s6: creating a secondary parent task, dispatching configuration, and executing S3;
s7: creating a subtask for each approver in the configuration;
s8: the sub task is completed in the S7, and a task completion global monitor is triggered;
s9: judging whether the parent task is owned, if yes, executing S10, and if not, executing S2;
s10: reading configuration information stored in a parent task, and acquiring the number of subtasks related to the parent task;
s11: and (4) judging whether the current task meets the completion condition of the parent task after being completed, if so, entering S12, and if not, ending the monitoring process.
Preferably, the method for determining whether the completion condition of the parent task is met after the current task is completed in S11 includes: and judging whether all the signing subtasks are completed and/or whether the number of partial approval persons reaches a threshold value.
Preferably, in S12, after the parent task is completed, the configuration information and the final state of the process instance are stored, and are used for checking and auditing the process approval process.
The invention also provides an approval method aiming at the workflow of the specified approver, which comprises the following steps:
s1: acquiring configuration information;
s2: judging whether the subtask exists, if yes, executing S3, and if not, executing S4;
s3: deleting the existing subtask;
s4: and establishing a new subtask according to the configuration to complete the process.
Example 2:
the execution flow of the approval method for the complex workflow in the scheme is as follows:
s1, using the configuration information to create a process instance, and entering S2;
s2, creating the current task in the flow, and entering S3;
s3, the task creates a global listener to take effect, and the process goes to S4;
s4, reading the configuration information of the current task, and entering S5;
s5, judging whether the configuration information has a plurality of pieces of configuration information, if yes, executing S6, and if not, executing S7;
s6: creating a secondary parent task, assigning a configuration, and triggering S3;
s7: creating a subtask for each approver in the configuration, setting a task type, and completing the creation stage;
s8, completing the task, triggering the task to complete the global listener, and entering S9;
s9, judging whether the parent task is owned, if yes, entering S10, and if not, releasing the end flow to trigger the subsequent task creating flow;
s10, transmitting the variables received in the tasks of the user into the process variables of the parent tasks (ensuring that the variables submitted by each sub task can be finally gathered into the process), and entering S11;
s11, judging whether the current task is completed and whether the current task meets the completion conditions of the parent task (whether the meeting child task is completed completely and whether the number of partial approval persons reaches a threshold value) or not, entering S12, and whether the monitoring process is ended or not;
s12, the parent task is completed, and the process goes to S8.
Example 3:
in the present invention, the embodiment 2 is implemented by transferring configuration information when completing a task on the basis of the above task creation and completion scheme. The implementation flow of the approver for specifying the current task in the embodiment is shown in fig. 2:
s1, acquiring configuration information, and entering S2;
s2, whether the subtask exists or not, if yes, the process goes to S3, and if no, the process goes to S4;
s3, deleting the existing subtask, and entering S4;
and S4, establishing a new subtask according to the configuration, and completing the process.
Example 4:
the flow chart is shown in the attached figure 4:
in the embodiment of the invention, a composite approval and a single approval and a review exist, wherein the composite approval comprises a combination of the review and a multi-person approval, namely, after both the requirements are met, subsequent steps can be carried out to generate a new task node.
When the instance is initialized, the instance is created according to the basic configuration information of the process, only the first node information exists in the current instance, the task which is not noted by the approver is temporarily free of the approver, and the task is not created for the proceeding task node.
Basic configuration information of the process:
instance initialization, creating a task list:
task code | Code of father task | Approver | Conditions of completion |
Composite approval | \ | \ | Complete all subtasks |
Composite approval-1 | Composite approval | \ | Complete all subtasks |
Compound approval-1 | Composite approval-1 | A1 | \ |
Composite approval-1-2 | Composite approval-1 | A2 | \ |
Composite approval-2 | Composite approval | \ | Completing two subtasks |
Compound approval-2-1 | Composite approval-2 | B1 | \ |
Compound approval-2 | Composite approval-2 | B2 | \ |
Compound approval-2-3 | Composite approval-2 | B3 | \ |
Current state node configuration information:
a1 completes the examination and approval, and specifies a 'single person examination and approval' task approval person C, and the task list is updated as follows:
task code | Code of father task | Approver | Conditions of completion |
Composite approval | \ | \ | Complete all subtasks |
Composite approval-1 | Composite approval | \ | Complete all subtasks |
Composite approval-1-2 | Composite approval-1 | A2 | \ |
Composite approval-2 | Composite approval | \ | Completing two subtasks |
Compound approval-2-1 | Composite approval-2 | B1 | \ |
Compound approval-2 | Composite approval-2 | B2 | \ |
Compound approval-2-3 | Composite approval-2 | B3 | \ |
The node configuration information of the current state and the next node update the configuration information, the task creation is not carried out when the current node is not completed, and the task creation is carried out according to the current configuration information after the node task passes:
a2 completes examination and approval, and updates the task list:
task code | Code of father task | Approver | Conditions of completion |
Composite approval | \ | \ | Complete all subtasks |
Composite approval-2 | Composite approval | \ | Completing two subtasks |
Compound approval-2-1 | Composite approval-2 | B1 | \ |
Compound approval-2 | Composite approval-2 | B2 | \ |
Composite approval-2-3 | Composite approval-2 | B3 | \ |
Current state node configuration information:
b1, completing examination and approval, and designating the approval persons of the task of 'review and approval' as D1 and D2, and updating the task list:
task code | Code of father task | Approver | Conditions of completion |
Composite approval | \ | \ | Complete all subtasks |
Composite approval-2 | Composite approval | \ | Completing two subtasks |
Compound approval-2 | Composite approval-2 | B2 | \ |
Compound approval-2-3 | Composite approval-2 | B3 | \ |
Current state node configuration information:
b2 finish approval, task list:
task code | Code of father task | Approver | Conditions of completion |
Single person approval | \ | \ | Complete all subtasks |
Single approval-1 | Single person approval | C | \ |
Current state node configuration information:
the current task approver is changed to be E1 and E2, the type is as follows:
task code | Code of father task | Approver | Conditions of completion |
Single person approval | \ | \ | Through one |
Single approval-1 | Single person approval | E1 | \ |
Single approval-2 | Single person approval | E2 | \ |
Current state node configuration information:
and finishing the task and finishing the process.
And closing the example task information, storing the example configuration information and the final state, and checking and auditing the process approval process.
The above embodiments are merely illustrative of the technical ideas and features of the present invention, and the purpose of the embodiments is to enable those skilled in the art to understand the contents of the present invention and implement the present invention, and not to limit the protection scope of the present invention. It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof, and it is therefore intended that the present embodiments be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein.
Claims (4)
1. An approval method for a complex workflow is characterized by comprising the following steps:
s1: creating a process instance using the configuration information;
s2: creating a task in a process instance;
s3: triggering a task to create a global listener;
s4: reading configuration information of a current task;
s5: judging whether the configuration information of the current task has a plurality of pieces of configuration information, if so, executing S6, and if not, executing S7;
s6: creating a secondary parent task, dispatching configuration, and executing S3;
s7: creating a subtask for each approver in the configuration;
s8: the sub task is completed in the S7, and a task completion global monitor is triggered;
s9: judging whether the parent task is owned, if yes, executing S10, and if not, executing S2;
s10: reading configuration information stored in a parent task, and acquiring the number of subtasks related to the parent task;
s11: judging whether the current task is in accordance with the completion condition of the parent task after being completed, if yes, entering S12, and if not, ending the monitoring process
S12: and finishing the parent task.
2. The approval method for the complex workflow according to claim 1, wherein: the method for judging whether the completion condition of the parent task is met after the current task is completed in S11 includes: and judging whether the signing subtask is completely finished and/or whether the number of partial approval persons reaches a threshold value.
3. The approval method for the complex workflow according to claim 1, wherein: in S12, after the parent task is completed, the configuration information and the final state of the process instance are stored for checking and auditing the process approval process.
4. An approval method for a workflow of a specified approver, comprising the steps of:
s1: acquiring configuration information;
s2: judging whether the subtask exists, if yes, executing S3, and if not, executing S4;
s3: deleting the existing subtask;
s4: and establishing a new subtask according to the configuration to complete the process.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210116951.XA CN114548916A (en) | 2022-02-07 | 2022-02-07 | Approval method for complex workflow and specified approver |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210116951.XA CN114548916A (en) | 2022-02-07 | 2022-02-07 | Approval method for complex workflow and specified approver |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114548916A true CN114548916A (en) | 2022-05-27 |
Family
ID=81672777
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210116951.XA Pending CN114548916A (en) | 2022-02-07 | 2022-02-07 | Approval method for complex workflow and specified approver |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114548916A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116957487A (en) * | 2023-06-27 | 2023-10-27 | 三峡高科信息技术有限责任公司 | Configuration type dynamic sub-flow countersign method and system |
CN116957487B (en) * | 2023-06-27 | 2024-05-14 | 三峡高科信息技术有限责任公司 | Configuration type dynamic sub-flow countersign method and system |
-
2022
- 2022-02-07 CN CN202210116951.XA patent/CN114548916A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116957487A (en) * | 2023-06-27 | 2023-10-27 | 三峡高科信息技术有限责任公司 | Configuration type dynamic sub-flow countersign method and system |
CN116957487B (en) * | 2023-06-27 | 2024-05-14 | 三峡高科信息技术有限责任公司 | Configuration type dynamic sub-flow countersign method and system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20110145037A1 (en) | Document management method and apparatus to process a workflow task by parallel or serially processing subtasks thereof | |
US8521570B2 (en) | Integration of distributed business process models | |
US7848942B2 (en) | Distribution of integrated business process models | |
CN105404952A (en) | Approval workflow dynamic configuration method and system based on SAP platform | |
CN101082970A (en) | Method for realizing government affairs examination and approval workflow engines system | |
CN109684057A (en) | Task processing method, device and storage medium | |
CN110688403A (en) | Activiti process manual node transactor screening engine | |
US20040083238A1 (en) | Method, system, and storage medium for integrating project management tools | |
CN105740465A (en) | Flexible custom comparison method | |
JPH03116237A (en) | Knowledge processing method | |
CN112561253A (en) | Order assignment method, system, platform and storage medium based on production plan | |
CN105321045A (en) | Service process formal model construction method and system | |
CN109740160A (en) | A kind of task dissemination method based on artificial intelligence semantic analysis | |
CN114548916A (en) | Approval method for complex workflow and specified approver | |
Bikakis et al. | Social event scheduling | |
US20140278693A1 (en) | System and Method for Cross-Plant Bill of Materials | |
CN112288341A (en) | Credit factory order scheduling method and device based on multi-agent reinforcement learning | |
CN109977128B (en) | Power grid planning data fusion method based on temporal dimension | |
CN102053825A (en) | Method and system for processing software design conflicts | |
CN110298630A (en) | A kind of workflow engine | |
CN116050638A (en) | Automatic manufacturing system initial resource optimal configuration method based on tag time Petri net | |
CN115063101A (en) | Method, system and device for generating structure data based on case base and storage medium | |
CN115660245A (en) | Service arrangement method and device, electronic equipment and storage medium | |
JP2022026872A (en) | Information processing method, information processing program, and information processing device | |
CN105989434A (en) | Transaction information management method and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |