A workflow processing method, client, server and workflow engine

Through the collaborative work between the client and the server, the problem of distributed transactions in the existing workflow engine is solved, the workflow processing efficiency is improved, and business services are more independent and easy to scale.

CN113722298BActive Publication Date: 2025-02-21BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111081750.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-15
Publication Date
2025-02-21
Estimated Expiration
2041-09-15

AI Technical Summary

Technical Problem

Existing workflow engines cannot avoid the problem of distributed transactions, which affects the processing efficiency of workflows.

Method used

Through the collaborative work of the client and the server, the client obtains process dynamic data and user parameters from the business database, calls the server interface, the server obtains process static data from the target database, calculates and returns the ID corresponding to the process instance, and the client will The ID is stored in the business database.

Benefits of technology

It effectively prevents the problem of distributed transactions during workflow processing, improves the processing efficiency of workflows, and makes business services more independent through loosely coupled design, which is conducive to expansion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113722298B_ABST
    Figure CN113722298B_ABST
Patent Text Reader

Abstract

The present application discloses a workflow processing method, a client, a server, and a workflow engine, which can be applied to the fields of big data and finance. When the client receives a service request sent by a business service, it obtains the process dynamic data and user parameters corresponding to the service request from the business database. The client calls the preset server interface and sends the process dynamic data and user parameters to the server. The client stores the ID corresponding to the process instance sent by the server in the business database. The server obtains the process static data corresponding to the user parameters from the target database. The server calculates the ID corresponding to the process instance based on the process static data, and sends the ID corresponding to the process instance to the client. Using the scheme shown in the present application, the process static data is stored in the target database, and the process dynamic data is stored in the business database, which can effectively prevent the problem of distributed transactions in the workflow processing process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of big data, and in particular to a workflow processing method, a client, a server, and a workflow engine. Background Art

[0002] Currently, many data systems involve business process activities, such as the approval process of a loan, the management process of a file, etc. In order to improve the productivity of people and organizations, control risks, reduce process operation costs, and improve efficiency, workflow engines came into being.

[0003] Currently, business services design each process of the workflow in advance in the workflow engine, and call the interface provided by the workflow engine to run each process. However, the existing workflow engine cannot avoid the problem of distributed transactions, which affects the processing efficiency of the workflow. Summary of the invention

[0004] The present application provides a workflow processing method, a client, a server and a workflow engine, the purpose of which is to prevent the problem of distributed transactions from occurring during workflow processing.

[0005] In order to achieve the above objectives, this application provides the following technical solutions:

[0006] A workflow processing method, applied to a client, comprising:

[0007] When receiving a service request sent by a business service based on a business process flow, obtaining process dynamic data and user parameters corresponding to the service request from a business database; wherein the business database is a database deployed in the business service; and the process dynamic data includes a process instance;

[0008] Calling a preset server interface to send the process dynamic data and the user parameters to the server;

[0009] Receiving a feedback result sent by the server based on the process dynamic data and the user parameter; the feedback result includes an ID corresponding to the process instance;

[0010] The ID corresponding to the process instance is stored in the business database.

[0011] Optionally, the process dynamic data further includes process tasks; the feedback result further includes an execution node corresponding to the process task;

[0012] The storing the ID corresponding to the process instance in the business database includes:

[0013] The ID corresponding to the process instance and the execution node corresponding to the process task are stored in the business database.

[0014] A workflow processing method, applied to a server, comprising:

[0015] Receiving process dynamic data and user parameters sent by a client; wherein the process dynamic data includes a process instance;

[0016] Acquire process static data corresponding to the user parameters from a target database; the target database is a database deployed on the server; the process static data includes a process template, a process node and a process branch table;

[0017] Calculate an ID corresponding to the process instance according to the process template, the process node and the process branch table;

[0018] The ID corresponding to the process instance is sent to the client.

[0019] Optionally, the process dynamic data also includes process tasks;

[0020] The step of calculating an ID corresponding to the process instance based on the process template, the process node and the process branch table includes:

[0021] According to the process template, the process node and the process branch table, an ID corresponding to the process instance and an execution node corresponding to the process task are calculated.

[0022] Optionally, sending the ID corresponding to the process instance to the client includes:

[0023] The ID corresponding to the process instance and the execution node corresponding to the process task are sent to the client.

[0024] A client, comprising:

[0025] An acquisition unit, configured to acquire process dynamic data and user parameters corresponding to a service request from a business database when receiving a service request sent by a business service based on a business processing flow; wherein the business database is a database deployed in the business service; and the process dynamic data includes a process instance;

[0026] A sending unit, used to call a preset server interface and send the process dynamic data and the user parameters to the server;

[0027] A receiving unit, configured to receive a feedback result sent by the server based on the process dynamic data and the user parameter; the feedback result includes an ID corresponding to the process instance;

[0028] The storage unit is used to store the ID corresponding to the process instance in the business database.

[0029] Optionally, the process dynamic data further includes process tasks; the feedback result further includes an execution node corresponding to the process task;

[0030] The storage unit is specifically used for:

[0031] The ID corresponding to the process instance and the execution node corresponding to the process task are stored in the business database.

[0032] A server includes:

[0033] A receiving unit, configured to receive process dynamic data and user parameters sent by a client; wherein the process dynamic data includes a process instance;

[0034] An acquisition unit, configured to acquire process static data corresponding to the user parameters from a target database; the target database is a database deployed on the server; the process static data includes a process template, a process node, and a process branch table;

[0035] A calculation unit, configured to calculate an ID corresponding to the process instance according to the process template, the process node and the process branch table;

[0036] The sending unit is used to send the ID corresponding to the process instance to the client.

[0037] Optionally, the process dynamic data also includes process tasks;

[0038] The computing unit is specifically used for:

[0039] According to the process template, the process node and the process branch table, an ID corresponding to the process instance and an execution node corresponding to the process task are calculated.

[0040] A workflow engine, comprising:

[0041] Client and server;

[0042] The client is used to: upon receiving a service request sent by a business service based on a business processing flow, obtain process dynamic data and user parameters corresponding to the service request from a business database; wherein the business database is a database deployed in the business service; the process dynamic data includes a process instance; call a preset server interface to send the process dynamic data and the user parameters to the server; store the ID corresponding to the process instance sent by the server in the business database;

[0043] The server is used to: obtain process static data corresponding to the user parameters from a target database; the target database is a database deployed on the server; the process static data includes a process template, a process node and a process branch table; based on the process template, the process node and the process branch table, calculate the ID corresponding to the process instance; and send the ID corresponding to the process instance to the client.

[0044] The technical solution provided by the present application is that when the client receives a service request sent by the business service based on the business processing flow, it obtains the process dynamic data and user parameters corresponding to the service request from the business database, wherein the business database is a database deployed in the business service, and the process dynamic data includes the process instance. The client calls the preset server interface and sends the process dynamic data and user parameters to the server. The client stores the ID corresponding to the process instance sent by the server in the business database. The server obtains the process static data corresponding to the user parameters from the target database, which is a database deployed on the server. The process static data includes the process template, process node and process branch table. The server calculates the ID corresponding to the process instance based on the process template, process node and process branch table. The server sends the ID corresponding to the process instance to the client. Using the solution shown in the present application, the process static data is stored in the target database, and the process dynamic data is stored in the business database, which can effectively prevent the problem of distributed transactions in the workflow processing process. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0046] Figure 1a A schematic diagram of the architecture of a workflow engine provided in an embodiment of the present application;

[0047] Figure 1b A schematic diagram of a workflow engine processing a workflow provided in an embodiment of the present application;

[0048] Figure 1c A schematic diagram of another workflow engine processing workflow provided in an embodiment of the present application;

[0049] Figure 2 A schematic diagram of a workflow processing method provided in an embodiment of the present application;

[0050] Figure 3 A schematic diagram of another workflow processing method provided in an embodiment of the present application;

[0051] Figure 4 A schematic diagram of the architecture of a client provided in an embodiment of the present application;

[0052] Figure 5 A schematic diagram of the architecture of a server provided in an embodiment of the present application. DETAILED DESCRIPTION

[0053] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0054] like Figure 1a As shown, it is a schematic diagram of the architecture of a workflow engine provided in an embodiment of the present application, including:

[0055] Client 100 and server 200.

[0056] Among them, the client 100 is deployed in the business service, and is used to send service requests to the server 200, update the status information of the process instance, and store the status information of the process instance in the business service. As a separate stateless microservice, the server 200 only provides process node query services and the function of generating an ID corresponding to the process instance. In an embodiment of the present application, the dynamic data of the process (such as process instances, process tasks) is stored in the business service, and the static data of the process (such as process templates, process nodes, process branch tables, etc.) is stored in the server 200.

[0057] It should be noted that the specific process of using the workflow engine to process the workflow, such as Figure 1b As shown, the following steps are included:

[0058] S101: When receiving a service request sent by a business service based on a business process flow, the client obtains process dynamic data and user parameters corresponding to the service request from a business database.

[0059] The business database is a database deployed in the business service, and the service request includes but is not limited to a process initiation request, a process node completion request, and a process node jump request. In addition, the process dynamic data is obtained by the business service performing business processing based on the request instruction sent by the user.

[0060] It should be noted that after receiving the request instruction sent by the user, the business service executes the business processing flow corresponding to the request instruction and obtains business information (business information includes process dynamic data and user parameters). After saving the business information in the business database, the business service will call the preset client interface and send a service request to the client.

[0061] S102: The client calls a preset server interface and sends process dynamic data and user parameters to the server.

[0062] S103: The server obtains process static data corresponding to the user parameters from the target database.

[0063] The target database is the database deployed in the server. In addition, the process static data includes process templates, process nodes and process branch tables.

[0064] S104: The server calculates the ID corresponding to the process instance and the execution node corresponding to the process task based on the process template, the process node and the process branch table.

[0065] S105: The server sends the ID corresponding to the process instance and the execution node corresponding to the process task to the client.

[0066] S106: The client stores the ID corresponding to the process instance and the execution node corresponding to the process task in the business database.

[0067] It should be noted that Figure 1b The interaction process shown can be seen in Figure 1c The application scenario shown.

[0068] Based on the above process shown in S101-S106, when the business service uses the workflow engine to run the business process, because the workflow engine includes a server and a client, the process static data is stored on the server, and the process dynamic data is stored in the business service. Because the server does not save any process operation related data, it only involves the local transaction of the business service, avoiding the problem of global distributed transactions, and only involves the local transaction of the business service, ensuring the consistency of global data, and through the loose coupling design, the business service is more independent and conducive to expansion.

[0069] In summary, by using the solution shown in this embodiment, the static data of the process is stored in the target database, and the dynamic data of the process is stored in the business database, which can effectively prevent the problem of distributed transactions from occurring during the workflow processing.

[0070] like Figure 2 FIG. 1 is a schematic diagram of a workflow processing method provided in an embodiment of the present application, which is applied to a client and includes the following steps:

[0071] S201: When receiving a service request sent by a business service based on a business process flow, process dynamic data and user parameters corresponding to the service request are acquired from a business database.

[0072] Among them, the business database is the database deployed in the business service; the process dynamic data includes the process instance.

[0073] S202: Calling a preset server interface to send process dynamic data and user parameters to the server.

[0074] S203: receiving feedback results sent by the server based on process dynamic data and user parameters.

[0075] The feedback result includes an ID corresponding to the process instance.

[0076] S204: Store the ID corresponding to the process instance in the business database.

[0077] In summary, by using the solution shown in this embodiment, the static data of the process is stored in the target database, and the dynamic data of the process is stored in the business database, which can effectively prevent the problem of distributed transactions from occurring during the workflow processing.

[0078] like Figure 3 FIG. 1 is a schematic diagram of another workflow processing method provided in an embodiment of the present application, which is applied to a server and includes the following steps:

[0079] S301: Receive process dynamic data and user parameters sent by the client.

[0080] Among them, process dynamic data includes process instances.

[0081] S302: Acquire process static data corresponding to the user parameters from the target database.

[0082] Among them, the target database is the database deployed on the server; the process static data includes process templates, process nodes and process branch tables.

[0083] S303: Calculate the ID corresponding to the process instance based on the process template, process node and process branch table.

[0084] S304: Send the ID corresponding to the process instance to the client.

[0085] In summary, by using the solution shown in this embodiment, the static data of the process is stored in the target database, and the dynamic data of the process is stored in the business database, which can effectively prevent the problem of distributed transactions from occurring during the workflow processing.

[0086] It should be noted that the workflow processing method provided by the present invention can be used in the field of big data. The above is only an example and does not limit the application field of the workflow processing method provided by the present invention.

[0087] The workflow processing method provided by the present invention can be used in the financial field or other fields, for example, it can be used in the financial data processing application scenario in the financial field. Other fields are any fields other than the financial field, for example, the field of the Internet of Things. The above is only an example and does not limit the application field of the workflow processing method provided by the present invention.

[0088] Corresponding to the workflow processing method provided in the above-mentioned embodiment of the present application, the embodiment of the present application also provides a client and a server.

[0089] like Figure 4 As shown, it is a schematic diagram of the architecture of a client provided in an embodiment of the present application, including:

[0090] The acquisition unit 401 is used to acquire process dynamic data and user parameters corresponding to the service request from the business database when receiving a service request sent by the business service based on the business processing flow; wherein the business database is a database deployed in the business service; the process dynamic data includes process instances.

[0091] Among them, process dynamic data also includes process tasks.

[0092] The sending unit 402 is used to call a preset server interface and send process dynamic data and user parameters to the server.

[0093] The receiving unit 403 is used to receive the feedback result sent by the server based on the process dynamic data and user parameters; the feedback result includes the ID corresponding to the process instance.

[0094] The feedback result also includes the execution node corresponding to the process task.

[0095] The storage unit 404 is used to store the ID corresponding to the process instance in the business database.

[0096] The storage unit 404 is specifically used to store the ID corresponding to the process instance and the execution node corresponding to the process task in the business database.

[0097] In summary, by using the solution shown in this embodiment, the static data of the process is stored in the target database, and the dynamic data of the process is stored in the business database, which can effectively prevent the problem of distributed transactions from occurring during the workflow processing.

[0098] like Figure 5 As shown, it is a schematic diagram of the architecture of a server provided in an embodiment of the present application, including:

[0099] The receiving unit 501 is used to receive process dynamic data and user parameters sent by the client; wherein the process dynamic data includes a process instance.

[0100] Among them, process dynamic data also includes process tasks.

[0101] The acquisition unit 502 is used to acquire process static data corresponding to the user parameters from the target database; the target database is a database deployed on the server; the process static data includes a process template, a process node and a process branch table.

[0102] The calculation unit 503 is used to calculate the ID corresponding to the process instance according to the process template, the process node and the process branch table.

[0103] The calculation unit 503 is specifically used to calculate the ID corresponding to the process instance and the execution node corresponding to the process task according to the process template, the process node and the process branch table.

[0104] The sending unit 504 is used to send the ID corresponding to the process instance to the client.

[0105] The sending unit 504 is specifically used to send the ID corresponding to the process instance and the execution node corresponding to the process task to the client.

[0106] In summary, by using the solution shown in this embodiment, the static data of the process is stored in the target database, and the dynamic data of the process is stored in the business database, which can effectively prevent the problem of distributed transactions from occurring during the workflow processing.

[0107] If the functions described in the method of the embodiment of the present application are implemented in the form of a software functional unit and sold or used as an independent product, they can be stored in a storage medium readable by a computing device. Based on this understanding, the part of the embodiment of the present application that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computing device (which can be a personal computer, a server, a mobile computing device or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a disk or an optical disk.

[0108] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0109] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A workflow processing method, characterized in that: Applied to the client, including: When receiving a service request sent by a business service based on a business process flow, obtaining process dynamic data and user parameters corresponding to the service request from a business database; wherein the business database is a database deployed in the business service; and the process dynamic data includes a process instance; Calling a preset server interface to send the process dynamic data and the user parameters to the server; the server is pre-deployed with a target database, and the target database is used to store process static data; the process static data includes data that will not affect the operation of the business processing process; Receiving a feedback result sent by the server based on the process dynamic data and the user parameters; the feedback result includes an ID corresponding to the process instance; the ID is determined based on the process static data; The ID corresponding to the process instance is stored in the business database.

2. The method according to claim 1, characterized in that The process dynamic data also includes process tasks; the feedback result also includes execution nodes corresponding to the process tasks; The storing the ID corresponding to the process instance in the business database includes: The ID corresponding to the process instance and the execution node corresponding to the process task are stored in the business database.

3. A workflow processing method, characterized in that: Applied to the server, including: Receiving process dynamic data and user parameters sent by a client; wherein the process dynamic data includes a process instance; the process dynamic data is obtained by the client from a business database of a business service; Acquire process static data corresponding to the user parameters from a target database; the target database is a database deployed on the server; the process static data includes a process template, a process node and a process branch table, and the process template, the process node and the process branch table will not affect the operation of the business processing process; Calculate an ID corresponding to the process instance according to the process template, the process node and the process branch table; The ID corresponding to the process instance is sent to the client.

4. The method according to claim 3, characterized in that: The process dynamic data also includes process tasks; The step of calculating an ID corresponding to the process instance based on the process template, the process node and the process branch table includes: According to the process template, the process node and the process branch table, an ID corresponding to the process instance and an execution node corresponding to the process task are calculated.

5. The method according to claim 4, characterized in that The sending the ID corresponding to the process instance to the client includes: The ID corresponding to the process instance and the execution node corresponding to the process task are sent to the client.

6. A client, characterized in that: include: An acquisition unit, configured to acquire process dynamic data and user parameters corresponding to a service request from a business database when receiving a service request sent by a business service based on a business processing flow; wherein the business database is a database deployed in the business service; and the process dynamic data includes a process instance; A sending unit, used to call a preset server interface and send the process dynamic data and the user parameters to the server; the server is pre-deployed with a target database, and the target database is used to store process static data; the process static data includes data that will not affect the operation of the business processing process; A receiving unit, configured to receive a feedback result sent by the server based on the process dynamic data and the user parameter; the feedback result includes an ID corresponding to the process instance; the ID is determined based on the process static data; The storage unit is used to store the ID corresponding to the process instance in the business database.

7. The client according to claim 6, characterized in that: The process dynamic data also includes process tasks; the feedback result also includes execution nodes corresponding to the process tasks; The storage unit is specifically used for: The ID corresponding to the process instance and the execution node corresponding to the process task are stored in the business database.

8. A server, characterized in that: include: A receiving unit, configured to receive process dynamic data and user parameters sent by a client; wherein the process dynamic data includes a process instance; and the process dynamic data is obtained by the client from a business database of a business service; An acquisition unit, configured to acquire process static data corresponding to the user parameters from a target database; the target database is a database deployed on the server; the process static data includes a process template, a process node, and a process branch table, and the process template, the process node, and the process branch table will not affect the operation of the business processing process; A calculation unit, configured to calculate an ID corresponding to the process instance according to the process template, the process node and the process branch table; The sending unit is used to send the ID corresponding to the process instance to the client.

9. The server according to claim 8, characterized in that: The process dynamic data also includes process tasks; The computing unit is specifically used for: According to the process template, the process node and the process branch table, an ID corresponding to the process instance and an execution node corresponding to the process task are calculated.

10. A workflow engine, characterized in that: include: Client and server; The client is used to: upon receiving a service request sent by a business service based on a business processing flow, obtain process dynamic data and user parameters corresponding to the service request from a business database; wherein the business database is a database deployed in the business service; the process dynamic data includes a process instance; call a preset server interface to send the process dynamic data and the user parameters to the server; store the ID corresponding to the process instance sent by the server in the business database; The server is used to: obtain process static data corresponding to the user parameters from a target database; the target database is a database deployed on the server; the process static data includes a process template, a process node and a process branch table, and the process template, the process node and the process branch table will not affect the operation of the business processing flow; based on the process template, the process node and the process branch table, calculate the ID corresponding to the process instance; and send the ID corresponding to the process instance to the client.

Citation Information

Patent Citations

  • Cloud computing network workflow processing method, device and system based on domain model

    CN102542367A

  • Data processing system, method, electronic equipment and storage medium

    CN108833517A