Event process arrangement method, device and application
By splitting and reorganizing process files into process components stored in linked lists and dynamically obtaining the results of the previous process node, the problems of large data volume and non-scalable flow paths in the existing technology are solved, and efficient and flexible event process orchestration is achieved.
Patent Information
- Application Number
- CN202111676873.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-31
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2041-12-31
AI Technical Summary
The existing event process orchestration methods have problems such as large amounts of data flowing, defined flow paths, and the inability to dynamically expand flow process nodes, which leads to high data storage pressure and difficulty in adapting to different business needs.
The original process file is split into process nodes, process connection lines and business information to form process components stored in a linked list. Instance objects are generated through process templates, and the business results of the previous process node are dynamically obtained and transferred, supporting dynamic expansion and reorganization of process nodes.
It achieves high concurrency and dynamic flow, reduces the amount of flow data, improves computing efficiency and scalability, and adapts to different business needs.
Smart Images

Figure CN114238703B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer application technology, and in particular to an event process scheduling method, device and application. Background Art
[0002] Urban management incidents are non-stationary issues in cities that are closely related to human activities. They can be broadly divided into two categories: those with legal force and those without, but which nonetheless impact people's normal lives. For example, street occupation and the posting of flyers are incidents that don't require legal action. Unauthorized placement of billboards or other floating objects on streetlights requires the involvement of law enforcement agencies. Both types of incidents require process-based approval by different personnel from different departments, creating a sequential dependency relationship where the next step cannot proceed until the previous one is completed. Furthermore, the volume of urban management incident data is vast, and statistical analysis from different perspectives yields different results. For a prefecture-level city, the data volume can reach tens of thousands per month, and cumulatively, the data volume can even grow exponentially. Open-source workflow engines all use MySQL databases, storing such a large volume of process data. Depending on the number of process nodes, the volume of process data can be several or even dozens of times that of the business data, placing a significant burden on both performance and disk capacity.
[0003] Currently, most government information systems use open-source process engines like Activiti or Flowable, which can hinder long-term development, such as exposure to hacker attacks. Furthermore, traditional process engines are highly abstract, utility-grade technologies that don't perfectly align with business needs. Furthermore, due to their inherent limitations, process engines can only execute transactions along predefined paths, significantly restricting their ability to meet the needs of diverse business entities.
[0004] In summary, in response to the problems in current event process orchestration methods, such as the large amount of data flowing, the inability to dynamically expand the defined flow paths and flow process nodes, there is currently no effective solution that can achieve the purpose of dynamically expanding process orchestration and lightweight data flow. Summary of the Invention
[0005] The embodiments of the present application provide an event process orchestration method, device and application, which achieve the beneficial effects of high concurrency and dynamic flow by addressing the problems of large data volume and the inability to dynamically expand the defined flow paths and flow process nodes in existing event process orchestration methods.
[0006] In the first aspect, an embodiment of the present application provides an event process orchestration method, which includes: obtaining an original process file, splitting the process nodes, process connection lines and business information of the process nodes from the original process file; storing each of the process nodes in a linked list, obtaining the process components corresponding to each of the process nodes, and combining all the process components to form a process template, wherein the process components include the current process node key, the business information of the current process node, the previous process node key, the next process node key and the process connection line pointing to the next process node; generating at least one instance object through the process template, traversing any unprocessed process component in each of the instance objects as a selected node, and obtaining the previous business result corresponding to the previous process node according to the previous process node key in the selected node; processing the business content of the selected node in combination with the previous business result and the business information of the selected node to obtain the current business result; transferring to the next process node according to the next process node key and the process connection line in the selected node to process the business content corresponding to the next process node.
[0007] In some embodiments, the business information includes business parameters, and in each current process node, the business content is processed according to the business parameters to obtain a processing result.
[0008] In some embodiments, each time after obtaining the processing result, the processing time is recorded, and the current process node key, the processing result and the processing time of the current process node are stored in a database, wherein any of the process components obtains the processing result and the processing time from the database according to the current process node key.
[0009] In some embodiments, the business information also includes process node tags and / or listeners, wherein the process node tags are used to record the execution content of the corresponding process nodes, and the listeners include execution listeners and task listeners. The task listeners act on the process nodes, and the execution listeners act on the process nodes or process connection lines.
[0010] In some embodiments, the method further includes: obtaining the start process node corresponding to each of the instance objects, flowing downward with the start process node, and when flowing to the end process node, calling the listener corresponding to the end tag to send a process end message to the business system, and setting the state of the instance object to the end state.
[0011] In some embodiments, if there are multiple next process node keys to which the current process node flows downward, the process node label of the current process node is queried, and the target process node is selected from the next process node keys for flow according to the identifier of the process node label.
[0012] In some embodiments, when there are multiple next process nodes pointed to by any current process node, the multiple next process node keys are stored in an array.
[0013] In some embodiments, the method further includes: adding or deleting the process components in the process template or modifying the flow order of any of the process components.
[0014] In the second aspect, an embodiment of the present application provides an event process orchestration device, including: a data splitting module, used to obtain an original process file, and split the process nodes, process connection lines and business information of the process nodes from the original process file; a data reorganization module, used to store each of the process nodes in a linked list, obtain the process components corresponding to each of the process nodes, and combine all the process components to form a process template, wherein the process components include the current process node key, the business information of the current process node, the previous process node key, the next process node key and the process connection line pointing to the next process node; a previous result acquisition module, used to generate at least one instance object through the process template, traverse any unprocessed process component in each of the instance objects as a selected node, and obtain the previous business result corresponding to the previous process node according to the previous process node key in the selected node; a current business processing module, used to combine the previous business result and the business information of the selected node to process the business content of the selected node to obtain the current business result; a flow module, used to flow to the next process node according to the next process node key and the process connection line in the selected node to handle the business content corresponding to the next process node.
[0015] In a third aspect, an embodiment of the present application provides an electronic device comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the event process orchestration method described in any one of the first aspects.
[0016] In a fourth aspect, an embodiment of the present application provides a readable storage medium, in which a computer program is stored. The computer program includes a program code for controlling a process to execute a process, and the process includes the event process orchestration method according to any one of the first aspects.
[0017] The main contributions and innovations of the embodiments of this application are as follows:
[0018] The embodiment of the present application adopts a method of splitting the original process file and reassembling it into process components that only store the business information of the current process node and the previous process node and the next process node to form an execution chain that can be executed sequentially. This not only reduces the amount of data required to flow during data flow, but also allows the links to be re-split and recombined at any link in the execution chain, thereby achieving the effect of dynamic expansion of the flow process nodes.
[0019] The details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0021] Figure 1 This is a flowchart of the main steps of the event process arrangement method according to the first embodiment of the present application.
[0022] Figure 2 This is an example diagram of the initial process arrangement of the event process arrangement method according to the first embodiment of the present application.
[0023] Figure 3 It is a structural block diagram of an event process orchestration device according to the second embodiment of the present application.
[0024] Figure 4 3 is a schematic diagram of the hardware structure of an electronic device according to the third embodiment of the present application. DETAILED DESCRIPTION
[0025] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The implementations described in the following exemplary embodiments are not intended to represent all implementations consistent with one or more embodiments of this specification. Rather, they are merely examples of apparatuses and methods consistent with certain aspects of one or more embodiments of this specification, as detailed in the appended claims.
[0026] It should be noted that in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the method may include more or fewer steps than those described in this specification. In addition, a single step described in this specification may be broken down into multiple steps for description in other embodiments, and multiple steps described in this specification may be combined into a single step for description in other embodiments.
[0027] The purpose of this solution is to split the original process file and reassemble it into process components. Each process component only stores the business information of the current process node, the previous process node, and the next process node. Multiple process components form an execution chain that can be executed sequentially, so that any link in the execution chain can be re-split and recombined. After the combination, the previous definition information can still be used to circulate the new process.
[0028] Since this solution is aimed at event processes that require multi-level approval, the approval results of the previous step need to be obtained at each approval step, resulting in the actual data volume of the entire approval flowchart being several times or even dozens of times that of the original process data.
[0029] In other words, the existing approval process transfers data from the previous process node to the next process node, causing the amount of data to grow exponentially after the process completes. This solution, based on this, stores the previous and next process node keys in the process component. This key is used to retrieve the specific previous business result from the database. After processing, the result is transferred to the next process node based on the next process node key. This avoids the problem of excessive process data volume caused by repeated data transfers between tasks.
[0030] Figure 1 This is a flowchart of the main steps of the event process arrangement method according to the first embodiment of the present application.
[0031] To achieve this goal, Figure 1 As shown, the event process arrangement method mainly includes the following steps S101 to S105.
[0032] Step S101: Acquire an original process file, and split the process nodes, process connection lines, and business information of the process nodes from the original process file.
[0033] In this step, the original process file can be assembled by the server by dragging and dropping components. Specifically, the server can generate a BPMN file by dragging process nodes, process connection lines, and business information of process nodes, and convert the BPMN file into the original process file in JSON format.
[0034] In this step, a random UUID is generated for the original process file as a key to uniquely identify the original process file. The original process file is then stored in a Redis server based on the key. To facilitate re-parsing and redefining the process when errors occur, the original process file is stored in a MySQL database via a message queue.
[0035] The original process file is parsed through the message queue to obtain multiple process nodes, multiple process connection lines and multiple business information. The parsed data is stored in the MySQL database as the master data backup for parameter calls of subsequent service release, process startup, task completion or external exposure of service interfaces.
[0036] In one embodiment, the business information includes business parameters. Business parameters can be configured and generated by the server for each process node. For example, business parameters can record a specific urban management event: who did what, when, and when. When a process node obtains the business parameters, it can approve the specific urban management event and obtain the approval result.
[0037] Regarding the above-mentioned step S101, this solution backs up the master data by saving and splitting the original process file and storing it. In subsequent operations, it is directly assembled according to the split process nodes, process connection lines and business information of the process nodes. Compared with the existing technology, this step does not require the entire original process file to flow between process nodes, so the number generated is smaller.
[0038] Step S102: store each of the process nodes in a linked list, obtain the process components corresponding to each of the process nodes, and combine all the process components to form a process template, wherein the process components include the current process node key, the business information of the current process node, the previous process node key, the next process node key, and the process connection line pointing to the next process node.
[0039] In this step, the split process nodes are stored in a linked list, which includes pre, current, and next. With each flow, the current process node becomes the pre process node of the next process node.
[0040] like Figure 2 As shown, each process template is presented on the server as a start process node, an end process node, and multiple task process nodes between the start and end process nodes. Adjacent process nodes are connected by directed arrows. Some process nodes are pointed to by multiple process nodes, while others point to multiple process nodes. Therefore, the purpose of reassembling the data in this step is to determine which process node the current process node is pointed to and which process nodes the current process node will subsequently flow to.
[0041] In this step, if there are multiple next process nodes pointed to by any of the current process nodes, the multiple next process node keys are stored in an array. Specifically, each next process node key represents an element in the array, and when the linked list structure moves downward, the element in the array is accessed.
[0042] If there are multiple next process node keys to which the current process node flows downward, query the process node tag of the current process node, and select a target process node from the next process node keys for transfer based on the identifier of the process node tag.
[0043] In other words, this step stores all next-process node keys in the process component's next-process node key array, limiting the scope of the current process node's downward flow to the elements within the array. The target process node can be selected based on the process node's tag, or the next flow direction indicated by the business end based on the current execution result. This step differs from existing techniques in that the current business result obtained by the current process node does not need to be directly transmitted to the next process node, avoiding the accumulation of excessive data during the flow.
[0044] In addition, when a linked list structure is used for flow, it is possible to add or delete the process components in the process template or modify the flow order of any of the process components.
[0045] For example, when you need to add a process node after the current process node, you only need to replace the next process node of the current process node with the newly added process node key, point the process node key to the original next process node of the current process node, and replace the pre process node of the original next process node with the process node key.
[0046] In other words, if business needs require adding a new process component to the process template, you only need to reorganize the original link. After the reorganization, you can still use the previous definition information to circulate the new process, thereby achieving the effect of dynamic expansion.
[0047] Accordingly, when the current process node needs to be deleted, the unnecessary process nodes can be deleted by simply pointing the next of the previous process node to the next process node and the pre of the next process node to the next of the previous process node.
[0048] Of course, the links can be split and reorganized at any link in the execution chain to modify the flow order, so that the process template can meet the personalized needs of different business parties.
[0049] Regarding step S102 above, this solution reassembles process nodes to create process components. These components are stored in a chained format as a structure containing the previous process node, the current process node, and the next process node. This allows the process template to form a sequential execution chain. The execution chain transforms each process node into a data packet and specifies the contextual relationships between the process nodes. Data flow is achieved by obtaining parameters and result data from the context. This achieves high cohesion, low coupling, and a more lightweight design.
[0050] Step S103: Generate at least one instance object through the process template, traverse any unprocessed process component in each instance object as a selected node, and obtain the previous business result corresponding to the previous process node according to the previous process node key in the selected node.
[0051] In this step, a process template refers to a complete, preconfigured process. In real-world operations, different cases may need to be processed according to the process template at the same time. Therefore, when multiple cases need to be processed, multiple instance objects are generated for each process template, and each case is processed within a corresponding instance object. To clearly identify the progress of a case at which instance object and process node, key values are assigned to both the process object and the process node. The key value uniquely identifies the progress of the case.
[0052] In this step, the business results include processing results and processing time. Each time the processing result is obtained, the processing time is recorded, and the current process node key, the processing result and the processing time of the current process node are stored in the database. Among them, any process component obtains the processing result and the processing time from the database according to the current process node key.
[0053] Step S104: processing the business content of the selected node in combination with the previous business result and the business information of the selected node to obtain a current business result.
[0054] It should be noted that after each approval at a process node, recording the results and processing time is optional. Therefore, you can preset whether to record the results or processing time for a specific process node. If the results or processing time of a process node are related to subsequent approval processes, record them accordingly.
[0055] For the above steps S103-S104, this solution obtains the previous business result of the previous process node key from the database by executing the process node key on the chain, and processes it according to the previous process node result combined with the business information of the current process node to obtain the current business result.
[0056] Step S105 : transferring to the next process node according to the next process node key in the selected node and the process connection line to handle the business content corresponding to the next process node.
[0057] In this step, the server can directly transfer the process to the next process node to handle the corresponding business content according to its own flow logic. In addition, it can also expose methods to the business system through HTTP services or message queue services to deploy, start, transfer and rollback processes.
[0058] like Figure 2 As shown, the next process node handled by the Environmental Sanitation Department includes the acceptance of the commission and bureau and the parallel gateway. The business system can perform specific rollback or transfer operations so that the current process node can flow to the specified target process node.
[0059] Exemplarily, the flow of the task flows from the start process node downward to the end process node. The start process node corresponding to each instance object in the process component is queried in the Redis server, and the flow flows downward from the start process node. The process nodes are queried in sequence until the task ends after it flows to the end process node. The listener corresponding to the end tag is called to send a process end message to the business system, and the state of the instance object is set to the end state.
[0060] It's important to note that in this solution, process node labels are partially initialized with the system's initial data, while others can be dynamically added by users. Initial data is the default implementation, and user-added extended data can be implemented with a corresponding design or not.
[0061] The label process node can contain multiple labels according to different functions. For example, the end label is used to indicate that the current process node is the end process node. In addition, the specific meanings of the labels can also be shown in Table 1:
[0062] Table 1
[0063]
[0064] In addition, business information also includes listeners. Listeners include execution listeners and task listeners. Task listeners act on process nodes, and execution listeners act on process nodes or process connection lines.
[0065] Specifically, you can write a listener based on business needs to monitor the process unfamiliar time, process flow events, and process suspension time in the message queue, parse the process node tags contained in the process flow events, and execute the flow components corresponding to the process node tags to complete single process node rollback, parallel gateway process node rollback, compatible gateway process node rollback and other operations.
[0066] The following example illustrates the event process orchestration method provided by this solution.
[0067] First, prepare the server-side services. Deploy a standalone Redis server to store parsed process components, a standalone Kafka server for message exchange during the process flow, and a process flow parsing service to query process definition information and flow operations after process nodes. After starting all servers, test network communication. Deploy a browser-side service written in VUE and configure Nginx server for reverse proxy and separation of browser-side resources.
[0068] Then, the browser accesses the process orchestration service, choreographs the complete process according to the business (including the start process node, end process node, user task process node, gateway process node, process connection line, etc.) and configures the corresponding process node tags, such as message notification tags, fallback tags, etc., configures the data structure corresponding to the process node, configures whether the current system flow needs to wait for the external system call result to return before continuing the flow, etc. These configuration information are collectively referred to as business information. After the configuration is completed, click the Save button to convert the generated BPMN file into JSON format and transmit the data to the server for process parsing.
[0069] After receiving the request, the server does the following:
[0070] 1) First store a copy of the original data in the Redis server.
[0071] 2) Parse the JSON file transmitted by the browser. For example, for a task flow node, first retrieve the JSON object defined as UserTask in the JSON file, obtain the key and value at the surface level, and perform a deep loop to retrieve all keys and values within it. Redefine a HashMap to store all keys and values in parallel at the same level, naming it userTasks. Use the same method to parse out attributes such as tag attributes, listener attributes, and flow node connections.
[0072] 3) Reserialize all HashMaps defined in step 2 into JSON objects and store them in the Redis server. The reserialized JSON objects can be called process components.
[0073] 4) Store all process component information generated in step 3 in the MySQL database, and add or upgrade the corresponding version information. The combination of all process information can be called a process template.
[0074] 5) Deploy the process template. After deployment, the template can be called by the business system to carry out the process flow.
[0075] 6) Expose methods to the business system through HTTP services or message queue services to perform operations such as process deployment, startup, process flow, and process rollback.
[0076] Next, the business system retrieves all existing process templates and calls the process initiation API based on the process template key to generate a process instance and process instance key. After the instance is initiated, it first queries the Redis server for the start process node. Using the message queue, it sends a message to the process flow resolution service to automatically forward the process from the start process node to a task. At this point, the task process node generates a unique task process node key. After the forwarding operation is complete, the API returns the current instance's process instance key and task process node key. The business system saves this information as parameters for the next forwarding operation.
[0077] The business system then continuously calls the task flow interface. This interface uses the built-in completeTask method to perform business approval processing and store the results in the database. After each processing step, the task flows to the next process node. This flow continuously triggers the corresponding process node tags or listeners configured for each process node or connection line in the engine file until the task reaches the end process node. This sends a process end message to the business system, which then sets the task status to the end state.
[0078] In summary, the embodiment of the present application provides an event process orchestration method. First, the solution separates the front-end and back-end, so that the flow process is calculated and analyzed on the server side. The server side can improve the aggregate computing capability by increasing server hardware and other methods, and split each process node to further reduce the coupling between process nodes, improve computing efficiency and facilitate expansion.
[0079] In this solution, the business side binds different tags and page rendering templates to each process node, and adds customized business information. When the flow reaches the corresponding process node, the corresponding data and process node tags are parsed to complete the corresponding business. In the process flow on the server side, each process node is stored in a chain, and data flow is achieved by obtaining parameters and result data in the context.
[0080] In addition, this solution incorporates the Redis service, significantly improving concurrent performance during process flow. The introduction of a message queue decouples the various component modules, allowing for the replacement of the message queue implementation at any time, allowing users to select the appropriate message queue based on the specific scenario. Both the Redis server and message queue facilitate horizontal scalability, significantly reducing operational and maintenance costs.
[0081] Figure 3 It is a structural block diagram of an event process orchestration device according to the second embodiment of the present application.
[0082] like Figure 3 As shown, one embodiment of the present application provides an event process orchestration device, comprising:
[0083] The data splitting module 301 is used to obtain the original process file, and split the original process file to obtain process nodes, process connection lines and business information of the process nodes.
[0084] The data reorganization module 302 is used to store each of the process nodes in a linked list, obtain the process components corresponding to each of the process nodes, and combine all the process components to form a process template, wherein the process components include the current process node key, the business information of the current process node, the previous process node key, the next process node key, and the process connection line pointing to the next process node.
[0085] The previous result acquisition module 303 is used to generate at least one instance object through the process template, traverse any unprocessed process component in each instance object as a selected node, and obtain the previous business result corresponding to the previous process node according to the previous process node key in the selected node.
[0086] The current business processing module 304 is configured to process the business content of the selected node in combination with the previous business result and the business information of the selected node to obtain the current business result.
[0087] The transfer module 305 is configured to transfer to the next process node according to the next process node key in the selected node and the process connection line to handle the business content corresponding to the next process node.
[0088] Figure 4 Schematic diagram of the hardware structure of an electronic device according to an embodiment of the present application.
[0089] like Figure 4As shown, an electronic device according to an embodiment of the present application includes a memory 404 and a processor 402 . The memory 404 stores a computer program, and the processor 402 is configured to run the computer program to execute the steps in any of the above method embodiments.
[0090] Specifically, the processor 402 may include a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0091] Among them, the memory 404 may include a large-capacity memory 404 for data or instructions. By way of example and not limitation, the memory 404 may include a hard disk drive (HDD), a floppy disk drive, a solid-state drive (SSD), a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 404 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 404 may be inside or outside the data processing device. In a specific embodiment, the memory 404 is a non-volatile memory. In a specific embodiment, the memory 404 includes a read-only memory (ROM) and a random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (Programmable Read-Only Memory, abbreviated as PROM), an erasable PROM (Erasable Programmable Read-Only Memory, abbreviated as EPROM), an electrically erasable PROM (Electrically Erasable Programmable Read-Only Memory, abbreviated as EEPROM), an electrically alterable ROM (Electrically Alterable Read-Only Memory, abbreviated as EAROM) or a flash memory (FLASH) or a combination of two or more of these. In appropriate circumstances, the RAM can be a static random access memory (SRAM) or a dynamic random access memory (DRAM), wherein the DRAM can be a fast page mode dynamic random access memory 404 (FPMDRAM), an extended data output dynamic random access memory (EDODRAM), a synchronous dynamic random access memory (SDRAM), etc.
[0092] The memory 404 may be used to store or cache various data files required for processing and / or communication, as well as possible computer program instructions executed by the processor 402 .
[0093] The processor 402 implements any one of the event process arrangement methods in the above embodiments by reading and executing computer program instructions stored in the memory 404 .
[0094] Optionally, the electronic device may further include a transmission device 406 and an input / output device 408 , wherein the transmission device 406 is connected to the processor 402 , and the input / output device 408 is connected to the processor 402 .
[0095] Transmission device 406 can be used to receive or send data via a network. Specific examples of the aforementioned network may include a wired or wireless network provided by a communications provider of the electronic device. In one embodiment, the transmission device includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In one embodiment, transmission device 406 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0096] The input / output device 408 is used to input or output information. In this embodiment, the input information may be a complete flow chart, etc., and the output information may be the processing results of each process node, etc.
[0097] Optionally, in this embodiment, the processor 402 may be configured to execute the following steps through a computer program:
[0098] S101: Acquire an original process file, and split the original process file to obtain process nodes, process connection lines, and business information of the process nodes.
[0099] S102. Store each of the process nodes in a linked list, obtain the process components corresponding to each of the process nodes, and combine all the process components to form a process template, wherein the process components include the current process node key, the business information of the current process node, the previous process node key, the next process node key, and the process connection line pointing to the next process node.
[0100] S103. Generate at least one instance object through the process template, traverse any unprocessed process component in each instance object as a selected node, and obtain the previous business result corresponding to the previous process node according to the previous process node key in the selected node.
[0101] S104: Process the business content of the selected node in combination with the previous business result and the business information of the selected node to obtain a current business result.
[0102] S105 , transferring to the next process node according to the next process node key in the selected node and the process connection line to handle the business content corresponding to the next process node.
[0103] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be repeated here.
[0104] In general, various embodiments may be implemented in hardware or dedicated circuitry, software, logic, or any combination thereof. Some aspects of the invention may be implemented in hardware, while other aspects may be implemented in firmware or software that may be executed by a controller, microprocessor, or other computing device, but the invention is not limited thereto. Although various aspects of the invention may be shown and described as block diagrams, flow charts, or using some other graphical representation, it should be understood that, as non-limiting examples, the blocks, devices, systems, techniques, or methods described herein may be implemented in hardware, software, firmware, dedicated circuitry or logic, general-purpose hardware or a controller or other computing device, or some combination thereof.
[0105] Embodiments of the present invention can be implemented by computer software, which is executable by the data processor of the mobile device, such as in the processor entity, or is implemented by hardware, or is implemented by a combination of software and hardware. Computer software or programs (also referred to as program products) including software routines, applets and / or macros can be stored in any device-readable data storage medium, and they include program instructions for performing specific tasks. The computer program product can include one or more computer executable components configured to perform the embodiment when the program is running. One or more computer executable components can be at least one software code or a part thereof. In addition, at this point, it should be noted that any box of the logic flow in the figure can represent a program step, or interconnected logical circuits, boxes and functions, or a combination of program steps and logical circuits, boxes and functions. The software can be stored in physical media such as memory chips or storage blocks implemented in the processor, magnetic media such as hard disks or floppy disks, and optical media such as, for example, DVDs and their data variants, CDs. Physical media is non-transient media.
[0106] Those skilled in the art should understand that the technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0107] The above embodiments merely illustrate several embodiments of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, all of which fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.
Claims
1. An event process arrangement method, characterized in that: The following steps are involved: Obtaining an original process file, and separating the process nodes, process connection lines, and business information of the process nodes from the original process file, wherein the business information includes a process node tag, and the process node tag is used to record the execution content of the corresponding process node; Each process node is stored in a linked list to obtain a process component corresponding to each process node, and all the process components are combined to form a process template, wherein the process component includes the current process node key, the business information of the current process node, the previous process node key, the next process node key, and the process connection line pointing to the next process node; Generate at least one instance object through the process template, traverse any unprocessed process component in each instance object as a selected node, and obtain the previous business result corresponding to the previous process node according to the previous process node key in the selected node; Processing the business content of the selected node in combination with the previous business result and the business information of the selected node to obtain a current business result; According to the next process node key in the selected node and the process connection line, the process is transferred to the next process node to handle the business content corresponding to the next process node. When the number of the next process nodes pointed to by any current process node is multiple, the multiple next process node keys are stored in an array, and the process node label of the current process node is queried. According to the identification of the process node label, the target process node is selected in the next process node key for transfer.
2. The event process arrangement method according to claim 1, characterized in that: The business information includes business parameters, and in each current process node, the business content is processed according to the business parameters to obtain a processing result.
3. The event process arrangement method according to claim 2, characterized in that: Each time after obtaining the processing result, record the processing time, and store the current process node key, the processing result and the processing time of the current process node in the database, wherein any process component obtains the processing result and the processing time from the database according to the current process node key.
4. The event process arrangement method according to claim 2, characterized in that: The business information also includes listeners, wherein the listeners include execution listeners and task listeners. The task listeners act on process nodes, and the execution listeners act on process nodes or process connection lines.
5. The event process arrangement method according to claim 4, characterized in that: The method also includes: obtaining the start process node corresponding to each of the instance objects, flowing downward with the start process node, and when flowing to the end process node, calling the listener corresponding to the end tag to send a process end message to the business system, and setting the state of the instance object to the end state.
6. The event process arrangement method according to claim 1, characterized in that: The method further includes: adding or deleting the process components in the process template or modifying the flow order of any of the process components.
7. An event process arrangement device, characterized in that: include: A data splitting module is used to obtain the original process file and split it into process nodes, process connection lines and business information of the process nodes from the original process file. The business information includes a process node label, which is used to record the execution content of the corresponding process node; a data reorganization module, configured to store each of the process nodes in a linked list, obtain a process component corresponding to each of the process nodes, and combine all of the process components to form a process template, wherein the process component includes a current process node key, business information of the current process node, a previous process node key, a next process node key, and a process connection line pointing to the next process node; A previous result acquisition module is used to generate at least one instance object through the process template, traverse any unprocessed process component in each instance object as a selected node, and obtain the previous business result corresponding to the previous process node according to the previous process node key in the selected node; A current business processing module, configured to process the business content of the selected node in combination with the previous business result and the business information of the selected node to obtain a current business result; A flow transfer module is used to transfer to the next process node according to the next process node key in the selected node and the process connection line to handle the business content corresponding to the next process node. When the number of the next process nodes pointed to by any current process node is multiple, the multiple next process node keys are stored in an array, and the process node label of the current process node is queried. According to the identification of the process node label, the target process node is selected from the next process node key for flow.
8. An electronic device comprising a memory and a processor, characterized in that: The memory stores a computer program, and the processor is configured to run the computer program to execute the event process arrangement method according to any one of claims 1 to 6.
9. A readable storage medium, characterized in that: The readable storage medium stores a computer program, wherein the computer program includes a program code for controlling a process to execute a process, wherein the process includes the event flow arrangement method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Business process arrangement method and device, computer equipment and storage medium
CN113435846A