Business execution process arrangement method and device

Through the orchestration method of business execution process, the business process is decomposed into an independent business logic execution unit, component templates and business components are established, and business flow charts are constructed and analyzed, which solves the problems of serious business logic coupling and low code reuse in the existing technology. , realizes efficient development and iteration.

CN119440517APending Publication Date: 2025-02-14WUHAN ZBANK CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411468556.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-21
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

In the prior art, business development adopts imperative development, resulting in serious business logic coupling, a large number of identical or similar codes, which are difficult to maintain and low code reuse.

Method used

Provide a method for orchestrating business execution processes. By establishing business processes, decomposing them into independent reusable business logic execution units, and establishing component templates for each unit, establishing business components based on component templates, building business flow charts, and analyzing The metadata is saved to the database, published to the process engine service, and the process instance is generated and the components are executed in turn to complete business logic processing.

Benefits of technology

It realizes business logic decoupling, improves code reuse, unifies code specifications, improves development and iteration efficiency, and reduces development errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119440517A_ABST
    Figure CN119440517A_ABST
Patent Text Reader

Abstract

The invention discloses a business execution process arrangement method and device. The method comprises the following steps: establishing a business process; the method comprises the following steps: decomposing a business process into a plurality of independent reusable business logic execution units, establishing a component template for each business logic execution unit, and establishing a business component based on the component template; constructing a business flow chart based on the business component and the system component; analyzing the business flow chart into business flow chart metadata, storing the business flow chart metadata in a database, and publishing the business flow chart to a flow engine service; and calling the metadata corresponding to the business flow chart through a flow engine service during transaction to generate a flow instance, and executing each component in sequence according to the component sequence drawn in the business flow chart through the flow instance to complete the processing of business logic. According to the method, business logic decoupling and component type development are realized, code reuse is improved, code specifications are unified, development and iteration efficiency is improved, and development errors are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information technology, and in particular to a method and device for arranging a business execution process. Background Art

[0002] At present, imperative development is generally adopted in business development, that is, all business logics are implemented in one or several classes or methods. Therefore, codes that are not closely related or not related to each other appear in one class or one method, which leads to serious coupling. There are a lot of identical or similar codes in different business processing logics, which makes maintenance difficult and code reuse is low. Summary of the invention

[0003] In view of the problems existing in the prior art, the present invention provides a method and device for arranging business execution processes, which realizes business logic decoupling, component-based development, improves code reuse, unifies code specifications, improves development and iteration efficiency, and reduces errors.

[0004] In order to achieve the above object, the technical solution adopted by the present invention is as follows:

[0005] A first aspect provides a method for orchestrating a business execution process, including:

[0006] S1: Establish business processes;

[0007] S2: Decompose the business process into multiple independent and reusable business logic execution units, and create a component template for each business logic execution unit.

[0008] S3: Establishing a business component based on the component template;

[0009] S4: constructing a business process diagram based on the business components and the system components, wherein the business process diagram is used to implement the business process logic;

[0010] S5: Parse the business process diagram into business process diagram metadata and save it to the database, and publish the business process diagram to the process engine service;

[0011] S6: When conducting a transaction, the metadata corresponding to the business process diagram is called through the process engine service to generate a process instance, so as to execute each component in sequence according to the order of components drawn in the business process diagram through the process instance to complete the processing of business logic.

[0012] In one implementation, the business process is established by creating, importing, and copying.

[0013] In one implementation, when the template is described as a details template, S2 includes:

[0014] S2.1: Sort out the business process logic, decompose and decouple the business, and form independent and reusable execution units;

[0015] S2.2: compiling execution code for the independent and reusable execution unit according to preset specifications and encapsulating it into a Java class;

[0016] S2.3: Create a process component template for the independent and reusable execution unit, and configure a unique template number, template description, template name, and implementation class.

[0017] In one embodiment, the display mode of the configuration details page, S3 includes:

[0018] S3.1: Assign a component number to each business component and send it to the backend business component table to check whether it exists. If it already exists, it will prompt "Component number already exists;

[0019] S3.2: Configure the component name, Chinese description, component icon, template number and category for the business component, and then save it to the database;

[0020] S3.3: Configure the input and output parameters of each business component.

[0021] In one embodiment, the system component is a component used to implement process flow and control the execution order of business components, and S4 includes:

[0022] Determine the location of business components and system components;

[0023] Based on the determined positions, business components and system components are connected by lines to form a business process diagram.

[0024] In one embodiment, S6 includes:

[0025] S6.1: The request parameters are encapsulated into a Map object, including the transaction number and the process number, and the process engine is requested for the request parameters in turn;

[0026] S6.2: Verify the request parameters, query the process configuration from the database according to the process number, configure the instantiated processes in sequence, and then save the process instance in the process instance table;

[0027] S6.3: The process instances are executed sequentially according to the order of the business process diagram.

[0028] In one embodiment, S6.3 includes:

[0029] S6.3.1: Execute the start node, where the start node is a marking node, marking the start of the process and saving a piece of data to the process activity table;

[0030] S6.3.2: Execute the next node. If the node is a business component, instantiate the Java class corresponding to this component, then use the process input parameter Map object as a parameter to call the execute method of this instance, and then save a piece of data to the process activity table; if it is an exclusive gateway, use the Java expression engine to calculate the expression on each call line, and execute the components connected by the line with a true result. If there are multiple true results, an error is reported, and finally a piece of data is saved to the process activity table; if it is a parallel gateway, encapsulate the components connected by each line of this gateway and the process input parameter Map into a Java thread object and submit it to the thread pool for execution, and then save a piece of data to the process activity table; if it is a merge gateway, the main thread waits, and after each parallel task is executed, wake up the main thread to continue execution, and then save a piece of data to the process activity table; if it is a sub-process component, the configured sub-process number and process input parameter Map are used as parameters. The process engine is called again to execute this sub-process, and then a piece of data is saved to the process activity table; if it is a rule engine component, the Drools rule engine is called to execute the Drools rule text configured by this component, and then a piece of data is saved to the process activity table; if it is a dynamic Java component, the FreeMarker template engine is called to convert the Java fragment configured by this component into a complete Java class, and then the ECJ compiler is called to compile this class, and then it is loaded into the JVM and instantiated through the class loading technology, and finally this instance is called with the process input parameter Map object as a parameter, and after execution, a piece of data is saved to the process activity table; if it is a scheduled task component, the timing expression is parsed, the task execution class is instantiated, and then the time wheel algorithm is applied to schedule this instance with the process input parameter Map as a parameter, and a piece of data is saved to the process activity table; if it is an end node, a piece of data is saved to the process activity table to mark the end of the process execution.

[0031] Based on the same inventive concept, the second aspect of the present invention provides a device for arranging a service execution process, including:

[0032] Business process establishment module, used to establish business processes;

[0033] The business process decomposition module is used to decompose the business process into multiple independent and reusable business logic execution units, and to establish a component template for each business logic execution unit.

[0034] A business component creation module, used to create a business component based on the component template;

[0035] A business process diagram construction module, used to construct a business process diagram based on business components and system components, wherein the business process diagram is used to implement business process logic;

[0036] The business process diagram parsing module is used to parse the business process diagram into business process diagram metadata and save it to the database, and publish the business process diagram to the process engine service;

[0037] The business logic processing module is used to call the metadata corresponding to the business process diagram through the process engine service to generate a process instance when conducting a transaction, so as to execute each component in sequence according to the order of components drawn in the business process diagram through the process instance to complete the business logic processing.

[0038] Based on the same inventive concept, the third aspect of the present invention provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the method for arranging the business execution process described in the first aspect is implemented.

[0039] Based on the same inventive concept, the fourth aspect of the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for orchestrating the business execution process described in the first aspect is implemented.

[0040] Compared with the prior art, the advantages and beneficial technical effects of the present invention are as follows:

[0041] The present invention provides a method for arranging business execution processes, which first establishes a business process; decomposes the business process into multiple independent, reusable business logic execution units and establishes a component template for each logic execution unit; then establishes a business component based on the component template, and the business component appears on the flowchart drawing page; then builds a business process diagram based on the business component and the system component, and then parses the business process diagram into business process diagram metadata and saves it to a database, and publishes the business process diagram to a process engine service; finally, when conducting a transaction, the metadata corresponding to the business process diagram is called through the process engine service to generate a process instance, so that each component is executed in sequence through the process instance according to the order of components drawn in the business process diagram to complete the processing of business logic. The present invention can achieve business logic decoupling, component-based development, improve code reuse, unify code specifications, improve development and iteration efficiency, and reduce development errors. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0043] Figure 1 A flowchart of a method for arranging a business execution process provided by an embodiment of the present invention;

[0044] Figure 2 A structural block diagram of a method and device for arranging a service execution process provided in an embodiment of the present invention;

[0045] Figure 3 A schematic diagram of a computer-readable storage medium provided in an embodiment of the present invention;

[0046] Figure 4 A schematic diagram of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0047] The present invention provides a method for arranging a business execution process, the main scheme includes establishing a business process; decomposing the business process into multiple independent reusable business logic execution units and establishing a component template for each logic execution unit; establishing a business component for each component template, and the business component appears on a flowchart drawing page; dragging the business component and the system component to appropriate positions on the flowchart drawing page, and then connecting them with lines to form a business process diagram to implement the business process logic, the system component is a component that implements the flow of the process and controls the execution order of the business components, including a start node, an end node, an exclusive gateway, a parallel gateway, a merge gateway, and a sub-process component; after the flowchart is drawn, click the save button on the flowchart drawing page to parse the business process diagram into business process diagram metadata (XML format text) and save it to a database and publish the business process to a process engine service; when a transaction is in progress, the process engine service calls the business process diagram metadata published in the aforementioned steps to generate a process instance, and this process instance executes each component in sequence according to the component order drawn in the business process diagram to complete the processing of the business logic. The process instance information and the execution information of each component will be saved in the database. This information mainly includes the process instance number, component number, component name, start time, end time, execution result (execution success or failure), and result description (success or failure reason). Among them, the ongoing or completed transaction uses the transaction record query function to query the execution information saved in the metadata generation process instance step corresponding to the business process diagram through the process engine service to view the transaction execution status, progress, and error cause. The present invention realizes business logic decoupling, component-based development, improves code reuse, unifies code specifications, improves development and iteration efficiency, and reduces development errors.

[0048] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0049] Embodiment 1

[0050] The present invention discloses a method for arranging a business execution process, see Figure 1 , the method comprising:

[0051] S1: Establish business processes;

[0052] S2: Decompose the business process into multiple independent and reusable business logic execution units, and establish a component template for each business logic execution unit;

[0053] S3: Establishing a business component based on the component template;

[0054] S4: constructing a business process diagram based on the business components and the system components, wherein the business process diagram is used to implement the business process logic;

[0055] S5: Parse the business process diagram into business process diagram metadata and save it to the database, and publish the business process diagram to the process engine service;

[0056] S6: When conducting a transaction, the metadata corresponding to the business process diagram is called through the process engine service to generate a process instance, so as to execute each component in sequence according to the order of components drawn in the business process diagram through the process instance to complete the processing of business logic.

[0057] During the specific implementation process, S1 will assign a unique process number when establishing a business process. S2 will decompose the business process into multiple independent and reusable business logic execution units, and establish a component template for each logic execution unit; the business component appears on the flowchart drawing page. The flowchart metadata is XML format text, and the process instance information and the execution information of each component will be saved to the database. This information mainly includes the process instance number, component number, component name, start time, end time, execution result (execution success or failure), and result description (success or failure reason). In addition, the transaction in progress or completed can query the execution information saved in step S6 through the transaction record query function to view the status, progress, and error cause of the transaction execution.

[0058] In one implementation, the business process is established by creating, importing, and copying.

[0059] Specifically, business processes can be established through three methods: creating, importing, and copying.

[0060] When a new business process is created, the process number will be sent to the background to check whether it already exists in the process configuration table. If it already exists, a prompt will be displayed saying "Process number already exists".

[0061] When a business process is established, the version number is initialized to 1. A business process may have multiple versions. The process description and enablement type can be configured. The enablement type has normal, enabled, and disabled states. The default state is normal; system identifier. In the microservice system, the system identifier is used to identify which service the current process applies to.

[0062] By clicking the Save button, the business process information is saved in the data.

[0063] For importing a process, export the process developed in other environments into XML text and import it into this environment to create a new process with the same content as the imported process. For copying a process, select an existing process and click the Copy button. After filling in the process number, a new process will be created with the same content as the copied process.

[0064] In one implementation, when the template is described as a details template, S2 includes:

[0065] S2.1: Sort out the business process logic, decompose and decouple the business, and form independent and reusable execution units;

[0066] S2.2: compiling execution code for the independent and reusable execution unit according to preset specifications and encapsulating it into a Java class;

[0067] S2.3: Create a process component template for the independent and reusable execution unit, and configure a unique template number, template description, template name, and implementation class.

[0068] Specifically, the implementation class is the Java class in S2.2.

[0069] In one embodiment, the display mode of the configuration details page, S3 includes:

[0070] S3.1: Assign a component number to each business component and send it to the backend business component table to check whether it exists. If it already exists, it will prompt "Component number already exists;

[0071] S3.2: Configure the component name, Chinese description, component icon, template number and category for the business component, and then save it to the database;

[0072] S3.3: Configure the input and output parameters of each business component.

[0073] Specifically, the component icon refers to the icon displayed on the flowchart drawing page), and the template number refers to the number of the component template in step S2.

[0074] Components are divided into basic components and business components. Basic components are built-in to the system, including start / end components, exclusive gateway components, parallel gateway components, merge gateway components, connection components, business components, sub-process components, exception throwing components, rule engine components, dynamic Java components, scheduled task components, etc. Business components are components that implement a certain business logic. Basic components are built-in to the system and do not need to be created. Business components need to be created through step S3.

[0075] Among them, the parameter configuration of each component is as follows:

[0076] Start / end component: no input or output parameters;

[0077] Exclusive gateway component: the input parameter is an expression (Java-like), and the output parameter is a Boolean value;

[0078] Parallel gateway component: no input and output parameters;

[0079] Merge gateway component: no input and output parameters;

[0080] Business component: The input and output parameters are a Map object;

[0081] Wiring component: the input parameter is 0 or 1 expression (Java-like), and the output parameter is a Boolean value;

[0082] Sub-process component: The input parameter is a process number and a Map object, and the output parameter is a Map object;

[0083] Exception throwing component: the input parameter is a Map object, and the output parameter is a Java exception object;

[0084] Rule engine component: The input parameter is a Drools rule text, and the output parameter is a Map object;

[0085] Dynamic Java component: The input parameter is a Java code and a Map object, and the output parameter is a Map object;

[0086] Scheduled task component: The input parameter is a Map object, a timing expression, and a Java class for executing the task; the output parameter is a Map object.

[0087] In one embodiment, the system component is a component used to implement process flow and control the execution order of business components, and S4 includes:

[0088] Determine the location of business components and system components;

[0089] Based on the determined positions, business components and system components are connected by lines to form a business process diagram.

[0090] Specifically, after opening the process drawing page, the component panel is on the left. When entering the page, the backend interface will be called to query the configured components, including basic components and business components. The components returned by the query are placed in the component panel according to their categories and sorting requirements, and displayed in the form of icons. Some basic components are displayed in the form of floating panels.

[0091] On the right side of the flowchart page is the drawing panel with grid lines. Select a component in the component panel on the left with the mouse, drag it to the drawing panel on the right, release the mouse, and the component will appear in the drawing panel as an icon. Select this component again to drag it in the drawing panel.

[0092] Based on the determined positions, business components and system components are connected to form a business process diagram. The specific implementation is as follows:

[0093] Step 4.1: After creating the process, click Open Process to enter the flowchart page.

[0094] Step 4.2: Drag the start node to the drawing panel, and then drag the business component to be executed in the first step to the drawing panel according to the execution order of the business process, and then use the connection component to connect the start component and the business component.

[0095] Step 4.3: According to the execution order of the business process, drag the remaining business components to the drawing panel one by one, and connect them with the connection components.

[0096] Step 4.4: If two or more business components are executed in mutual exclusion, that is, only one of them is executed in the entire business logic, you can add an exclusive gateway in front of these components, connect the lines of the exclusive gateway to these components, write a conditional expression on each line, and execute the business component connected by its line when a certain expression is evaluated to true.

[0097] Step 4.5: If two or more business components need to be executed in parallel, you can add a parallel gateway in front of these components. The parallel gateway's lines are connected to these nodes, and then a merge gateway is connected after this row of components. These components are all connected to the merge gateway. In this way, these business components are executed in parallel, and then the merge gateway will wait for them to be executed before executing the subsequent components.

[0098] Step 4.6: A component in the flowchart can be a sub-process component, that is, this component executes another business process. Drag the sub-process component to the drawing panel, set a process number for it, and then connect it with a line.

[0099] Step 4.7: On the flowchart drawing page is a toolbar with drawing tool buttons such as Save, Display, Print, Export Image, Cut, Copy, Paste, Delete, Pin, Redo, Group, Ungroup, Zoom Out, Zoom In, Actual Size, Adaptive Size, Outline, Select All, Unselect All, Select All Nodes, Select All Edges, Align Left, Align Right, Align Top, Align Bottom, Align Horizontally Center, Align Vertically Center, Show XML Text, etc. You can use the alignment and zoom tools to adjust the flowchart to make it more beautiful.

[0100] In one implementation, in step S5, the process of parsing and saving the business process diagram metadata and publishing the process is as follows:

[0101] Step 5.1: After the flowchart is drawn, click the Save button on the toolbar. The drawing page process parsing engine will parse the flowchart into XML format text, and then call the background interface to save it to the data.

[0102] Step 5.2: Check the format when saving the flowchart information, as follows:

[0103] There must be a start node and one or more end nodes;

[0104] Each link must have nodes at both ends;

[0105] Except for the start, end, and exception throwing nodes, each node must have an incoming and outgoing connection; there can only be one connection between two nodes.

[0106] In one embodiment, S6 includes:

[0107] S6.1: The request parameters are encapsulated into a Map object, including the transaction number and the process number, and the process engine is requested for the request parameters in turn;

[0108] S6.2: Verify the request parameters, query the process configuration from the database according to the process number, configure the instantiated processes in sequence, and then save the process instance in the process instance table;

[0109] S6.3: The process instances are executed sequentially according to the order of the business process diagram.

[0110] Specifically,

[0111] In one embodiment, S6.3 includes:

[0112] S6.3.1: Execute the start node, where the start node is a marking node, marking the start of the process and saving a piece of data to the process activity table;

[0113] S6.3.2: Execute the next node. If the node is a business component, instantiate the Java class corresponding to this component, then use the process input parameter Map object as a parameter to call the execute method of this instance, and then save a piece of data to the process activity table; if it is an exclusive gateway, use the Java expression engine to calculate the expression on each call line, and execute the components connected by the line with a true result. If there are multiple true results, an error is reported, and finally a piece of data is saved to the process activity table; if it is a parallel gateway, encapsulate the components connected by each line of this gateway and the process input parameter Map into a Java thread object and submit it to the thread pool for execution, and then save a piece of data to the process activity table; if it is a merge gateway, the main thread waits, and after each parallel task is executed, wake up the main thread to continue execution, and then save a piece of data to the process activity table; if it is a sub-process component, the configured sub-process number and process input parameter Map are used as parameters. The process engine is called again to execute this sub-process, and then a piece of data is saved to the process activity table; if it is a rule engine component, the Drools rule engine is called to execute the Drools rule text configured by this component, and then a piece of data is saved to the process activity table; if it is a dynamic Java component, the FreeMarker template engine is called to convert the Java fragment configured by this component into a complete Java class, and then the ECJ compiler is called to compile this class, and then it is loaded into the JVM and instantiated through the class loading technology, and finally this instance is called with the process input parameter Map object as a parameter, and after execution, a piece of data is saved to the process activity table; if it is a scheduled task component, the timing expression is parsed, the task execution class is instantiated, and then the time wheel algorithm is applied to schedule this instance with the process input parameter Map as a parameter, and a piece of data is saved to the process activity table; if it is an end node, a piece of data is saved to the process activity table to mark the end of the process execution.

[0114] In one embodiment, the method further includes checking the status, progress, and error cause of the transaction execution as follows:

[0115] Step 7.1: Select a transaction record on the transaction page and click the View Progress button.

[0116] Step 7.2: Click the Check Progress button to call the backend interface, and the input parameter is the transaction number.

[0117] Step 7.3: The background queries the process instance table, process activity table and flowchart XML text through the transaction number, and then gives the component label facility style in the flowchart XML text according to the execution record recorded in the activity table, including styles such as successful execution, failed, executing, and unexecuted nodes, and then encapsulates them into a return message.

[0118] Step 7.4: After the page receives the return message, it displays the process activity table records in chronological order in a table format. The display fields include node description, start time, end time, consumed time, and execution result (success or failure, with error information displayed if failed). The flowchart XML text is parsed into a flowchart by the flowchart drawing and parsing engine, and has a style, that is, nodes with different execution results (success, failure, executing, not executed) are displayed in different colors.

[0119] In summary, the present invention adopts the above technical solution, and thus has the following beneficial effects:

[0120] 1. Rapid iterative business development: you only need to copy a process, adjust (add / delete / change order) business components and configuration parameters, and then you can test it. Similar processes can even share a process, and you only need to modify the configuration parameters, which improves development efficiency.

[0121] 2. Component-based development improves the code reuse rate. After business decoupling, many business components are made into common components, which can be used out of the box without further development.

[0122] 3. The code standards are unified, which reduces the defect rate. Business components are written using unified standards, and a large number of components can be reused, reducing the chance of errors.

[0123] 4. Version rollback is simple. You only need to enable the lower version of the process. The process has a version number and multiple processes can coexist with guaranteed cost. The enabled version is selected during execution.

[0124] Embodiment 2

[0125] Based on the same inventive concept, this embodiment discloses a device for arranging a business execution process, see Figure 2 ,include:

[0126] A business process establishment module 201 is used to establish a business process;

[0127] The business process decomposition module 202 is used to decompose the business process into multiple independent and reusable business logic execution units, and to establish a component template for each business logic execution unit.

[0128] A business component creation module 203, used to create a business component based on the component template;

[0129] A business process diagram construction module 204 is used to construct a business process diagram based on business components and system components, wherein the business process diagram is used to implement business process logic;

[0130] The business process diagram parsing module 205 is used to parse the business process diagram into business process diagram metadata and save it to the database, and publish the business process diagram to the process engine service;

[0131] The business logic processing module 206 is used to generate a process instance by calling the metadata corresponding to the business process diagram through the process engine service when conducting a transaction, so as to execute each component in sequence according to the order of components drawn in the business process diagram through the process instance to complete the business logic processing.

[0132] Since the device introduced in the second embodiment of the present invention is a device used to implement the method for arranging the service execution process in the first embodiment of the present invention, based on the method introduced in the first embodiment of the present invention, the person skilled in the art can understand the specific structure and deformation of the device, so it is not repeated here. All devices used in the method in the first embodiment of the present invention belong to the scope of protection of the present invention.

[0133] Embodiment 3

[0134] Based on the same inventive concept, see Figure 3 This embodiment further provides a computer-readable storage medium 300 on which a computer program 311 is stored. When the program is executed by a processor, the method described in the first embodiment is implemented.

[0135] Since the computer-readable storage medium introduced in the third embodiment of the present invention is a computer-readable storage medium used to implement the method for arranging the business execution process in the first embodiment of the present invention, based on the method introduced in the first embodiment of the present invention, those skilled in the art can understand the specific structure and deformation of the computer-readable storage medium, so it is not repeated here. All computer-readable storage media used in the method of the first embodiment of the present invention belong to the scope of protection of the present invention.

[0136] Embodiment 4

[0137] The present invention also provides a computer device, see Figure 4 , including a memory 401, a processor 402, and a computer program 403 stored in the memory and executable on the processor, wherein the processor implements the method described in the first embodiment when executing the program.

[0138] Since the computer device introduced in the fourth embodiment of the present invention is a computer device used to implement the method for arranging the business execution process in the first embodiment of the present invention, based on the method introduced in the first embodiment of the present invention, the person skilled in the art can understand the specific structure and deformation of the computer device, so it is not repeated here. All computer devices used in the method of the first embodiment of the present invention belong to the scope of protection of the present invention.

[0139] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0140] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0141] Although preferred embodiments of the present invention have been described, additional changes and modifications may be made to these embodiments by those skilled in the art once the basic creative concepts are known. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention. Obviously, those skilled in the art may make various changes and modifications to the embodiments of the present invention without departing from the spirit and scope of the embodiments of the present invention. Thus, if these modifications and variations of the embodiments of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A method for arranging a business execution process, characterized in that: include: S1: Establish business processes; S2: Decompose the business process into multiple independent and reusable business logic execution units, and create a component template for each business logic execution unit. S3: Establishing a business component based on the component template; S4: constructing a business process diagram based on the business components and the system components, wherein the business process diagram is used to implement the business process logic; S5: Parse the business process diagram into business process diagram metadata and save it to the database, and publish the business process diagram to the process engine service; S6: When conducting a transaction, the metadata corresponding to the business process diagram is called through the process engine service to generate a process instance, so as to execute each component in sequence according to the order of components drawn in the business process diagram through the process instance to complete the processing of business logic.

2. The method for arranging a business execution process according to claim 1, characterized in that: The ways to establish a business process include creating, importing, and copying.

3. The method for arranging a business execution process according to claim 2, characterized in that: When the template is described as a details template, S2 includes: S2.1: Sort out the business process logic, decompose and decouple the business, and form independent and reusable execution units; S2.2: compiling execution code for the independent and reusable execution unit according to preset specifications and encapsulating it into a Java class; S2.3: Create a process component template for the independent and reusable execution unit, and configure a unique template number, template description, template name, and implementation class.

4. The method for arranging a business execution process according to claim 1, characterized in that: Configure the display mode of the details page. S3 includes: S3.1: Assign a component number to each business component and send it to the backend business component table to check whether it exists. If it already exists, it will prompt "Component number already exists"; S3.2: Configure the component name, Chinese description, component icon, template number and category for the business component, and then save it to the database; S3.3: Configure the input and output parameters of each business component.

5. The method for arranging a business execution process according to claim 1, characterized in that: System components are used to implement process flow and control the execution order of business components. S4 includes: Determine the location of business components and system components; Based on the determined positions, business components and system components are connected by lines to form a business process diagram.

6. The method for arranging a business execution process according to claim 1, characterized in that S6 include: S6.1: The request parameters are encapsulated into a Map object, including the transaction number and the process number, and the process engine is requested for the request parameters in turn; S6.2: Verify the request parameters, query the process configuration from the database according to the process number, configure the instantiated processes in sequence, and then save the process instance in the process instance table; S6.3: The process instances are executed sequentially according to the order of the business process diagram.

7. The method for arranging a business execution process according to claim 6, characterized in that: S6.3 includes: S6.3.1: Execute the start node, where the start node is a marking node, marking the start of the process and saving a piece of data to the process activity table; S6.3.2: Execute the next node. If the node is a business component, instantiate the Java class corresponding to this component, then use the process input parameter Map object as a parameter to call the execute method of this instance, and then save a piece of data to the process activity table; if it is an exclusive gateway, use the Java expression engine to calculate the expression on each call line, and execute the components connected by the line with a true result. If there are multiple true results, an error is reported, and finally a piece of data is saved to the process activity table; if it is a parallel gateway, encapsulate the components connected by each line of this gateway and the process input parameter Map into a Java thread object and submit it to the thread pool for execution, and then save a piece of data to the process activity table; if it is a merge gateway, the main thread waits, and after each parallel task is executed, wake up the main thread to continue execution, and then save a piece of data to the process activity table; if it is a sub-process component, the configured sub-process number and process input parameter Map are used as parameters. The process engine is called again to execute this sub-process, and then a piece of data is saved to the process activity table; if it is a rule engine component, the Drools rule engine is called to execute the Drools rule text configured by this component, and then a piece of data is saved to the process activity table; if it is a dynamic Java component, the FreeMarker template engine is called to convert the Java fragment configured by this component into a complete Java class, and then the ECJ compiler is called to compile this class, and then it is loaded into the JVM and instantiated through the class loading technology, and finally this instance is called with the process input parameter Map object as a parameter, and after execution, a piece of data is saved to the process activity table; if it is a scheduled task component, the timing expression is parsed, the task execution class is instantiated, and then the time wheel algorithm is applied to schedule this instance with the process input parameter Map as a parameter, and a piece of data is saved to the process activity table; if it is an end node, a piece of data is saved to the process activity table to mark the end of the process execution.

8. A device for arranging a business execution process, characterized in that: include: Business process establishment module, used to establish business processes; The business process decomposition module is used to decompose the business process into multiple independent and reusable business logic execution units, and to establish a component template for each business logic execution unit. A business component creation module, used to create a business component based on the component template; A business process diagram construction module, used to construct a business process diagram based on business components and system components, wherein the business process diagram is used to implement business process logic; The business process diagram parsing module is used to parse the business process diagram into business process diagram metadata and save it to the database, and publish the business process diagram to the process engine service; The business logic processing module is used to generate a process instance by calling the metadata corresponding to the business process diagram through the process engine service when conducting a transaction, so as to complete the business logic processing by executing each component in sequence according to the order of components drawn in the business process diagram through the process instance.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the program implements the method for arranging a business execution process as described in any one of claims 1 to 7.

10. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method for orchestrating the business execution process as described in any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Industrial automation process export and reconstruction method and electronic equipment

    CN120029669A

  • Enterprise personalized business configuration method based on SaaS service, equipment and medium

    CN120216055A