Method, device and equipment for dynamically creating sub-process instances of workflow engine

By dynamically calculating the number of subprocess instances in the workflow engine, the problem of static configuration of the number of subprocess instances in the prior art is solved, and higher flexibility and adaptability are achieved, and suitable for complex business scenarios.

CN119576496APending Publication Date: 2025-03-07CHINA CONSTRUCTION BANK +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411656650.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-19
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

The existing workflow engine has staticity in the configuration of the number of subprocess instances, which is difficult to meet the dynamic business needs and has poor flexibility.

Method used

When the workflow engine runs to the subprocess call activity, it is determined whether it is allowed to dynamically create a subprocess instance based on the parameter value of the target parameter in the subscription function. If allowed, the process variable value set is read from the subprocess split configuration information, calculate the Cartesian product of the business variable value set, and modify the number of combinations of the configuration item cardinal of the subprocess call activity to the Cartesian product to dynamically create a subprocess instance.

Benefits of technology

It improves the flexibility of creating subprocess instances for workflow engines, and can dynamically adjust the number of subprocess instances according to business needs to meet the needs of complex scenarios, while avoiding the problem of repeatedly creating subprocess instances.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119576496A_ABST
    Figure CN119576496A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of automatic programming, and provides a method, a device and equipment for dynamically creating a sub-process instance of a workflow engine, and the method comprises the following steps: when the workflow engine runs to a sub-process calling activity, identifying whether the sub-process instance is allowed to be dynamically created or not according to a parameter value of a target parameter in a subscription function; if so, reading a flow variable value set of each sub-flow of the workflow engine from the sub-flow splitting configuration information; determining a business variable value set corresponding to each process variable value set; calculating a Cartesian product of the business variable value set; modifying a configuration item cardinal number of a sub-process calling activity of the workflow engine into a combined number of Cartesian products; starting a sub-process instance of the workflow engine according to the modified configuration item cardinal number; and modifying a sub-process starting mark in the sub-process starting event to be started. Through the embodiment of the invention, the creation flexibility of the sub-process instance of the workflow engine can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of automatic programming technology, and in particular to a method, device and equipment for dynamically creating a sub-process instance of a workflow engine. Background Art

[0002] A workflow engine is a software system middleware used to automate and manage workflows in business processes. It coordinates and executes a series of tasks to ensure that work proceeds smoothly according to predetermined rules and process logic, thereby improving work efficiency, reducing errors, and enhancing the visibility and controllability of business processes.

[0003] The definition of the main and sub-processes of the workflow engine can be completed through the process designer. Among them, the number of sub-process instances created is generally completed through the cardinality configuration option of the process designer, that is, the configuration of this number must be completed when the workflow is defined, which is a static configuration item. For example, the workflow engine developed based on the Business Process Model and Notation (BPMN) standard specification uses a static configuration item to define the number of sub-process instances. However, this statically configured number of sub-process instances may be difficult to meet the dynamic needs of the business and has poor flexibility. Summary of the invention

[0004] The purpose of the embodiments of this specification is to provide a method, apparatus and device for dynamically creating a sub-process instance of a workflow engine, so as to improve the flexibility of creating a sub-process instance of a workflow engine.

[0005] To achieve the above objectives, on the one hand, an embodiment of this specification provides a method for dynamically creating a sub-process instance of a workflow engine, comprising:

[0006] When the workflow engine runs to the sub-process call activity, it identifies whether to allow dynamic creation of sub-process instances based on the parameter value of the target parameter in the subscription function;

[0007] In response to allowing dynamic creation of sub-process instances, a process variable value set of each sub-process of the workflow engine is read from the sub-process splitting configuration information; the unique key of each process variable in the process variable value set is represented by a sequential combination of a business variable name and a fixed string;

[0008] Deleting the fixed character string of the unique key of each process variable in each of the process variable value sets, and obtaining the business variable value set corresponding to each of the process variable value sets;

[0009] Calculating the Cartesian product of the business variable value set;

[0010] Modify the cardinality of the configuration items of the sub-process calling activity of the workflow engine to the number of combinations of the Cartesian product;

[0011] Opening a sub-process instance of the workflow engine according to the modified configuration item cardinality;

[0012] Modify the sub-process start flag in the predefined sub-process start event to started to avoid duplicate creation of sub-process instances.

[0013] In the method for dynamically creating a sub-process instance of a workflow engine in an embodiment of this specification, the step of identifying whether to allow dynamic creation of a sub-process instance according to the parameter value of a target parameter in a subscription function includes:

[0014] According to the dynamic creation switch flag bit of the sub-process start parameter whose event type in the subscription function is identified, whether dynamic creation of the sub-process instance is allowed; the value of the dynamic creation switch flag bit is on or off.

[0015] In the method for dynamically creating a sub-process instance of a workflow engine in the embodiment of this specification, the subscription function includes an onEvent function.

[0016] In the method for dynamically creating a sub-process instance of a workflow engine in an embodiment of this specification, the calculation of the Cartesian product of the business variable value set includes:

[0017] Calculate the Cartesian product of the business variable value set according to the formula S=F1*F2*…*Fn;

[0018] Among them, S is the Cartesian product, F1 is the business variable value set of the first sub-process, F2 is the business variable value set of the second sub-process, Fn is the business variable value set of the nth sub-process, and n is the number of sub-processes of the workflow engine.

[0019] In the method for dynamically creating sub-process instances of the workflow engine of the embodiment of this specification, the unique key of each process variable in the process variable value set is represented by a combination of a business variable name and a fixed prefix; different sub-processes correspond to different business variable names, and different sub-processes correspond to different fixed prefixes.

[0020] In the method for dynamically creating a sub-process instance of a workflow engine in an embodiment of this specification, deleting the fixed string of the unique key of each process variable in each process variable value set includes:

[0021] A fixed prefix of the unique key of each process variable in each of the process variable value sets is deleted.

[0022] In the method for dynamically creating sub-process instances of the workflow engine of the embodiment of this specification, the unique key of each process variable in the process variable value set is represented by a combination of a business variable name and a fixed suffix; different sub-processes correspond to different business variable names, and different sub-processes correspond to different fixed suffixes.

[0023] In the method for dynamically creating a sub-process instance of a workflow engine in an embodiment of this specification, deleting the fixed string of the unique key of each process variable in each process variable value set includes:

[0024] The fixed suffix of the unique key of each process variable in each of the process variable value sets is deleted.

[0025] On the other hand, the embodiment of this specification also provides a sub-process instance dynamic creation device of a workflow engine, including:

[0026] An identification module, used for identifying whether to allow dynamic creation of a sub-process instance according to a parameter value of a target parameter in a subscription function when the workflow engine runs to a sub-process call activity;

[0027] A reading module, configured to read a process variable value set of each sub-process of the workflow engine from the sub-process splitting configuration information in response to allowing dynamic creation of a sub-process instance; a unique key of each process variable in the process variable value set is represented by a sequential combination of a business variable name and a fixed string;

[0028] A deletion module, used to delete the fixed character string of the unique key of each process variable in each of the process variable value sets, and obtain a business variable value set corresponding to each of the process variable value sets;

[0029] A calculation module, used for calculating the Cartesian product of the business variable value set;

[0030] A first modification module, used to modify the cardinality of the configuration items of the sub-process calling activity of the workflow engine to the number of combinations of the Cartesian product;

[0031] An opening module, used to open a sub-process instance of the workflow engine according to the modified configuration item cardinality;

[0032] The second modification module is used to modify the sub-process start mark in the predefined sub-process start event to started, so as to avoid repeated creation of sub-process instances.

[0033] On the other hand, an embodiment of the present specification further provides a computer device, including a memory, a processor, and a computer program stored in the memory, wherein when the computer program is executed by the processor, the instructions of the above method are executed.

[0034] On the other hand, an embodiment of the present specification further provides a computer storage medium on which a computer program is stored. When the computer program is executed by a processor of a computer device, the instructions of the above method are executed.

[0035] On the other hand, an embodiment of the present specification further provides a computer program product, wherein the computer program product includes a computer program, and when the computer program is executed by a processor of a computer device, the computer program executes instructions of the above method.

[0036] It can be seen from the technical solution provided by the above embodiments of this specification that the embodiments of this specification can associate process variables with business variables in advance by configuring sub-process splitting configuration information; when the workflow engine runs to the sub-process call activity, it identifies whether dynamic creation of sub-process instances is allowed based on the parameter value of the target parameter in the subscription function; if creation is allowed, the process variables can be read from the sub-process splitting configuration information, and then the business variables can be obtained based on the process variables, the Cartesian product of the business variables can be calculated, and the configuration item cardinality of the sub-process call activity of the workflow engine can be modified to the number of combinations of the Cartesian product, that is, the number of combinations of the Cartesian product is used as the number of sub-process instances and enabled; in this way, on-demand dynamic creation of sub-process instances and their numbers is realized, instead of directly and statically writing the number of sub-process instances as in the prior art, thereby improving the flexibility of creating sub-process instances, and thus providing strong support for complex scenarios such as connecting different processes in multiple fields.

[0037] In addition, since the unique key of each process variable in the process variable value set is represented by a sequential combination of the business variable name and a fixed string, the business variable value set corresponding to each process variable value set can be easily obtained by deleting the fixed string of the unique key of each process variable in each process variable value set. On this basis, by taking the number of combinations of the Cartesian product of the business variable value set as the number of sub-process instances, full coverage of various business scenarios can be effectively guaranteed. Moreover, by modifying the sub-process start mark in the sub-process start event to started, repeated creation of sub-process instances can be avoided, thereby achieving neither missing nor repeated creation of sub-process instances. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions in the embodiments of this specification or the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art description. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor. In the drawings:

[0039] Figure 1A schematic diagram showing the structure of a sub-process instance dynamic creation system of a workflow engine in some embodiments of this specification;

[0040] Figure 2 A schematic diagram showing a server in some embodiments of this specification;

[0041] Figure 3 A flowchart showing a method for dynamically creating a sub-process instance of a workflow engine in some embodiments of this specification is shown;

[0042] Figure 4 A schematic diagram of an application environment of a sub-process interceptor in an exemplary embodiment of this specification is shown;

[0043] Figure 5 A structural block diagram of a device for dynamically creating a sub-process instance of a workflow engine in some embodiments of this specification is shown;

[0044] Figure 6 The structure block diagram of the computer device in some embodiments of the present specification is shown.

[0045] [Description of Reference Numerals]

[0046] 10. User end;

[0047] 20. Server;

[0048] 51. Identification module;

[0049] 52. Reading module;

[0050] 53. Delete module;

[0051] 54. Calculation module;

[0052] 55. The first modification module;

[0053] 56. Open the module;

[0054] 57. Second modification module;

[0055] 602. Computer equipment;

[0056] 604, processor;

[0057] 606. Memory;

[0058] 608, driving mechanism;

[0059] 610, input / output interface;

[0060] 612. Input devices;

[0061] 614. Output devices;

[0062] 616. Presentation equipment;

[0063] 618. Graphical user interface;

[0064] 620, network interface;

[0065] 622, communication link;

[0066] 624. Communication bus. DETAILED DESCRIPTION

[0067] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.

[0068] It should be noted that in the embodiments of this specification, the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved are all information and data authorized by the user and fully authorized by all parties, that is, the acquisition, transmission, storage, use, and processing of data in the technical solution of this application comply with the relevant provisions of national laws and regulations.

[0069] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.

[0070] Figure 1, a schematic diagram of an application environment in some embodiments of the present specification is shown; the application environment includes a user terminal 10 and a server terminal 20. The user can configure the sub-process splitting configuration information through the user terminal 10, and provide the configured sub-process splitting configuration information to the server terminal 20. The server terminal 20 can identify whether to allow the dynamic creation of sub-process instances according to the parameter value of the target parameter in the subscription function when the workflow engine runs to the sub-process call activity; in response to allowing the dynamic creation of sub-process instances, read the process variable value set of each sub-process of the workflow engine from the sub-process splitting configuration information; the unique key of each process variable in the process variable value set is represented by a sequential combination of a business variable name and a fixed string; delete the fixed string of the unique key of each process variable in each process variable value set, and obtain the business variable value set corresponding to each process variable value set; calculate the Cartesian product of the business variable value set; modify the configuration item cardinality of the sub-process call activity of the workflow engine to the number of combinations of the Cartesian product; start the sub-process instance of the workflow engine according to the modified configuration item cardinality; modify the sub-process start mark in the predefined sub-process start event to started, so as to avoid repeated creation of sub-process instances. The embodiments of this specification can improve the flexibility of creating sub-process instances of the workflow engine, and can also ensure full coverage of various business scenarios under the sub-process; in addition, by using the number of combinations of Cartesian products as the number of sub-process instances, it can also ensure full coverage of various business scenarios and avoid repeated creation of sub-process instances.

[0071] In some embodiments of the present specification, the user terminal 10 may be a mobile terminal (i.e., a smart phone), a display, a desktop computer, a tablet computer, a laptop computer, etc. Of course, the user terminal 10 is not limited to the above-mentioned electronic devices with a certain entity, and it may also be software running in the above-mentioned electronic devices.

[0072] In some embodiments of the present specification, the server 20 may be an electronic device with computing and network interaction functions; or it may be software running in the electronic device to provide business logic for data processing and network interaction. Figure 2 As shown, in some embodiments of the present specification, the server 20 may be a global event listener of the workflow engine. Specifically, the server 20 may be a sub-process interceptor added to the global event listener of the workflow engine.

[0073] The embodiment of this specification provides a method for dynamically creating a sub-process instance of a workflow engine, which can be applied to the above-mentioned server side, referring to Figure 3 As shown, in some embodiments of this specification, the method for dynamically creating a sub-process instance of a workflow engine may include the following steps:

[0074] Step 301: When the workflow engine runs to the sub-process call activity, it identifies whether dynamic creation of a sub-process instance is allowed according to the parameter value of the target parameter in the subscription function.

[0075] Step 302: In response to allowing dynamic creation of sub-process instances, a process variable value set of each sub-process of the workflow engine is read from the sub-process splitting configuration information; the unique key of each process variable in the process variable value set is represented by a sequential combination of a business variable name and a fixed string.

[0076] Step 303: Delete the fixed character string of the unique key of each process variable in each of the process variable value sets, and obtain the business variable value set corresponding to each of the process variable value sets.

[0077] Step 304: Calculate the Cartesian product of the business variable value set.

[0078] Step 305: modify the cardinality of the configuration items of the sub-process calling activity of the workflow engine to the number of combinations of the Cartesian product.

[0079] Step 306: Start the sub-process instance of the workflow engine according to the modified configuration item cardinality.

[0080] Step 307: Modify the sub-process start flag in the predefined sub-process start event to started to avoid repeated creation of sub-process instances.

[0081] In the embodiments of the present specification, the process variables and business variables can be associated in advance by configuring the sub-process splitting configuration information; when the workflow engine runs to the sub-process call activity (Call Activity), it is determined whether dynamic creation of sub-process instances is allowed based on the parameter value of the target parameter in the subscription function; if creation is allowed, the process variables can be read from the sub-process splitting configuration information, and then the business variables can be obtained based on the process variables, the Cartesian product of the business variables can be calculated, and the cardinality (Cardinallity) of the configuration item of the sub-process call activity of the workflow engine can be modified to the number of combinations of the Cartesian product, that is, the number of combinations of the Cartesian product is used as the number of sub-process instances and enabled; in this way, the on-demand dynamic creation of sub-process instances and their numbers is realized, instead of directly and statically writing the number of sub-process instances as in the prior art, thereby improving the flexibility of creating sub-process instances, and thus providing strong support for complex scenarios such as connecting different processes in multiple fields.

[0082] In addition, since the unique key of each process variable in the process variable value set is represented by a sequential combination of the business variable name and a fixed string, the business variable value set corresponding to each process variable value set can be easily obtained by deleting the fixed string of the unique key of each process variable in each process variable value set. On this basis, by taking the number of combinations of the Cartesian product of the business variable value set as the number of sub-process instances, full coverage of various business scenarios can be effectively guaranteed. Moreover, by modifying the sub-process start mark in the sub-process start event to started, repeated creation of sub-process instances can be avoided, thereby achieving neither missing nor repeated creation of sub-process instances.

[0083] In some embodiments of the present specification, the subscription function may be an onEvent function predefined by the user in the sub-process interceptor according to the needs, so as to provide the user with the function option of dynamically creating a sub-process instance, so as to facilitate the user to determine whether to dynamically define the sub-process instance according to the needs. In other embodiments of the present specification, the subscription function that provides the user with the function option of dynamically creating a sub-process instance may also be other subscription functions such as onEventMainThread function, onEventBackgroundThread function or onEventAsync function.

[0084] In some embodiments of the present specification, identifying whether to allow dynamic creation of sub-process instances according to the parameter value of the target parameter in the subscription function can be: identifying whether to allow dynamic creation of sub-process instances according to the dynamic creation switch flag of the sub-process startup parameter whose event type in the subscription function is the event type of the sub-process startup parameter can be on or off. For example, in an exemplary embodiment of the present specification, taking the onEvent function as an example, the event type in the subscription function can be: eventType==SUBPROCESS_STARTED; wherein D==OPEN or D==CLOSE; of course, it can also be represented by D==1 or D==0. If D==OPEN or D==1, it means that the dynamic creation function is enabled; if D==CLOSE or D==0, it means that the dynamic creation function is not enabled.

[0085] The sub-process call activity is also called a sub-process task, which is a special automated container task that includes the creation, startup, and scheduling management of sub-processes. In some embodiments of this specification, when the workflow engine runs to the sub-process call activity, the sub-process interceptor can execute Figure 3 The sub-process instance shown dynamically creates logic and starts the sub-process instance; and this branch of the main process (parent process) interrupts and waits for all sub-process instances to end, and then continues to execute the subsequent processes of the main process.

[0086] The sub-process split configuration information is the pre-configured basis for the sub-process split. In some embodiments of this specification, business variables and business variable sets can be defined first, and then process variables can be defined based on the business variables; wherein the unique key of the process variable can carry the business variable name. The process variable is the variable information on the node defined in the flowchart, and the corresponding data can be passed in through the code. The flowchart can determine which processing route to execute according to the preset conditions, and the scope of the process variable can be the process instance.

[0087] For example, define a business variable A, then the value set of A is: C = F(A) = {A1, A2, ..., An}, where n is a natural number greater than or equal to 1; define a business variable set Y = {A, B, ..., N} = {C(A), C(B), ..., C(N)}, max_size(Y) ≤ N, that is, the maximum number of sets does not exceed N. On this basis, the unique key of the process variable corresponding to the business variable can be defined; for example, the unique key of the process variable corresponding to the business variable A can be defined as: K(A) = P + A, where P is a fixed prefix (a fixed suffix can also be used in other embodiments), and A is the business variable name; that is, the unique key of the process variable can be represented by a combination of the business variable name and the fixed prefix. In this way, it is helpful to avoid duplication of the value of K(A). Since each sub-process can correspond to a business, different sub-processes can correspond to different business variable names, and different sub-processes can correspond to different fixed prefixes or fixed suffixes.

[0088] For example, if the name of business variable A is jjtc and the fixed prefix is ​​aaa, the unique key of the process variable corresponding to business variable A can be expressed as aaajjtc.

[0089] In some embodiments of the present specification, taking the unique key of a process variable represented by a combination of a business variable name and a fixed prefix as an example, determining the business variable value set corresponding to each of the process variable value sets may include: deleting the fixed prefix of the unique key of each process variable in each of the process variable value sets, and obtaining the business variable value set corresponding to each of the process variable value sets. For example, taking the above-mentioned process variable aaajjtc as an example, after deleting the fixed prefix aaa, the corresponding business variable jjtc can be obtained. For each process variable value set, by performing this operation on each of its process variables, the business variable value set corresponding to the process variable value set can be conveniently obtained.

[0090] In some embodiments of the present specification, the Cartesian product of the business variable value set can be calculated according to the formula S=F1*F2*…*Fn. Where S is the Cartesian product, F1 is the business variable value set of the first sub-process, F2 is the business variable value set of the second sub-process, Fn is the business variable value set of the nth sub-process, and n is the number of sub-processes of the workflow engine.

[0091] In some embodiments of the present specification, each sub-process may correspond to a business, and each business may have multiple business scenarios; since the Cartesian product can describe all possible combinations of elements between business variable value sets, by calculating the Cartesian product of the business variable value sets and using the number of combinations of the Cartesian product as the number of sub-process instances, full coverage of various business scenarios can be guaranteed.

[0092] For example, in an exemplary embodiment of the present specification, if the main process involves two sub-processes, and the business variable value sets of the two sub-processes are F1 = {a, b} and F2 = {c, d, e}, then the corresponding Cartesian product S = {(a, c), (a, d), (a, e), (b, c), (b, d), (b, e)} can be calculated according to the formula S = F1*F2 = {a, b}*{c, d, e}. Since the number of combinations of the Cartesian product S is 6, the Cardinallity of the Call Activity can be modified to 6.

[0093] In some embodiments of the present specification, a sub-process start event can be predefined in a sub-process interceptor to indicate the start status of the sub-process; after the sub-process instance of the workflow engine is started according to the modified configuration item base, the sub-process start flag in the predefined sub-process start event can be modified to started, thereby avoiding repeated creation of sub-process instances.

[0094] exist Figure 4 In the exemplary embodiment shown, the workflow engine includes a main process and a sub-process. The main process is the position adjustment application process, and the sub-process is the position adjustment approval confirmation sub-process. The main process can be initiated by a specific node (fund manager). When initiated, the fund manager can fill out a position adjustment application form and submit the application. The business form data filled out in the position adjustment application form can be written into the process variable. In this scenario, the business variable can be the business identifier corresponding to the position adjustment, and the process variable can be the group identifier corresponding to the position adjustment approval confirmation candidate group (for example, Figure 4Fund accounting in, fund accounting may include fund accounting A, fund accounting B, fund accounting C, etc.) + business identifier. On the basis of pre-configured process variables and setting sub-process interceptors; when the position adjustment main process runs to the position adjustment approval confirmation sub-process Call Activity, the sub-process interceptor starts to execute the sub-process instance dynamic creation logic of the workflow engine of the embodiment of this specification, and after the execution is completed, it opens X position adjustment approval confirmation sub-processes to realize position adjustment approval confirmation. After the position adjustment approval confirmation sub-process completes the position adjustment approval confirmation, the process can be returned to the position adjustment main process, and the subsequent processing logic of the position adjustment main process (for example Figure 4 "Send adjustment results" in the .

[0095] Although the process flows described above include multiple operations that occur in a particular order, it should be clearly understood that the processes may include more or fewer operations, which may be performed sequentially or in parallel (eg, using parallel processors or a multi-threaded environment).

[0096] Corresponding to the above-mentioned method for dynamically creating a sub-process instance of a workflow engine, the embodiment of this specification also provides a device for dynamically creating a sub-process instance of a workflow engine. The device for dynamically creating a sub-process instance of a workflow engine can be the above-mentioned sub-process interceptor, referring to Figure 5 As shown, in some embodiments of this specification, the sub-process instance dynamic creation device of the workflow engine may include:

[0097] The identification module 51 is used to identify whether to allow dynamic creation of a sub-process instance according to the parameter value of the target parameter in the subscription function when the workflow engine runs to the sub-process call activity;

[0098] A reading module 52 is used to read a process variable value set of each sub-process of the workflow engine from the sub-process splitting configuration information in response to allowing dynamic creation of a sub-process instance; the unique key of each process variable in the process variable value set is represented by a sequential combination of a business variable name and a fixed string;

[0099] A deleting module 53, used to delete the fixed character string of the unique key of each process variable in each of the process variable value sets, and obtain a business variable value set corresponding to each of the process variable value sets;

[0100] A calculation module 54, configured to calculate the Cartesian product of the business variable value set;

[0101] A first modification module 55, configured to modify the cardinality of the configuration items of the sub-process calling activity of the workflow engine to the number of combinations of the Cartesian product;

[0102] An opening module 56, used to open the sub-process instance of the workflow engine according to the modified configuration item cardinality;

[0103] The second modifying module 57 is used to modify the sub-process start flag in the predefined sub-process start event to be started, so as to avoid repeated creation of sub-process instances.

[0104] In the apparatus for dynamically creating a sub-process instance of a workflow engine in some embodiments of the present specification, the step of identifying whether to allow dynamic creation of a sub-process instance according to the parameter value of a target parameter in a subscription function includes:

[0105] According to the dynamic creation switch flag bit of the sub-process start parameter whose event type in the subscription function is identified, whether dynamic creation of the sub-process instance is allowed; the value of the dynamic creation switch flag bit is on or off.

[0106] In the sub-process instance dynamic creation device of the workflow engine of some embodiments of this specification, the subscription function includes an onEvent function.

[0107] In the apparatus for dynamically creating a sub-process instance of a workflow engine in some embodiments of this specification, the calculating of the Cartesian product of the business variable value set includes:

[0108] Calculate the Cartesian product of the business variable value set according to the formula S=F1*F2*…*Fn;

[0109] Among them, S is the Cartesian product, F1 is the business variable value set of the first sub-process, F2 is the business variable value set of the second sub-process, Fn is the business variable value set of the nth sub-process, and n is the number of sub-processes of the workflow engine.

[0110] In the sub-process instance dynamic creation device of the workflow engine of some embodiments of the present specification, the unique key of each process variable in the process variable value set is represented by a combination of a business variable name and a fixed prefix; different sub-processes correspond to different business variable names, and different sub-processes correspond to different fixed prefixes.

[0111] In the sub-process instance dynamic creation device of the workflow engine of some embodiments of this specification, the deleting of the fixed string of the unique key of each process variable in each process variable value set includes:

[0112] A fixed prefix of the unique key of each process variable in each of the process variable value sets is deleted.

[0113] In the sub-process instance dynamic creation device of the workflow engine of some embodiments of the present specification, the unique key of each process variable in the process variable value set is represented by a combination of a business variable name and a fixed suffix; different sub-processes correspond to different business variable names, and different sub-processes correspond to different fixed suffixes.

[0114] In the sub-process instance dynamic creation device of the workflow engine of some embodiments of this specification, the deleting of the fixed string of the unique key of each process variable in each process variable value set includes:

[0115] The fixed suffix of the unique key of each process variable in each of the process variable value sets is deleted.

[0116] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0117] The embodiments of this specification also provide a computer device. Figure 6 As shown, in some embodiments of the present specification, the computer device 602 may include one or more processors 604, such as one or more central processing units (CPUs) or graphics processing units (GPUs), and each processing unit may implement one or more hardware threads. The computer device 602 may also include any memory 606, which is used to store any kind of information such as code, settings, data, etc. In a specific embodiment, the computer program on the memory 606 and can be run on the processor 604, when the computer program is run by the processor 604, can execute the instructions of the sub-process instance dynamic creation method of the workflow engine described in any of the above embodiments. Non-limiting, for example, the memory 606 may include any one or more combinations of the following: any type of RAM, any type of ROM, flash memory device, hard disk, optical disk, etc. More generally, any memory can use any technology to store information. Further, any memory can provide volatile or non-volatile retention of information. Further, any memory can represent a fixed or removable component of the computer device 602. In one embodiment, when the processor 604 executes the associated instructions stored in any memory or combination of memories, the computer device 602 can perform any operation of the associated instructions. The computer device 602 also includes one or more drive mechanisms 608 for interacting with any memory, such as a hard disk drive mechanism, an optical disk drive mechanism, etc.

[0118] The computer device 602 may also include an input / output interface 610 (I / O) for receiving various inputs (via input devices 612) and for providing various outputs (via output devices 614). A specific output mechanism may include a presentation device 616 and an associated graphical user interface 618 (GUI). In other embodiments, the input / output interface 610 (I / O), input device 612, and output device 614 may not be included, and the computer device 602 may be used as a computer device in a network. The computer device 602 may also include one or more network interfaces 620 for exchanging data with other devices via one or more communication links 622. One or more communication buses 624 couple the components described above together.

[0119] The communication link 622 may be implemented in any manner, for example, through a local area network, a wide area network (e.g., the Internet), a point-to-point connection, etc., or any combination thereof. The communication link 622 may include any combination of hardwired links, wireless links, routers, gateway functions, name servers, etc. governed by any protocol or combination of protocols.

[0120] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), computer-readable storage media, and computer program products of some embodiments of the present specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes 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 processor to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processor 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.

[0121] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processor to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0122] These computer program instructions can also be loaded onto a computer or other programmable data processor so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0123] In a typical configuration, a computer device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0124] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0125] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computer device. As defined in this specification, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0126] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems or computer program products. Therefore, the embodiments of this specification may take the form of complete hardware embodiments, complete software embodiments or embodiments combining software and hardware. Moreover, the embodiments of this specification 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 codes.

[0127] The present specification embodiments may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present specification embodiments may also be practiced in distributed computing environments where tasks are performed by remote processors connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0128] It should also be understood that in the embodiments of this specification, the term "and / or" is only a description of the association relationship of the associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0129] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0130] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the embodiments of this specification. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0131] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims

1. A method for dynamically creating a sub-process instance of a workflow engine, characterized in that: include: When the workflow engine runs to the sub-process call activity, it identifies whether to allow dynamic creation of sub-process instances based on the parameter value of the target parameter in the subscription function; In response to allowing dynamic creation of sub-process instances, a process variable value set of each sub-process of the workflow engine is read from the sub-process splitting configuration information; the unique key of each process variable in the process variable value set is represented by a sequential combination of a business variable name and a fixed string; Deleting the fixed character string of the unique key of each process variable in each of the process variable value sets, and obtaining the business variable value set corresponding to each of the process variable value sets; Calculating the Cartesian product of the business variable value set; Modify the cardinality of the configuration items of the sub-process calling activity of the workflow engine to the number of combinations of the Cartesian product; Opening a sub-process instance of the workflow engine according to the modified configuration item cardinality; Modify the sub-process start flag in the predefined sub-process start event to started to avoid duplicate creation of sub-process instances.

2. The method for dynamically creating a sub-process instance of a workflow engine according to claim 1, characterized in that: The step of identifying whether to allow dynamic creation of a sub-process instance according to the parameter value of the target parameter in the subscription function includes: According to the dynamic creation switch flag bit of the sub-process start parameter whose event type in the subscription function is identified, whether the dynamic creation of the sub-process instance is allowed; the value of the dynamic creation switch flag bit is on or off.

3. The method for dynamically creating a sub-process instance of a workflow engine according to claim 2, characterized in that: The subscription function includes an onEvent function.

4. The method for dynamically creating a sub-process instance of a workflow engine according to claim 1, characterized in that: The calculating the Cartesian product of the business variable value set includes: Calculate the Cartesian product of the business variable value set according to the formula S=F1*F2*…*Fn; Among them, S is the Cartesian product, F1 is the business variable value set of the first sub-process, F2 is the business variable value set of the second sub-process, Fn is the business variable value set of the nth sub-process, and n is the number of sub-processes of the workflow engine.

5. The method for dynamically creating a sub-process instance of a workflow engine according to claim 1, characterized in that: The unique key of each process variable in the process variable value set is represented by a combination of a business variable name and a fixed prefix; different sub-processes correspond to different business variable names, and different sub-processes correspond to different fixed prefixes.

6. The method for dynamically creating a sub-process instance of a workflow engine according to claim 5, characterized in that: The deleting the fixed string of the unique key of each process variable in each process variable value set includes: A fixed prefix of the unique key of each process variable in each of the process variable value sets is deleted.

7. The method for dynamically creating a sub-process instance of a workflow engine according to claim 1, characterized in that: The unique key of each process variable in the process variable value set is represented by a combination of a business variable name and a fixed suffix; different sub-processes correspond to different business variable names, and different sub-processes correspond to different fixed suffixes.

8. The method for dynamically creating a sub-process instance of a workflow engine according to claim 7, characterized in that: The deleting the fixed string of the unique key of each process variable in each process variable value set includes: The fixed suffix of the unique key of each process variable in each of the process variable value sets is deleted.

9. A device for dynamically creating sub-process instances of a workflow engine, characterized in that: include: An identification module, used for identifying whether to allow dynamic creation of a sub-process instance according to a parameter value of a target parameter in a subscription function when the workflow engine runs to a sub-process call activity; A reading module, configured to read a set of process variable values ​​of each sub-process of the workflow engine from the sub-process splitting configuration information in response to allowing dynamic creation of a sub-process instance; The unique key of each process variable in the process variable value set is represented by a sequential combination of a business variable name and a fixed string; A deletion module, used to delete the fixed character string of the unique key of each process variable in each of the process variable value sets, and obtain a business variable value set corresponding to each of the process variable value sets; A calculation module, used for calculating the Cartesian product of the business variable value set; A first modification module, used to modify the cardinality of the configuration items of the sub-process calling activity of the workflow engine to the number of combinations of the Cartesian product; An opening module, used to open a sub-process instance of the workflow engine according to the modified configuration item cardinality; The second modification module is used to modify the sub-process start mark in the predefined sub-process start event to started, so as to avoid repeated creation of sub-process instances.

10. A computer device comprising a memory, a processor, and a computer program stored in the memory, characterized in that: When the computer program is executed by the processor, the computer program executes the instructions of the method according to any one of claims 1 to 8.

11. A computer storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor of a computer device, the computer program executes the instructions of the method according to any one of claims 1 to 8.

12. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor of a computer device, the computer program executes instructions of the method according to any one of claims 1 to 8.