Task processing method, task processing device, electronic equipment, storage medium and program product
By obtaining task entities and process instances, and analyzing custom configurations to obtain target candidate lists, the problem of process flow errors in existing process engines when processing complex tasks is solved, achieving rapid and accurate task processing and user experience improvement.
Patent Information
- Application Number
- CN202411486431.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-23
- Publication Date
- 2025-02-07
AI Technical Summary
When existing process engines handle other types of tasks other than general tasks, they cannot meet the requirements of rapid approval, especially when the application scenarios are complex, process flow is prone to errors, and there is a risk of irreparable losses to the enterprise.
By obtaining task entities and process instances and obtaining custom configurations based on these instances, parsing custom configurations to obtain target candidate lists, quickly switching candidate lists of different types of tasks, thereby improving the efficiency and accuracy of task processing.
It realizes the rapid switching of candidate lists for different types of tasks, improves the efficiency and accuracy of task processing, improves user experience, and reduces the risk of process errors and losses.
Smart Images

Figure CN119398698A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of process processing technology, and in particular to a task processing method, a task processing device, an electronic device, a storage medium and a program product. Background Art
[0002] A process is a combination of a series of value-creating activities of an enterprise, including input resources, several activities, interactions, and output results. A process engine is a software system used to automate business processes and improve the efficiency and flexibility of an enterprise by defining, executing, and managing business processes.
[0003] In the related art, commonly used process engines usually specify task or activity handlers to handle general tasks when defining the process. The general tasks refer to tasks that flow according to defined approval nodes and handlers in a general business approval process.
[0004] However, in reality, tasks are diverse. Specialized tasks are tasks that are assigned to one or more experienced specialists for review and processing in addition to the node completion personnel configured for general tasks according to business needs. When it is necessary to handle other types of tasks besides general tasks, such as specialized tasks, the current process engine cannot meet the requirements of rapid approval, especially when the application scenario is more complex, the process flow is prone to errors, and there is a risk of causing irreparable losses to the enterprise. Summary of the invention
[0005] The embodiments of the present application provide a task processing method, a task processing device, an electronic device, a storage medium and a program product, which are used to quickly switch between different types of candidate lists of a first task and candidate lists of a second task, improve the efficiency and accuracy of task processing, and improve the user experience.
[0006] In a first aspect, an embodiment of the present application provides a task processing method, comprising: obtaining a task entity of an artificial node, wherein the artificial node is used to process business that requires manual review; obtaining a process instance of the task entity through a historical process interface; obtaining a custom configuration based on the task entity and the process instance, wherein the custom configuration includes a custom attribute, and the custom attribute is used to configure a first candidate list for a first task or a second candidate list for a second task; parsing the custom configuration to obtain a parsing object that represents the task processing logic; obtaining a target candidate list based on the parsing object, wherein if the custom attribute of the parsing object is a first attribute for starting the first task, the target candidate list is updated to the first candidate list according to the business key of the process engine; if the custom attribute of the parsing object is a second attribute for starting the second task, the target candidate list is configured as the second candidate list.
[0007] In a possible implementation, obtaining the custom configuration based on the task entity and the process instance includes: obtaining a BPMN model based on a resource management service of a process engine and a definition identifier of the process instance; obtaining process elements from the BPMN model according to a task definition key; and obtaining the custom configuration from the process elements.
[0008] In a possible implementation, the custom configuration is in the form of a Json string, and parsing the custom configuration to obtain a parsed object representing the task processing logic includes: converting the custom configuration in the form of a Json string to obtain a parsed object representing the task processing logic, wherein the parsed object is a Java object.
[0009] In a possible implementation, obtaining a target candidate list based on the parsed object includes: acquiring a custom attribute value of a Boolean type based on the parsed object; and obtaining a target candidate list according to the custom attribute value.
[0010] In a possible implementation, if the custom attribute of the parsed object is the first attribute for starting the first task, the target candidate list is updated to the first candidate list according to the business key of the process engine, including: if the custom attribute of the parsed object is the first attribute for starting the first task, obtaining the execution instance of the task entity through the execution instance interface; obtaining the business key of the task entity according to the execution instance; and updating the target candidate list to the first candidate list according to the business key.
[0011] In a possible implementation, updating the target candidate list to a first candidate list according to the business key includes: obtaining a first candidate identification list from a system configuration of a process engine, the first candidate identification list including at least one first candidate identification, the first candidate identification being used to identify a first candidate; if the first candidate identification list is not empty, dividing the first candidate identification list into a plurality of arrays, and converting the plurality of arrays into a first candidate list.
[0012] In a possible implementation, before obtaining the custom configuration based on the task entity and the process instance, the task processing method also includes: determining whether the custom configuration includes custom attributes; if the custom configuration includes the custom attributes, obtaining the custom configuration; if the custom configuration does not include the custom attributes, directly configuring the target candidate list as the second candidate list.
[0013] In a possible implementation manner, the first task is a special task, the second task is a general task, and both the first task and the second task are used for securities approval business.
[0014] In a second aspect, an embodiment of the present application provides a task processing device, comprising: a task entity acquisition module, used to acquire a task entity of an artificial node, wherein the artificial node is used to process business that requires manual review; a process instance acquisition module, used to acquire a process instance of the task entity through a historical process interface; a configuration acquisition module, used to acquire a custom configuration based on the task entity and the process instance, wherein the custom configuration includes a custom attribute, and the custom attribute is used to configure a first candidate list for a first task or a second candidate list for a second task; a parsing module, used to parse the custom configuration to obtain a parsing object representing the task processing logic; a candidate module, used to obtain a target candidate list based on the parsing object, wherein if the custom attribute of the parsing object is a first attribute for starting the first task, the target candidate list is updated to the first candidate list according to the business key of the process engine; if the custom attribute of the parsing object is a second attribute for starting the second task, the target candidate list is configured as the second candidate list.
[0015] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a memory, a processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, so that the processor executes various possible implementations of the first aspect above.
[0016] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement various possible implementation methods of the first aspect above.
[0017] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements various possible implementation methods of the first aspect above.
[0018] The task processing method, task processing device, electronic device, storage medium and program product provided in the embodiments of the present application obtain a task entity and a process instance of the task entity, and obtain a custom configuration including custom attributes based on the task entity and the process instance of the task entity, and then parse the custom configuration to obtain a parsing object representing the task processing logic, and obtain a target candidate list based on the parsing object to achieve the effect of ae3c139784cc2970a998cad743cacd86. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] 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.
[0020] Figure 1 Schematic diagram of the task processing method provided for this application Figure 1 ;
[0021] Figure 2 Schematic diagram of the task processing method provided for this application Figure 2 ;
[0022] Figure 3 Schematic diagram of the task processing method provided for this application Figure 3 ;
[0023] Figure 4 Schematic diagram of the task processing method provided for this application Figure 4 ;
[0024] Figure 5 Schematic diagram of the task processing method provided for this application Figure 5 ;
[0025] Figure 6 Schematic diagram of the task processing method provided for this application Figure 5 ;
[0026] Figure 7 A schematic diagram of the structure of the task processing device provided in this application;
[0027] Figure 8 A schematic diagram of the structure of the electronic device provided in this application.
[0028] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0029] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0030] In the related art, general tasks refer to tasks that are transferred according to defined approval nodes and processing personnel in the general business approval process. In addition to general tasks, other types of tasks are also processed in actual application scenarios. Among them, the more typical one is the special task. Special tasks are tasks that are assigned to one or more experienced specialists for review and processing in addition to the node completion personnel configured for general tasks according to business needs.
[0031] Since the commonly used process engines in related technologies have already designated task or activity handlers to handle general tasks when defining the process. When it is necessary to handle special tasks, the current process engine modifies the actual task handler through manual operations such as manual search, inquiry, review and confirmation. Moreover, due to the complexity of the process, the modified actual task handler is not necessarily the one that meets the actual business needs. Such processing logic cannot meet the requirements of rapid approval, especially when the application scenario is more complex, the process flow is prone to errors, and there is a risk of causing irreparable losses to the enterprise.
[0032] In view of this, the present application provides a task processing method, including: obtaining a task entity of an artificial node, wherein the artificial node is used to process business that requires manual review; obtaining a process instance of the task entity through a historical process interface; obtaining a custom configuration based on the task entity and the process instance, wherein the custom configuration includes a custom attribute, and the custom attribute is used to configure a first candidate list for a first task or a second candidate list for a second task; parsing the custom configuration to obtain a parsing object that represents the task processing logic; obtaining a target candidate list based on the parsing object, wherein if the custom attribute of the parsing object is a first attribute for starting the first task, the target candidate list is updated to the first candidate list according to the business key of the process engine; if the custom attribute of the parsing object is a second attribute for starting the second task, the target candidate list is configured as the second candidate list.
[0033] By obtaining the task entity and the process instance of the task entity, and obtaining the custom configuration including the custom attributes based on the task entity and the process instance of the task entity, and then parsing the custom configuration to obtain the parsed object representing the task processing logic, and obtaining the target candidate list based on the parsed object, the embodiment of the present application can quickly switch between different types of candidate lists of the first task and the candidate lists of the second task, thereby improving the efficiency and accuracy of task processing and improving the user experience.
[0034] In the specific application scenario of the present application, the execution subject may be an electronic device. The electronic device may display a front-end page, which may be a page of a client for securities process processing installed on the electronic device, or a Hypertext Markup Language (HTML) page such as a browser. The electronic device may receive process processing operations such as clicks input by the user, and perform process processing in response to the process processing operations.
[0035] Electronic devices can be used to handle the approval process in the securities field. For example, in the securities field, when a stock issuing company applies for a public stock issuance, it needs to submit a stock issuance application to the relevant competent authorities, and it also needs to pass the regulatory authorities' review of the issuance conditions and quality. Within the securities company, it is also necessary to pre-review relevant stock issuance information when handling securities business. Since the securities approval process is relatively complex and has a low fault tolerance rate, it places higher requirements on the efficiency and accuracy of the task processing method.
[0036] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0037] Figure 1 Schematic diagram of the task processing method provided for this application Figure 1 ,like Figure 1 As shown, the method includes:
[0038] S101, obtaining a task entity of an artificial node, where the artificial node is used to process a business that requires manual review;
[0039] In a possible implementation, the artificial node may be an artificial node of a process engine. As an underlying support platform, the process engine is a software tool designed to provide process processing development. The process engine includes a modeling module, an execution module, and a monitoring module. The modeling module can respond to the user's creation operation and create a business process model that meets the user's needs, such as flow charts, activities, conditions and other elements, and define the execution order, conditions and rules of the process; the execution module can execute the business process according to the created business process model; the monitoring module can provide implementation process monitoring and reporting, so that users can understand the progress, execution status, abnormal situations, etc. of the process.
[0040] The process engine can be an open source business process engine provided by Flowable. The Flowable process engine is a dynamic process engine based on the Business Process Modeling Notation (BPMN) standard, which can be written in Java and run in a Java application. In some embodiments, the Flowable process engine can also run independently.
[0041] The process engine may also be a mainstream process engine such as Activiti, Camunda, etc., which all support the BPMN standard. In this application, the Flowable process engine using the Java language is used as an example for explanation.
[0042] BPMN has developed a set of standard business process modeling symbols for defining flow charts. Common symbols of BPMN include start nodes, task nodes, gateway components, end nodes, etc. Among them, task nodes can include multiple tasks, such as sending tasks, receiving tasks, business rule tasks, script tasks, user tasks, etc. Gateway components can be used for conditional judgment.
[0043] Before processing a task, you can fill in a custom form based on the process engine. The custom form provides input components, selection components, and layout components, such as "date", "upload" and other options. After filling in the custom form, you can use BPMN symbols to draw a process model in the form of a flowchart. After importing the process model, generate a process definition based on the process model. After the process definition is generated, the process design is completed, and the applicant can initiate an approval. When the approval is initiated, a process instance will be generated based on the process engine.
[0044] In a possible implementation, the task entity TaskEntity can be obtained from the data transmission object UserTaskContextDto. When obtaining the task entity, the context state of the process execution can also be obtained in the listener. Before obtaining the task entity, the service Service can be declared as needed. Among them, the service can be a resource management service RepositoryService, which is responsible for deploying process definitions and managing process resources, or it can be a history management service HistoryService, which can query historical information. When executing a process, the process engine will save a lot of data, such as the start time of the process instance, the participants of the task, the time to complete the task, the execution path of each process instance, etc. The history management service mainly obtains this data through the query function. The task entity can be used to process tasks such as submission and saving, which can be determined according to specific task requirements.
[0045] In this application, there can be multiple business types. The business types can be divided according to the types of related tasks such as matters, finance, status, etc., or according to the products corresponding to the business, or according to product parts such as development, sales, procurement, etc. It can be understood that there can be multiple business types, and this application does not limit the specific division of business types.
[0046] S102, obtaining a process instance of the task entity through a historical process interface;
[0047] In a possible implementation, the historical process interface may be a HistoricProcessInstance in a process engine. Specifically, a HistoricProcessInstanceQuery may be used to query a historical process instance.
[0048] S103, acquiring a custom configuration based on the task entity and the process instance, wherein the custom configuration includes a custom attribute, and the custom attribute is used to configure a first candidate list for the first task or a second candidate list for the second task;
[0049] In a possible implementation, the custom properties of the custom configuration can be obtained based on the task entity and the process instance. Specifically, the custom configuration can be obtained using the getCustomConfig method. The input of the getCustomConfig method can be the task entity TaskEntity and the process instance, and the output of the getCustomConfig method is the custom configuration.
[0050] In a possible implementation, the custom configuration is located in the artificial node attributes of the process definition. The process definition is generated based on BPMN, and there may be multiple artificial nodes in the process definition. In actual applications, custom attributes may be configured in some artificial nodes, while other artificial nodes may not be configured with custom attributes.
[0051] Figure 2 Schematic diagram of the task processing method provided for this application Figure 2 ,like Figure 2 As shown, the obtaining of custom configuration based on the task entity and the process instance includes:
[0052] S201, obtaining a BPMN model based on the resource management service of the process engine and the definition identifier of the process instance;
[0053] In a possible implementation, the getBpmnModel method in the resource management service RepositoryService may be called to obtain the BPMN model in combination with the definition identification (ID) of the process instance.
[0054] S202, obtaining a process element from the BPMN model according to a task definition key;
[0055] In a possible implementation, the flow element FlowElement is obtained from the BPMN model through the task definition key getTaskDefinitionKey.
[0056] S203: Obtain custom configuration from the process element.
[0057] In a possible implementation, the getOperationsProperty method is used to obtain the custom attribute special_business from the process element. The custom attribute special_business can be a first attribute or a second attribute. The first attribute has a first attribute value, and the second attribute has a second attribute value. The first attribute value and the second attribute value can be binary values "1" or "0", or can be textual values "true" or "false". The following is an example in which the first attribute value is a binary value "1" and the second attribute value is a binary value "0".
[0058] For example, when the custom attribute has a first attribute value, i.e., "1", it indicates that the special mode of the target artificial node is in the on state, and the target candidate list can be updated to the first candidate list at this time; when the custom attribute has a second attribute value, i.e., "0", it indicates that the special mode of the target artificial node is in the off state, and the target candidate list can be configured as the second candidate list at this time.
[0059] S104, parsing the custom configuration to obtain a parsed object representing the task processing logic;
[0060] Furthermore, the custom configuration is in the form of a Json string, and the custom configuration is parsed to obtain a parsed object representing the task processing logic, including:
[0061] S301. Convert the custom configuration in the form of a Json string to obtain a parsing object representing the task processing logic, where the parsing object is a Java object.
[0062] In a possible implementation, the custom configuration is in the form of a Json string. Specifically, the custom configuration in the form of a Json string is converted into a Java object using the JSON.parseObject method, and the Json string may appear in the form of a key-value pair.
[0063] S105. Obtain a target candidate list based on the parsed object, wherein if the custom attribute of the parsed object is a first attribute for starting a first task, update the target candidate list to a first candidate list according to a business key of a process engine; if the custom attribute of the parsed object is a second attribute for starting a second task, configure the target candidate list to a second candidate list.
[0064] In a possible implementation, if the custom attribute of the parsed object is the first attribute for starting the first task, it indicates that the first task is a special task. At this time, the target candidate list needs to be updated to the first candidate list according to the business key of the process engine; if the custom attribute of the parsed object is the second attribute for starting the second task, it indicates that the second task is a general task. At this time, the target candidate list can be configured as the second candidate list. The second candidate list can be the original candidate list for processing general tasks. Therefore, if the custom attribute of the parsed object is the second attribute for starting the second task, the original candidate list for processing general tasks can be kept unchanged and no update operation is performed.
[0065] Figure 3 Schematic diagram of the task processing method provided for this application Figure 3 ,like Figure 3 As shown, obtaining a target candidate list based on the parsed object includes:
[0066] S401, obtaining a custom attribute value of a Boolean type based on the parsed object;
[0067] In a possible implementation, after converting the custom configuration in the form of a Json string to obtain a parsed object representing the task processing logic, the getBoolean method in jsonObject can be used to obtain the custom attribute value of the Boolean type.
[0068] S402: Obtain a target candidate list according to the custom attribute value.
[0069] Figure 4 Schematic diagram of the task processing method provided for this application Figure 4 ,like Figure 4As shown, if the custom attribute of the parsed object is the first attribute for starting the first task, updating the target candidate list to the first candidate list according to the business key of the process engine includes:
[0070] S501: If the custom attribute of the parsed object is a first attribute for starting a first task, obtaining an execution instance of the task entity through an execution instance interface;
[0071] In a possible implementation, before obtaining the process instance of the task entity through the historical process interface, the execution instance can also be obtained through the execution interface. The execution interface can be a DelegateExecution interface, and the execution instance can be obtained by using the getExecution method of the execution interface.
[0072] S502, obtaining the business key of the task entity according to the execution instance;
[0073] In a possible implementation, a getProcessInstanceBusinessKey method may be used to obtain a business key corresponding to a task according to an execution instance. The business key is also called a business primary key.
[0074] S503: Update the target candidate list to a first candidate list according to the service key.
[0075] In a possible implementation, a getUserList method may be used to obtain the first candidate list, the input of the getUserList method is the service key, and then the target candidate list is updated to the first candidate list.
[0076] Figure 5 Schematic diagram of the task processing method provided for this application Figure 5 ,like Figure 5 As shown, updating the target candidate list to a first candidate list according to the business key includes:
[0077] S601: Obtain a first candidate identifier list from a system configuration of a process engine according to the business key, wherein the first candidate identifier list includes at least one first candidate identifier, and the first candidate identifier is used to identify a first candidate;
[0078] In a possible implementation, the getSystemValue method may be used to obtain the first candidate identifier list from the business key from the system configuration of the process engine. When the first candidate identifier list includes multiple first candidate identifiers, the multiple first candidate identifiers are separated by commas.
[0079] S602: If the first candidate identification list is not empty, divide the first candidate identification list into multiple arrays, and convert the multiple arrays into a first candidate list.
[0080] In a possible implementation, if the first candidate identification list is not empty, the first candidate identification list may be split into multiple arrays using a split method according to a preset rule, and each array corresponds to at least one first candidate.
[0081] Figure 6 Schematic diagram of the task processing method provided for this application Figure 5 ,like Figure 6 As shown, before obtaining the custom configuration based on the task entity and the process instance, the task processing method further includes:
[0082] S701, determining whether the custom configuration includes custom attributes;
[0083] In a possible implementation, before obtaining the custom configuration based on the task entity and the process instance, it can be determined whether the custom configuration includes custom attributes. In this way, a global custom configuration switch is set on the front-end webpage.
[0084] S702: If the custom configuration includes the custom attribute, obtain the custom configuration; if the custom configuration does not include the custom attribute, directly configure the target candidate list as a second candidate list.
[0085] In a possible implementation, if the custom configuration includes the custom attribute, it indicates that from a global perspective, there is a first task that needs to be processed, and the custom configuration can be obtained at this time; if the custom configuration does not include the custom attribute, it indicates that from a global perspective, there is no first task that needs to be processed, and the target candidate list can be directly configured as the second candidate list.
[0086] In a possible implementation, the first task is a special task, the second task is a general task, and both the first task and the second task are used for securities approval business. In practical applications, the task processing method based on the embodiment of the present application can also process other more types of tasks. When it is necessary to process other more types of tasks, the other more types of tasks can be processed in the same way as the first task, that is, custom attributes of other more types of tasks are added in the custom configuration. It can be understood that the present application does not limit the type of tasks.
[0087] Since the current native process engine does not have a special attribute configuration for this type of business, by inheriting the UserTaskJsonConverter class and adding a custom attribute special_business, it is possible to easily switch between the first candidate list and the second candidate list. The implementation effect is similar to turning a switch on and off on the page. The process engine can automatically configure and read the custom configuration, thereby improving the efficiency and accuracy of task processing and improving the user experience of the approval process.
[0088] When the process engine assigns tasks to certain handlers, this application changes the behavior of the node by extending the behavior class of the artificial node. In actual application, first check whether this custom configuration is enabled. Add custom attributes to the custom configuration so that the backend has the ability to store and read this attribute. When using it, users can control whether to enable the custom configuration by clicking a button or a switch on the front-end web page.
[0089] Therefore, this application uses the newly added special review configuration to enable business users to open or close the special approval mode of a certain node in the process online through the front-end page, so as to respond to business changes without the need to redevelop and test the online version, and it will take effect immediately, improve efficiency, and optimize user experience. The special review configuration function can be effective for all processes, and both newly created processes and already running processes can use this configuration to implement the special task review mode. Moreover, in addition to the node processors defined in the process plan, special personnel are dynamically designated to handle special business for special business, which improves the effectiveness and professionalism of business handling and reduces business errors.
[0090] Figure 7 A schematic diagram of the structure of the task processing device provided in this application, such as Figure 7 As shown, the task processing device 80 provided in this embodiment includes:
[0091] A task entity acquisition module 801 is used to acquire a task entity of an artificial node, where the artificial node is used to process a business that requires manual review;
[0092] A process instance acquisition module 802 is used to acquire the process instance of the task entity through a historical process interface;
[0093] A configuration acquisition module 803, configured to acquire a custom configuration based on the task entity and the process instance, wherein the custom configuration includes a custom attribute, and the custom attribute is used to configure a first candidate list for the first task or a second candidate list for the second task;
[0094] A parsing module 804 is used to parse the custom configuration to obtain a parsing object representing the task processing logic;
[0095] The candidate module 805 is used to obtain a target candidate list based on the parsed object, wherein if the custom attribute of the parsed object is a first attribute for starting a first task, the target candidate list is updated to a first candidate list according to the business key of the process engine; if the custom attribute of the parsed object is a second attribute for starting a second task, the target candidate list is configured as a second candidate list.
[0096] In a possible implementation, the configuration acquisition module includes: a model acquisition module, used to acquire a BPMN model based on the resource management service of the process engine and the definition identifier of the process instance; an element acquisition module, used to acquire process elements from the BPMN model according to a task definition key; and a custom acquisition module, used to acquire custom configurations from the process elements.
[0097] In a possible implementation, the custom configuration is in the form of a Json string, and the parsing module includes: a conversion module, which is used to convert the custom configuration in the form of a Json string to obtain a parsing object representing the task processing logic, and the parsing object is a Java object.
[0098] In a possible implementation, the candidate module includes: a value acquisition module, used to acquire a custom attribute value of a Boolean type based on the parsed object; and a candidate submodule, used to obtain a target candidate list according to the custom attribute value.
[0099] In a possible implementation, the candidate module also includes: an execution acquisition module, which is used to obtain the execution instance of the task entity through an execution instance interface if the custom attribute of the parsed object is the first attribute for starting the first task; a key acquisition module, which is used to obtain the business key of the task entity according to the execution instance; and an update module, which is used to update the target candidate list to the first candidate list according to the business key.
[0100] In a possible implementation, the update module includes: an identification acquisition module, used to obtain a first candidate identification list from the system configuration of the process engine, the first candidate identification list includes at least one first candidate identification, and the first candidate identification is used to identify the first candidate; a segmentation module, used to segment the first candidate identification list into multiple arrays if the first candidate identification list is not empty, and convert the multiple arrays into the first candidate list.
[0101] In a possible implementation, before obtaining the custom configuration based on the task entity and the process instance, the task processing device also includes: a judgment module, used to determine whether the custom configuration includes custom attributes; a first configuration module, used to obtain the custom configuration if the custom configuration includes the custom attributes; and a second configuration module, used to directly configure the target candidate list as a second candidate list if the custom configuration does not include the custom attributes.
[0102] In a possible implementation manner, the first task is a special task, the second task is a general task, and both the first task and the second task are used for securities approval business.
[0103] The task processing device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and this embodiment will not be described in detail here.
[0104] Figure 8 This is a schematic diagram of the structure of the electronic device provided in this application. Figure 8 As shown, the electronic device 90 provided in this embodiment includes: at least one processor 901 and a memory 902. Optionally, the device 90 further includes a communication component 903. The processor 901, the memory 902 and the communication component 903 are connected via a bus 904.
[0105] In a specific implementation process, at least one processor 901 executes the computer execution instructions stored in the memory 902, so that at least one processor 901 executes the above method.
[0106] The specific implementation process of the processor 901 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.
[0107] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.
[0108] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (Non-volatile Memory, NVM), such as at least one disk memory.
[0109] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.
[0110] The present application also provides a computer program product, including a computer program, which implements the above method when executed by a processor.
[0111] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above method is implemented.
[0112] The above-mentioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.
[0113] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as: ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.
[0114] The division of units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.
[0115] The units described as segmented components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0116] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0117] If the function 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, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0118] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0119] Finally, it should be noted that those skilled in the art will readily conceive of other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention, which follow the general principles of the present invention and include common knowledge or customary technical means in the art not disclosed by the present invention, are not limited to the precise structure described above and shown in the drawings, and may be modified and changed in various ways without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
Claims
1. A task processing method, characterized in that: include: Obtaining a task entity of an artificial node, wherein the artificial node is used to process a business that requires manual review; Obtaining a process instance of the task entity through a historical process interface; Acquire a custom configuration based on the task entity and the process instance, wherein the custom configuration includes a custom attribute, and the custom attribute is used to configure a first candidate list for the first task or a second candidate list for the second task; Parsing the custom configuration to obtain a parsed object representing the task processing logic; A target candidate list is obtained based on the parsed object, wherein if the custom attribute of the parsed object is a first attribute for starting a first task, the target candidate list is updated to a first candidate list according to a business key of a process engine; if the custom attribute of the parsed object is a second attribute for starting a second task, the target candidate list is configured as a second candidate list.
2. The method according to claim 1, characterized in that The obtaining of the custom configuration based on the task entity and the process instance includes: Obtaining a BPMN model based on a resource management service of a process engine and a definition identifier of the process instance; Obtaining a process element from the BPMN model according to a task definition key; Gets custom configuration from said flow element.
3. The method according to claim 1, characterized in that The custom configuration is in the form of a Json string. The custom configuration is parsed to obtain a parsed object representing the task processing logic, including: The custom configuration in the form of a Json string is converted to obtain a parsing object representing the task processing logic, where the parsing object is a Java object.
4. The method according to claim 1, characterized in that: The obtaining a target candidate list based on the parsed object includes: Obtain a custom attribute value of Boolean type based on the parsed object; A target candidate list is obtained according to the custom attribute value.
5. The method according to claim 1, characterized in that If the custom attribute of the parsed object is a first attribute for starting a first task, updating the target candidate list to a first candidate list according to the business key of the process engine includes: If the custom attribute of the parsed object is a first attribute for starting a first task, obtaining an execution instance of the task entity through an execution instance interface; Acquire the business key of the task entity according to the execution instance; The target candidate list is updated to a first candidate list according to the business key.
6. The method according to claim 5, characterized in that The updating of the target candidate list to a first candidate list according to the business key includes: Acquire a first candidate identifier list from a system configuration of a process engine according to the business key, wherein the first candidate identifier list includes at least one first candidate identifier, and the first candidate identifier is used to identify a first candidate; If the first candidate identification list is not empty, the first candidate identification list is divided into a plurality of arrays, and the plurality of arrays are converted into a first candidate list.
7. The method according to claim 1, characterized in that Before obtaining the custom configuration based on the task entity and the process instance, the task processing method further includes: Determining whether the custom configuration includes custom attributes; If the custom configuration includes the custom attribute, the custom configuration is acquired; if the custom configuration does not include the custom attribute, the target candidate list is directly configured as the second candidate list.
8. The method according to claim 1, characterized in that The first task is a special task, and the second task is a general task. Both the first task and the second task are used for securities approval business.
9. A task processing device, characterized in that: include: A task entity acquisition module, used to acquire the task entity of an artificial node, wherein the artificial node is used to process the business that requires manual review; A process instance acquisition module, used to acquire the process instance of the task entity through a historical process interface; A configuration acquisition module, used to acquire a custom configuration based on the task entity and the process instance, wherein the custom configuration includes a custom attribute, and the custom attribute is used to configure a first candidate list for the first task or a second candidate list for the second task; A parsing module, used to parse the custom configuration to obtain a parsing object representing the task processing logic; A candidate module is used to obtain a target candidate list based on the parsed object, wherein if the custom attribute of the parsed object is a first attribute for starting a first task, the target candidate list is updated to the first candidate list according to the business key of the process engine; if the custom attribute of the parsed object is a second attribute for starting a second task, the target candidate list is configured as a second candidate list.
10. An electronic device, characterized in that: include: Memory, processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the method according to any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 8 when executed by a processor.
12. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 8 when being executed by a processor.
Citation Information
Cited By
Intelligent process task allocation method and system based on combination of Activiti and machine learning
CN120806449A