CN115660396B - Workflow generation method and device, electronic equipment and readable storage medium - Google Patents

Workflow generation method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN115660396B
CN115660396B CN202211399518.8A CN202211399518A CN115660396B CN 115660396 B CN115660396 B CN 115660396B CN 202211399518 A CN202211399518 A CN 202211399518A CN 115660396 B CN115660396 B CN 115660396B
Authority
CN
China
Prior art keywords
node
workflow
gateway
current
initial
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211399518.8A
Other languages
Chinese (zh)
Other versions
CN115660396A (en
Inventor
马敏
兰亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhongdian Jinxin Software Co Ltd
Original Assignee
Zhongdian Jinxin Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhongdian Jinxin Software Co Ltd filed Critical Zhongdian Jinxin Software Co Ltd
Priority to CN202211399518.8A priority Critical patent/CN115660396B/en
Publication of CN115660396A publication Critical patent/CN115660396A/en
Application granted granted Critical
Publication of CN115660396B publication Critical patent/CN115660396B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application provides a workflow generation method, a workflow generation device, electronic equipment and a readable storage medium, wherein the workflow generation method comprises the following steps: s1: acquiring an initial workflow drawn by a target workflow designer shielding a gateway node; s2: inquiring a node with a null prepositioned node in the initial workflow, determining the node as a starting node and taking the starting node as a first node; s3: determining a node adjacent to and behind the first node in the initial workflow as a second node; s4: determining a processing mode corresponding to the second node according to the connection relation between the nodes in the initial workflow, and processing the second node in the processing mode; and repeatedly executing S3 to S4, and determining the second node in S3 as a new first node in the repeated execution process until the circulation is stopped when the target workflow conforming to the preset specification is generated. By the method, convenience of business personnel in adjusting or editing the workflow is improved, and further working efficiency is improved.

Description

Workflow generation method and device, electronic equipment and readable storage medium
Technical Field
The present application relates to the field of workflow technologies, and in particular, to a method and an apparatus for generating a workflow, an electronic device, and a readable storage medium.
Background
The workflow organizes a group of tasks for completing a certain business objective, wherein the triggering sequence and the triggering condition of the tasks are defined, documents and information are allowed to be transferred between different departments and roles, and a unified interface is provided for performing functions of flow approval, circulation, rollback and the like.
The working fluid often changes with the regulation of enterprises or the online of new products, and the like, and the regulation is often needed. However, existing workflow products provide flow diagram designers that are designed based on the BPMN2.0 specification, including node types (e.g., parallel gateways, exclusive gateways, etc.) that are difficult for business personnel to understand and use. Therefore, in the actual application scene, the business personnel are difficult to independently adjust or edit the workflow, the change of the flow generally requires the participation of technical personnel, and the working efficiency is low.
Disclosure of Invention
Accordingly, the present application is directed to a method and apparatus for generating a workflow, an electronic device, and a readable storage medium, so as to improve convenience of a business person when adjusting or editing the workflow, and further improve working efficiency.
In a first aspect, an embodiment of the present application provides a method for generating a workflow, including:
step S1: acquiring an initial workflow; the initial workflow is drawn through a target workflow designer; the target workflow designer is a workflow designer shielding gateway nodes;
step S2: inquiring a node with a null prepositioned node in the initial workflow to determine the node as a starting node, and taking the starting node as a first node; the front node is used for representing a node before a current node in the flow direction relation of the initial workflow;
step S3: determining a node adjacent to and subsequent to the first node in the initial workflow as a second node;
step S4: determining a processing mode corresponding to the second node according to the connection relation between the first node and other nodes in the initial workflow and the connection relation between the second node and other nodes, so as to process the second node through the processing mode; and repeatedly executing the steps S3 to S4, and determining the second node in the step S3 as a new first node in the process of repeatedly executing the steps until the circulation is stopped when the target workflow meeting the preset specification is generated.
With reference to the first aspect, an embodiment of the present application provides a first possible implementation manner of the first aspect, where the determining, according to a connection relationship between the first node and other nodes in the initial workflow and a connection relationship between the second node and other nodes, a processing manner corresponding to the second node, so as to process the second node by using the processing manner includes:
and when the first node only belongs to a front node of one node, establishing a connecting line between the first node and the second node.
With reference to the first aspect, an embodiment of the present application provides a second possible implementation manner of the first aspect, where the determining, according to a connection relationship between the first node and other nodes in the initial workflow and a connection relationship between the second node and other nodes, a processing manner corresponding to the second node, so as to process the second node by using the processing manner includes:
when the first node belongs to a prepositive node of at least two nodes, judging whether the node type of the first node is a condition judgment node or not;
When the node type of the first node is not a condition judgment node, a first gateway node with the node type being a parallel gateway node is established, and a connecting line between the first node and the first gateway node is established; respectively establishing a connection line between the first gateway node and each second node aiming at each second node, and pushing the first gateway node into a current stack according to a first-in-last-out principle; the first gateway node is used for sending task starting information to each second node connected with the first gateway node when receiving task completion information sent by the first node, so that each second node starts to execute a corresponding task to be executed;
when the node type of the first node is a conditional judgment node, a second gateway node with the node type being an exclusive gateway node is created, a connection line between the first node and the second gateway node is established, and for each second node, a connection line between the second gateway node and the second node is established, and the second gateway node is pushed into a current stack according to a first-in-last-out principle; the second gateway node is configured to select, according to a condition judgment result sent by the first node, a target second node corresponding to the condition judgment result from a plurality of second nodes connected to the second gateway node, and send task start information to the target second node, so that the target second node starts to execute a task to be executed corresponding to the target second node.
With reference to the second possible implementation manner of the first aspect, the embodiment of the present application provides a third possible implementation manner of the first aspect, where determining, according to a connection relationship between the first node and other nodes in the initial workflow and a connection relationship between the second node and other nodes, a processing manner corresponding to the second node, so as to process the second node by using the processing manner includes:
when the first node and other nodes are used as the front node of the second node together, judging whether a current stack top node exists in a current stack or not;
if the current top node exists, the current top node is obtained, whether the current top node exists in the current stack or not and the subsequent steps are continuously judged until the current top node does not exist in the current stack, and the current top node and the pop-up sequence of the current top node are obtained;
for each current trestle node, judging whether a third node with the same node type as the current trestle node exists currently; if the third node with the same node type as the current trestle top node does not exist, creating the third node with the same node type as the current trestle top node to obtain the third node corresponding to each current trestle top node; according to the pop sequence of each current stack top node, a connection line between the first node and the second node is established through the third node corresponding to each current stack top node in sequence; and if the third node exists, establishing a connection line between the first node and the second node by sequentially passing through the third node corresponding to each current stack top node according to the stack pulling sequence of each current stack top node.
With reference to the first aspect, an embodiment of the present application provides a fourth possible implementation manner of the first aspect, where before the querying a node in the initial workflow where a front node is empty to determine the node as a start node, the method further includes:
analyzing the node relation in the initial visual operation flow, and determining the front node of each node in the initial visual operation flow so as to store the node relation between each node and the front node of each node into a database;
the querying the node with the empty front node in the initial workflow to determine the node as the starting node comprises:
and inquiring the node with the empty front node in the initial workflow from the node relation stored in the database to determine the node as a starting node.
With reference to the first aspect, the embodiment of the present application provides a fifth possible implementation manner of the first aspect, where the method is applied to a backend server; before the initial workflow is acquired, the method further comprises:
receiving the initial workflow sent by a first user side, so as to store the initial workflow; the initial workflow is drawn by a first user through the target workflow designer installed in the first user side; the back-end server stores a plurality of initial workflows; each initial workflow corresponds to a respective flow type.
With reference to the fifth possible implementation manner of the first aspect, an embodiment of the present application provides a sixth possible implementation manner of the first aspect, where the acquiring an initial workflow includes:
receiving a query request sent by a second user side, so as to return a plurality of pre-stored initial workflows and numbers corresponding to each initial workflow to the second user side, so that the second user side responds to a selection operation of a second user on the initial workflows, and the numbers corresponding to the selected initial workflows are sent to the back-end server as the target numbers;
and receiving the target number sent by the second user side to obtain an initial workflow corresponding to the target number from a plurality of pre-stored initial workflows.
In a second aspect, an embodiment of the present application further provides a workflow generating device, including:
the acquisition module is used for executing the step S1; step S1 is to acquire an initial workflow; the initial workflow is drawn through a target workflow designer; the target workflow designer is a workflow designer shielding gateway nodes;
The query module is used for executing the step S2; step S2 is to query a node in the initial workflow, where the front node is empty, to determine the node as a start node, and to use the start node as a first node; the front node is used for representing a node before a current node in the flow direction relation of the initial workflow;
a determining module, configured to execute step S3; the step S3 is to determine a node adjacent to and located after the first node in the initial workflow as a second node;
the processing module is used for executing the step S4; step S4 is to determine a processing manner corresponding to the second node according to the connection relationship between the first node and other nodes in the initial workflow and the connection relationship between the second node and other nodes, so as to process the second node in the processing manner; and repeatedly executing the steps S3 to S4, and determining the second node in the step S3 as a new first node in the process of repeatedly executing the steps until the circulation is stopped when the target workflow meeting the preset specification is generated.
With reference to the second aspect, the embodiment of the present application provides a first possible implementation manner of the second aspect, where the processing module is specifically configured to:
And when the first node only belongs to a front node of one node, establishing a connecting line between the first node and the second node.
With reference to the second aspect, an embodiment of the present application provides a second possible implementation manner of the second aspect, where the processing module is specifically configured to, when used to perform step S4:
when the first node belongs to a prepositive node of at least two nodes, judging whether the node type of the first node is a condition judgment node or not;
when the node type of the first node is not a condition judgment node, a first gateway node with the node type being a parallel gateway node is established, and a connecting line between the first node and the first gateway node is established; respectively establishing a connection line between the first gateway node and each second node aiming at each second node, and pushing the first gateway node into a current stack according to a first-in-last-out principle; the first gateway node is used for sending task starting information to each second node connected with the first gateway node when receiving task completion information sent by the first node, so that each second node starts to execute a corresponding task to be executed;
When the node type of the first node is a conditional judgment node, a second gateway node with the node type being an exclusive gateway node is created, a connection line between the first node and the second gateway node is established, and for each second node, a connection line between the second gateway node and the second node is established, and the second gateway node is pushed into a current stack according to a first-in-last-out principle; the second gateway node is configured to select, according to a condition judgment result sent by the first node, a target second node corresponding to the condition judgment result from a plurality of second nodes connected to the second gateway node, and send task start information to the target second node, so that the target second node starts to execute a task to be executed corresponding to the target second node.
With reference to the second possible implementation manner of the second aspect, an embodiment of the present application provides a third possible implementation manner of the second aspect, where the processing module is specifically configured to, when used to perform step S4:
when the first node and other nodes are used as the front node of the second node together, judging whether a current stack top node exists in a current stack or not;
If the current top node exists, the current top node is obtained, whether the current top node exists in the current stack or not and the subsequent steps are continuously judged until the current top node does not exist in the current stack, and the current top node and the pop-up sequence of the current top node are obtained;
for each current trestle node, judging whether a third node with the same node type as the current trestle node exists currently; if the third node with the same node type as the current trestle top node does not exist, creating the third node with the same node type as the current trestle top node to obtain the third node corresponding to each current trestle top node; according to the pop sequence of each current stack top node, a connection line between the first node and the second node is established through the third node corresponding to each current stack top node in sequence; and if the third node exists, establishing a connection line between the first node and the second node by sequentially passing through the third node corresponding to each current stack top node according to the stack pulling sequence of each current stack top node.
With reference to the second aspect, an embodiment of the present application provides a fourth possible implementation manner of the second aspect, where the method further includes:
The analyzing module is used for analyzing the node relation in the initial visual operation flow before the query module executes the step S2, and determining the front node of each node in the initial visual operation flow so as to store the node relation between each node and the front node of each node into a database;
the query module, when used for executing step S2, is specifically configured to:
and inquiring the node with the empty front node in the initial workflow from the node relation stored in the database to determine the node as a starting node.
With reference to the second aspect, an embodiment of the present application provides a fifth possible implementation manner of the second aspect, where the apparatus resides in a backend server; the apparatus further comprises:
the receiving module is used for receiving the initial workflow sent by the first user side before the step S1 is executed by the obtaining module so as to store the initial workflow; the initial workflow is drawn by a first user through the target workflow designer installed in the first user side; the back-end server stores a plurality of initial workflows; each initial workflow corresponds to a respective flow type.
With reference to the fifth possible implementation manner of the second aspect, an embodiment of the present application provides a sixth possible implementation manner of the second aspect, where the obtaining module is specifically configured to, when executing step S1:
receiving a query request sent by a second user side, so as to return a plurality of pre-stored initial workflows and numbers corresponding to each initial workflow to the second user side, so that the second user side responds to a selection operation of a second user on the initial workflows, and the numbers corresponding to the selected initial workflows are sent to the back-end server as the target numbers;
and receiving the target number sent by the second user side to obtain an initial workflow corresponding to the target number from a plurality of pre-stored initial workflows.
In a third aspect, an embodiment of the present application further provides an electronic device, including: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory in communication via the bus when the electronic device is running, the machine-readable instructions when executed by the processor performing the steps of any one of the possible implementations of the first aspect.
In a fourth aspect, embodiments of the present application also provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of any of the possible implementations of the first aspect described above.
The embodiment of the application provides a workflow generation method, a workflow generation device, electronic equipment and a readable storage medium, wherein the method comprises the following steps of S1: acquiring an initial workflow; the initial workflow is drawn through a target workflow designer; the target workflow designer is a workflow designer shielding gateway nodes; step S2: inquiring a node with a null prepositioned node in the initial workflow to determine the node as a starting node, and taking the starting node as a first node; the front node is used for representing a node before a current node in the flow direction relation of the initial workflow; step S3: determining a node adjacent to and subsequent to the first node in the initial workflow as a second node; step S4: determining a processing mode corresponding to the second node according to the connection relation between the first node and other nodes in the initial workflow and the connection relation between the second node and other nodes, so as to process the second node through the processing mode; and repeatedly executing the steps S3 to S4, and determining the second node in the step S3 as a new first node in the process of repeatedly executing the steps until the circulation is stopped when the target workflow meeting the preset specification is generated.
Considering the problem that the existing workflow designer comprises gateway nodes which are difficult to understand and use by service personnel, so that the service personnel are difficult to independently adjust or edit the workflow, the initial workflow is drawn by the target workflow designer which shields the gateway nodes, and the service personnel can independently adjust or edit the workflow. The gateway nodes are shielded in the target workflow designer, so that the drawn initial workflow does not contain the gateway nodes, the initial workflow is a workflow which does not accord with the preset specification, and only the workflow which accords with the preset specification can be normally deployed and operated. In this embodiment, therefore, after the initial workflow is drawn, the target workflow conforming to the preset specification is generated by processing each node in the initial workflow. By the method, in the process of generating the target workflow conforming to the preset specification, the business personnel only need to draw the initial workflow through the target workflow designer, each node in the initial workflow is automatically processed subsequently, the target workflow conforming to the preset specification is generated, and the whole process does not need other technical personnel to participate, so that convenience of the business personnel in adjusting or editing the workflow is improved, and further the work efficiency is improved.
In order to make the above objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a workflow generation method according to an embodiment of the present application;
FIG. 2 is a schematic diagram of an initial workflow provided by an embodiment of the present application;
FIG. 3 illustrates a schematic diagram of a target workflow provided by an embodiment of the present application;
fig. 4 is a schematic structural diagram of a workflow generating device according to an embodiment of the present application;
fig. 5 shows a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. The components of the embodiments of the present application generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the application, as presented in the figures, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. All other embodiments, which can be made by a person skilled in the art without making any inventive effort, are intended to be within the scope of the present application.
In consideration of the actual application scene, the business personnel are difficult to independently adjust or edit the workflow, the change of the flow generally requires the participation of technical personnel, and the working efficiency is low. Based on the above, the embodiment of the application provides a workflow generation method, a workflow generation device, an electronic device and a readable storage medium, so as to improve convenience of business personnel when adjusting or editing the workflow, and further improve working efficiency. The following is a description of examples.
Embodiment one:
for the sake of understanding the present embodiment, first, a method for generating a workflow disclosed in the present embodiment will be described in detail. The method is applied to a back-end server, and fig. 1 shows a flowchart of a workflow generation method provided by an embodiment of the present application, as shown in fig. 1, and includes the following steps S1 to S4:
step S1: acquiring an initial workflow; the initial workflow is drawn by a target workflow designer; the target workflow designer is a workflow designer that masks the gateway node.
The workflow organizes a group of tasks for completing a certain business objective, wherein the triggering sequence and the triggering condition of the tasks are defined, documents and information are allowed to be transferred between different departments and roles, and a unified interface is provided for performing functions of flow approval, circulation, rollback and the like. The workflow is applied to a business system, and the design process of the workflow is carried out in a visual mode, different types of flow nodes are dragged to the flow chart, and branches and directions of the flow are determined through connection lines.
The existing workflow designer generally includes gateway nodes (such as parallel gateway nodes and exclusive gateway nodes) which are difficult to understand and use by service personnel, so that the service personnel have a problem that the service personnel are difficult to independently adjust or edit the workflow. At this time, the node types in the target workflow designer include only: the system comprises a starting node, an ending node, a user approval node, an automatic task processing node, a condition judging node, a countersign node and a sub-flow node. At this time, the business person can draw the initial workflow independently using the target workflow designer by means of drag only.
The automatic task processing node is used for automatically processing data or tasks which flow to the node according to preset processing rules, and the automatic task processing node comprises the preset processing rules. The condition judgment node may set a judgment condition. The voting mechanism is adopted by the countersign node, for example, an approval task is distributed to 5 persons, the 5 persons process the approval task to obtain 5 approval results, the approval results in the 5 approval results are counted to be the agreed quantity, and whether the approval passes or not is determined according to the quantity (for example, when the quantity is at least 3, the approval passes). The sub-flow node refers to that when the same section of flow appears in different places in one flow, the section of flow is set as a sub-flow, and the sub-flow can be repeatedly invoked.
In this embodiment, the gateway node comprises a parallel gateway node and an exclusive gateway node, and there are typically a plurality of next nodes connected to the gateway node according to the flow direction of the workflow. Wherein the parallel gateway node is operative to cause each next node connected to the parallel gateway node to perform its own task. The exclusive gateway node is used for enabling the next node meeting the judgment condition to execute own tasks in each next node connected with the parallel gateway node. Taking an approval process as an example, the next node connected with the gateway node is a group approval node and a project manager approval node respectively, when the gateway node is a parallel gateway node, the group approval node and the project manager approval node both need to execute approval tasks, and when the gateway node is an exclusive gateway node, one of the group approval node and the project manager node only needs to execute approval tasks.
In a possible implementation manner, before the step S1 is performed to obtain the initial workflow, the following steps may be specifically performed:
s0: receiving an initial workflow sent by a first user side, so as to store the initial workflow; the initial workflow is drawn by a first user through a target workflow designer installed in a first user terminal; the back-end server stores a plurality of initial workflows; each initial workflow corresponds to a respective flow type.
In this embodiment, the target workflow designer is installed in the first user terminal, and the first user can draw the initial workflow corresponding to the required flow type (i.e. the business target, such as leave-behind approval flow) through the target workflow designer installed in the first user terminal.
After the first user draws the initial workflow by using the first user terminal, the first user terminal sends the initial workflow to the back-end server, and the back-end server receives the initial workflow sent by each first user terminal so as to store each initial workflow.
In a possible implementation manner, when the step S1 is performed to obtain the initial workflow, the following steps S101 to S102 may be specifically performed:
s101: and receiving a query request sent by the second user side, so as to return a plurality of prestored initial workflows and numbers corresponding to each initial workflow to the second user side, and enabling the second user side to respond to the selection operation of the second user for the initial workflows, so that the numbers corresponding to the selected initial workflows are used as target numbers to be sent to a back-end server.
In this embodiment, the second user terminal may be the first user terminal or other user terminals other than the first user terminal. When the workflow deployment operation is needed, the second user sends a query request to the back-end server through the second user side. And after receiving the query request, the back-end server returns a plurality of prestored initial workflows and numbers corresponding to the initial workflows to the second user end. The second user selects an initial workflow corresponding to the workflow type from all initial workflows displayed on the second user side according to the workflow type of the workflow to be deployed (for example, the workflow type to be deployed is a leave-in approval process), and the second user side sends the serial number of the initial workflow corresponding to the workflow type as a target serial number to the back-end server.
S102: and receiving the target number sent by the second user side to obtain an initial workflow corresponding to the target number from a plurality of pre-stored initial workflows.
And after receiving the target number sent by the second user side in the back-end server, acquiring an initial workflow corresponding to the target number (namely the flow type) from a plurality of pre-stored initial workflows.
Step S2: inquiring a node with a null prepositioned node in the initial workflow to determine the node as a starting node, and taking the starting node as a first node; the pre-node is used to represent a node prior to the current node in the flow direction relationship of the initial workflow.
In a possible implementation manner, before performing step S2 to query the node with the leading node being empty in the initial workflow to determine the node as the starting node, the following step S201 may be specifically performed:
s201: and analyzing the node relation in the initial visual operation flow, and determining the front node of each node in the initial visual operation flow so as to store the node relation between each node and the front node of each node into a database. The node relation refers to which node the leading node of each node is.
When the step S2 is executed to query the node with the leading node being empty in the initial workflow to determine the node as the starting node, the following step S202 may be specifically executed:
s202: and inquiring the node with the empty front node in the initial workflow from the node relation stored in the database to determine the node as a starting node.
Fig. 2 is a schematic diagram of an initial workflow provided by an embodiment of the present application, where as shown in fig. 2, a front node of a node a is a start node, a front node of a node B is a node a, a front node of a node C is a node B, and a front node of a node G is a node E, a node F, and a node D.
In this embodiment, the starting node has no leading node, that is, the leading node of the starting node is null, so the starting node can be determined by querying the node in the initial workflow where the leading node is null.
Step S3: a node in the initial workflow adjacent to and subsequent to the first node is determined to be a second node.
In this embodiment, the first node determined in the previous step is a start node, and in the initial workflow, a node adjacent to and located after the start node is a node a, where the node a is determined as a second node.
Step S4: determining a processing mode corresponding to the second node according to the connection relation between the first node and other nodes in the initial workflow and the connection relation between the second node and other nodes, so as to process the second node in the processing mode; and repeatedly executing the steps S3 to S4, and determining the second node in the step S3 as a new first node in the process of repeatedly executing the steps until the circulation is stopped when the target workflow meeting the preset specification is generated.
In this embodiment, the preset specification is specifically BPMN2.0 (business process modeling and labeling, business Process Modeling Notation) specification.
In a possible implementation manner, when the step S4 is executed to determine the processing manner corresponding to the second node according to the connection relationship between the first node and other nodes and the connection relationship between the second node and other nodes in the initial workflow, and process the second node in the processing manner, the following step S401 may be specifically executed:
s401: when the first node only belongs to a front node of one node, a connecting line between the first node and the second node is established.
As shown in fig. 2, when the first node is the start node and the second node is the node a, the start node only belongs to the front node of the node a, so fig. 3 shows a schematic diagram of a target workflow provided by the embodiment of the present application, and as shown in fig. 3, a connection line between the first node (start node) and the second node (node a) is established.
In this embodiment, if the node type of the first node is any one of the following: and directly establishing a connection line between the first node and the second node if the starting node, the user approval node and the condition node are the same. If the node type of the first node is any one of the following: an automatic task processing node, a countersign node, and a sub-process node, a user approval node (e.g., node H) is created between the first node and the second node, and then a connection between the first node and the second node (i.e., a connection between the first node and the user approval node (node H) and a connection between the user approval node (node H) and the second node) are established through the user approval node (node H).
Next, the second node (node a) is determined as the new first node. Continuing to execute: a node in the initial workflow that is adjacent to and subsequent to the new first node (node a) is determined to be a new second node. As shown in fig. 2, the determined new second node is node B.
Since the node a (first node) belongs to only the front node of the node B (second node), as shown in fig. 3, a connection line between the first node (node a) and the second node (node B) is established. The second node (node B) is then taken as the new first node. Continuing to execute: nodes in the initial workflow adjacent to and subsequent to the new first node (node B), i.e., nodes C and D, are determined to be new second nodes.
In a possible implementation manner, when the step S4 is executed to determine the processing manner corresponding to the second node according to the connection relationship between the first node and other nodes and the connection relationship between the second node and other nodes in the initial workflow, and process the second node in the processing manner, the following steps S402 to S404 may be specifically executed:
s402: when the first node belongs to a prepositive node of at least two nodes, judging whether the node type of the first node is a condition judging node or not;
s403: when the node type of the first node is not a condition judgment node, creating a first gateway node with the node type being a parallel gateway node, and establishing a connection line between the first node and the first gateway node; and for each second node, respectively establishing a connection line between the first gateway node and the second node, and pushing the first gateway node into the current stack according to a first-in-last-out principle; the first gateway node is used for sending task starting information to each second node connected with the first gateway node when task completion information sent by the first node is received, so that each second node starts to execute each corresponding task to be executed;
S404: when the node type of the first node is a conditional judgment node, a second gateway node with the node type being an exclusive gateway node is created, and a connecting line between the first node and the second gateway node is established; establishing a connection line between the second gateway node and each second node, and pushing the second gateway node into the current stack according to a first-in-last-out principle; the second gateway node is configured to select, according to the condition judgment result sent by the first node, a target second node corresponding to the condition judgment result from a plurality of second nodes connected to the second gateway node, and send task start information to the target second node, so that the target second node starts to execute a task to be executed corresponding to the target second node.
In this embodiment, the node B (first node) belongs to the preceding node of the node C and the node D, and at this time, it is judged whether the node type of the first node (node B) is a condition judgment node. As shown in fig. 2, the node type of the node B in this embodiment is not a condition judgment node. At this time, as shown in fig. 3, a first gateway node (e.g., B1) whose node type is a parallel gateway node is created, and a connection line between the node B (first node) and the first gateway node B1 is established, and a connection line between the first gateway node B1 and the node C (second node) is established, and a connection line between the first gateway node B1 and the node D (second node) is established. And pushing the first gateway node B1 into the current stack according to the first-in last-out principle.
The stack exists as a space, and the arrangement of each node in the stack is arranged according to the principle of first-in last-out. In this embodiment, the first gateway node B1 is put in the current stack according to the principle of first-in last-out, and at this time, the first gateway node B1 is the current top-of-stack node in the current stack.
Next, the second node (node C) is set as a new first node, and the execution is continued: a node in the initial workflow that is adjacent to and after the new first node (node C), i.e., a condition judgment node, is determined as a new second node. Since the node C (first node) belongs only to the pre-node of the condition judgment node (second node) as shown in fig. 2, a connection line between the first node (node C) and the second node (condition judgment node) is established as shown in fig. 3. And taking the condition judgment node as a new first node.
Nodes (nodes E and F) adjacent to and subsequent to the new first node (condition judgment node) in the initial workflow are determined as second nodes. At this time, the first node (condition judgment node) belongs to the leading node of the two nodes, and thus judges whether the node type of the first node is the condition judgment node.
In this embodiment, the node type of the first node (condition judgment node) is the condition judgment node, and at this time, the second gateway node C1 whose node type is the exclusive gateway node is created, and as shown in fig. 3, a connection line between the condition judgment node and the exclusive gateway node C1 is established.
For the second node (node E), a connection between the second gateway node C1 and the second node (node E) is established, and the second gateway node C1 is pushed into the current stack according to the first-in-last-out principle. At this time, in the current stack, the second gateway node C1 is above the first gateway node B1, and the second gateway node C1 is the current top node in the current stack.
Taking the second node (node E) as the new first node, continuing to execute: a node (node G) adjacent to and subsequent to the new first node (node E) in the initial workflow is determined to be a second node.
In a possible implementation manner, when the step S4 is executed to determine the processing manner corresponding to the second node according to the connection relationship between the first node and other nodes and the connection relationship between the second node and other nodes in the initial workflow, and process the second node in the processing manner, the following steps S405 to S407 may be specifically executed:
S405: when the first node and other nodes are used as the front node of the second node together, judging whether a current stack top node exists in a current stack or not;
s406: if the current top node exists, the current top node is obtained, whether the current top node exists in the current stack or not and the subsequent steps are continuously judged until the current top node does not exist in the current stack, and the current top node and the pop sequence of the current top node are obtained;
s407: for each current trestle node, judging whether a third node with the same node type as the current trestle node exists currently; if the third node with the same node type as the current trestle top node does not exist, creating the third node with the same node type as the current trestle top node to obtain the third node corresponding to each current trestle top node; according to the pop sequence of each current stack top node, a connection line between the first node and the second node is established through the third node corresponding to each current stack top node in sequence; and if the third node exists, establishing a connection line between the first node and the second node by sequentially passing through the third node corresponding to each current stack top node according to the stack pulling sequence of each current stack top node.
In this embodiment, since the first node (node E) and the other nodes (node F and node D) are together used as the pre-node of the second node (node G), at this time, it is determined whether the current stack top node exists in the current stack. In this embodiment, if there is a current stack top node, specifically, a second gateway node C1 in the current stack, the second gateway node C1 is obtained. And continuously judging whether the current stack has the current stack top node or not, and in the embodiment, if the current stack top node in the current stack is the first gateway node B1, acquiring the first gateway node B1. And continuously judging whether the current stack has the current stack top node or not, and stopping continuously judging if the current stack top node does not exist in the current stack in the embodiment. In this embodiment, the stacking order of the first gateway node B1 and the second gateway node C1 is that the second gateway node C1 is first stacked, and the first gateway node B1 is second stacked.
For the second gateway node C1, in the process of converting the initial workflow into the target workflow, it is determined whether or not the target workflow currently in the process of conversion has a third node of the same node type as the second gateway node C1 (note that the third node is not the second gateway node at this time). As shown in fig. 3, when there is no third node of the same node type as the second gateway node C1, a third node of the same node type as the second gateway node C1 is created (i.e., a third node C2 of which the node type is an exclusive gateway node is created).
For a first gateway node B1, whether a third node with the same node type as the first gateway node B1 exists in a target workflow currently in the conversion process is judged. When there is no third node of the same node type as the first gateway node B1, a third node of the same node type as the first gateway node B1 is created (i.e. a third node C2 of which the node type is a parallel gateway node is created). At this point, a respective third node (B2 and C2) is obtained for each current top-of-stack node (first gateway node B1 and second gateway node C1).
As shown in fig. 3, the connection between the first node E and the second node G is established sequentially through the third node C2 and the third node B2 in the order of the second gateway node C1 (first pop) and the first gateway node B1 (second pop).
The second node (node G) is taken as the new first node. Continuing to execute: a node (end node) adjacent to and subsequent to the new first node (node G) in the initial workflow is determined as a second node, as shown in fig. 2, and since the second node (node G) only belongs to a preceding node of the end node, a connection line between the node G and the end node is established as shown in fig. 3.
After the connection between the condition judgment node and the second gateway node C1 is established, for the second node (node F), the connection between the second gateway node C1 and the second node (node F) is established, and the second gateway node C1 is pushed into the current stack according to the first-in-last-out principle. At this time, inclusion of the second gateway node C1 is performed in the current stack. Taking the second node (node F) as the new first node, continuing to execute: a node (node G) adjacent to and subsequent to the new first node (node F) in the initial workflow is determined as a second node.
In this embodiment, since the first node (node F) and the other nodes (node E and node D) are used together as the pre-node of the first node (node G), at this time, it is determined whether the current stack top node exists in the current stack. In this embodiment, if there is a current top node, specifically, a second gateway node C1 in the current stack, then the second gateway node C1 is obtained, and whether there is a current top node in the current stack is continuously determined. In this embodiment, only one current stack top node is the second gateway node C1, i.e. the first pop sequence of the second gateway node C1.
And judging whether a third node with the same node type as the second gateway node C1 exists in the current target workflow. At this time, when a third node (i.e., a third node C2) having the same node type as the second gateway node C1 exists in the current target workflow, a connection line between the first node (node F) and the second node (node G) is established through the third node C2.
After the connection between the node B and the first gateway node B1 is established, for the second node (node D), the connection between the first gateway node B1 and the second node (node D) is established, and the first gateway node B1 is pushed into the current stack according to the first-in-last-out principle. At this time, only the first gateway node B1 is included in the current stack.
Taking the second node (node D) as the new first node, as shown in fig. 2, the execution continues: a node in the initial workflow that is adjacent to and subsequent to the first node (node D), i.e., node G, is determined to be a second node.
In this embodiment, since the first node (node D) and the other nodes (node E and node F) are together used as the pre-node of the second node (node G), at this time, it is determined whether the current stack top node exists in the current stack. In this embodiment, if there is a current top node, specifically, a first gateway node B1 in the current stack, then the first gateway node B1 is obtained, and whether there is a current top node in the current stack is continuously determined. In this embodiment, only one current top node, i.e. the first gateway node B1, i.e. the pop sequence is the first pop of the first gateway node B1.
And determining whether there is currently a third node of the same node type as the first gateway node B1. In this embodiment, when there is a third node (i.e., third node B2) of the same node type as the first gateway node B1, a connection line between the first node (node D) and the second node (node G) is established through the third node B2 corresponding to the first gateway node B1.
By the above method, as shown in fig. 3, a target workflow conforming to a preset specification is generated. And deploying and releasing the target workflow to obtain the online application.
In this embodiment, the target workflow may be deployed in a backend server, or the target workflow may be sent to other clients (specifically, the first client or the second client, or clients other than the first client and the second client) by the backend server, so as to be deployed in other clients.
As shown in fig. 3, after the target workflow is deployed online, the target workflow may be executed in a circulation by:
when the starting node is triggered, the starting node sends task starting information to the node A, and the node A executes own task after receiving the task starting information. When the task of the node a is a user approval task, the node a sends an approval task to a user side of a corresponding approver, after the approver executes the approval task, a task execution result is returned to the node a through the user side, and when the task execution result is that the approval is passed, the node a sends task completion information to the node B so that the node B executes the task of the node B. When the node B finishes executing the task, the node B sends task completion information to the node B1, and when the node B1 receives the task completion information sent by the node B, the node B sends task start information to the node C and the node D respectively, so that the node C and the node D start executing the task to be executed corresponding to the node C and the node D.
After the node C executes the task, the task completion information is sent to the condition judgment node, the condition judgment node starts executing the task and sends the condition judgment result to the node C1. According to the condition judgment result, the node C1 selects a target node (assumed to be the node E) corresponding to the condition judgment result from the node E and the node F, and sends task starting information to the node E so that the node E starts to execute the task to be executed corresponding to the node E. After the node E executes the task, the node E sends task completion information to the node C2. After receiving the task completion information sent by any one of the nodes E and F, the node C2 sends the task completion information to the node B2.
After the node D performs its own task, it sends task completion information to the node B2. After receiving the task completion information sent by the node C2 and the node D, the node B2 sends the task completion information to the node G, so that the node G starts to execute its own task. And after the node G executes the task, sending task completion information to the end node, and after the end node receives the task completion information, ending the process execution.
Embodiment two:
based on the same technical concept, the embodiment of the present application further provides a device for generating a workflow, and fig. 4 shows a schematic structural diagram of the device for generating a workflow provided by the embodiment of the present application, as shown in fig. 4, where the device includes:
An obtaining module 401, configured to execute step S1; step S1 is to acquire an initial workflow; the initial workflow is drawn through a target workflow designer; the target workflow designer is a workflow designer shielding gateway nodes;
a query module 402, configured to execute step S2; step S2 is to query a node in the initial workflow, where the front node is empty, to determine the node as a start node, and to use the start node as a first node; the front node is used for representing a node before a current node in the flow direction relation of the initial workflow;
a determining module 403, configured to perform step S3; the step S3 is to determine a node adjacent to and located after the first node in the initial workflow as a second node;
a processing module 404, configured to execute step S4; step S4 is to determine a processing manner corresponding to the second node according to the connection relationship between the first node and other nodes in the initial workflow and the connection relationship between the second node and other nodes, so as to process the second node in the processing manner; and repeatedly executing the steps S3 to S4, and determining the second node in the step S3 as a new first node in the process of repeatedly executing the steps until the circulation is stopped when the target workflow meeting the preset specification is generated.
Optionally, the processing module 404, when configured to perform step S4, is specifically configured to:
and when the first node only belongs to a front node of one node, establishing a connecting line between the first node and the second node.
Optionally, the processing module 404, when configured to perform step S4, is specifically configured to:
when the first node belongs to a prepositive node of at least two nodes, judging whether the node type of the first node is a condition judgment node or not;
when the node type of the first node is not a condition judgment node, a first gateway node with the node type being a parallel gateway node is established, and a connecting line between the first node and the first gateway node is established; respectively establishing a connection line between the first gateway node and each second node aiming at each second node, and pushing the first gateway node into a current stack according to a first-in-last-out principle; the first gateway node is used for sending task starting information to each second node connected with the first gateway node when receiving task completion information sent by the first node, so that each second node starts to execute a corresponding task to be executed;
When the node type of the first node is a conditional judgment node, a second gateway node with the node type being an exclusive gateway node is created, and a connecting line between the first node and the second gateway node is established; establishing a connection line between the second gateway node and each second node, and pushing the second gateway node into a current stack according to a first-in-last-out principle; the second gateway node is configured to select, according to a condition judgment result sent by the first node, a target second node corresponding to the condition judgment result from a plurality of second nodes connected to the second gateway node, and send task start information to the target second node, so that the target second node starts to execute a task to be executed corresponding to the target second node.
Optionally, the processing module 404, when configured to perform step S4, is specifically configured to:
when the first node and other nodes are used as the front node of the second node together, judging whether a current stack top node exists in a current stack or not;
if the current top node exists, the current top node is obtained, whether the current top node exists in the current stack or not and the subsequent steps are continuously judged until the current top node does not exist in the current stack, and the current top node and the pop-up sequence of the current top node are obtained;
For each current trestle node, judging whether a third node with the same node type as the current trestle node exists currently; if the third node with the same node type as the current trestle top node does not exist, creating the third node with the same node type as the current trestle top node to obtain the third node corresponding to each current trestle top node; according to the pop sequence of each current stack top node, a connection line between the first node and the second node is established through the third node corresponding to each current stack top node in sequence; and if the third node exists, establishing a connection line between the first node and the second node by sequentially passing through the third node corresponding to each current stack top node according to the stack pulling sequence of each current stack top node.
Optionally, the method further comprises:
the parsing module is configured to parse the node relationship in the initial visualization workflow before the first query module 402 executes step S2, determine the pre-node of each node in the initial visualization workflow, and store the node relationship between each node and the pre-node of each node in the database;
the query module, when used for executing step S2, is specifically configured to:
And inquiring the node with the empty front node in the initial workflow from the node relation stored in the database to determine the node as a starting node.
Optionally, the device resides in a backend server; the apparatus further comprises:
a receiving module, configured to receive the initial workflow sent by the first user side, so as to store the initial workflow before the obtaining module 401 executes step S1; the initial workflow is drawn by a first user through the target workflow designer installed in the first user side; the back-end server stores a plurality of initial workflows; each initial workflow corresponds to a respective flow type.
Optionally, the obtaining module 401 is specifically configured to:
receiving a query request sent by a second user side, so as to return a plurality of pre-stored initial workflows and numbers corresponding to each initial workflow to the second user side, so that the second user side responds to a selection operation of a second user on the initial workflows, and the numbers corresponding to the selected initial workflows are sent to the back-end server as the target numbers;
And receiving the target number sent by the second user side to obtain an initial workflow corresponding to the target number from a plurality of pre-stored initial workflows.
Embodiment III:
based on the same technical concept, the embodiment of the present application further provides an electronic device, and fig. 5 shows a schematic structural diagram of the electronic device provided by the embodiment of the present application, as shown in fig. 5, the electronic device 500 includes: the processor 501, the memory 502 and the bus 503, the memory stores machine readable instructions executable by the processor, and when the electronic device is running, the processor 501 communicates with the memory 502 through the bus 503, and the processor 501 executes the machine readable instructions to perform the method steps described in the first embodiment.
Embodiment four:
based on the same technical idea, a fourth embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, which when being executed by a processor performs the method steps described in the first embodiment.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, specific working procedures of the apparatus, electronic device and computer readable storage medium described above may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. The above-described apparatus embodiments are merely illustrative, and the division of the modules is merely a logical function division, and there may be additional divisions when actually implemented, and for example, multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some communication interface, device or unit indirect coupling or communication connection, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer readable storage medium executable by a processor. Based on this understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Finally, it should be noted that: the above examples are only specific embodiments of the present application, and are not intended to limit the scope of the present application, but it should be understood by those skilled in the art that the present application is not limited thereto, and that the present application is described in detail with reference to the foregoing examples: any person skilled in the art may modify or easily conceive of the technical solution described in the foregoing embodiments, or perform equivalent substitution of some of the technical features, while remaining within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (8)

1. A method for generating a workflow, comprising:
step S1: acquiring an initial workflow; the initial workflow is drawn through a target workflow designer; the target workflow designer is a workflow designer shielding gateway nodes;
step S2: inquiring a node with a null prepositioned node in the initial workflow to determine the node as a starting node, and taking the starting node as a first node; the front node is used for representing a node before a current node in the flow direction relation of the initial workflow;
step S3: determining a node adjacent to and subsequent to the first node in the initial workflow as a second node;
step S4: determining a processing mode corresponding to the second node according to the connection relation between the first node and other nodes in the initial workflow and the connection relation between the second node and other nodes, so as to process the second node through the processing mode; repeatedly executing the steps S3 to S4, and determining the second node in the step S3 as a new first node in the process of repeatedly executing the steps until the circulation is stopped when the target workflow meeting the preset specification is generated;
And determining a processing mode corresponding to the second node according to the connection relation between the first node and other nodes in the initial workflow and the connection relation between the second node and other nodes, so as to process the second node in the processing mode, wherein the processing mode comprises the following steps:
when the first node belongs to a prepositive node of at least two nodes, judging whether the node type of the first node is a condition judgment node or not;
when the node type of the first node is not a condition judgment node, a first gateway node with the node type being a parallel gateway node is established, and a connecting line between the first node and the first gateway node is established; respectively establishing a connection line between the first gateway node and each second node aiming at each second node, and pushing the first gateway node into a current stack according to a first-in-last-out principle; the first gateway node is used for sending task starting information to each second node connected with the first gateway node when receiving task completion information sent by the first node, so that each second node starts to execute a corresponding task to be executed;
When the node type of the first node is a conditional judgment node, a second gateway node with the node type being an exclusive gateway node is created, and a connecting line between the first node and the second gateway node is established; establishing a connection line between the second gateway node and each second node, and pushing the second gateway node into a current stack according to a first-in-last-out principle; the second gateway node is configured to select, according to a condition judgment result sent by the first node, a target second node corresponding to the condition judgment result from a plurality of second nodes connected to the second gateway node, and send task start information to the target second node, so that the target second node starts to execute a task to be executed corresponding to the target second node;
when the first node and other nodes are used as the front node of the second node together, judging whether a current stack top node exists in a current stack or not;
if the current top node exists, the current top node is obtained, whether the current top node exists in the current stack or not and the subsequent steps are continuously judged until the current top node does not exist in the current stack, and the current top node and the pop-up sequence of the current top node are obtained;
For each current trestle node, judging whether a third node with the same node type as the current trestle node exists currently; if the third node with the same node type as the current trestle top node does not exist, creating the third node with the same node type as the current trestle top node to obtain the third node corresponding to each current trestle top node; according to the pop sequence of each current stack top node, a connection line between the first node and the second node is established through the third node corresponding to each current stack top node in sequence; and if the third node exists, establishing a connection line between the first node and the second node by sequentially passing through the third node corresponding to each current stack top node according to the stack pulling sequence of each current stack top node.
2. The method according to claim 1, wherein determining a processing manner corresponding to the second node according to the connection relationship between the first node and other nodes in the initial workflow and the connection relationship between the second node and other nodes, so as to process the second node through the processing manner, includes:
And when the first node only belongs to a front node of one node, establishing a connecting line between the first node and the second node.
3. The method of claim 1, wherein the querying the initial workflow for a node whose leading node is empty to determine the node as a starting node further comprises:
analyzing the node relation in the initial workflow, and determining the front node of each node in the initial workflow so as to store the node relation between each node and the front node of each node into a database;
the querying the node with the empty front node in the initial workflow to determine the node as the starting node comprises:
and inquiring the node with the empty front node in the initial workflow from the node relation stored in the database to determine the node as a starting node.
4. The method according to claim 1, wherein the method is applied in a backend server; before the initial workflow is acquired, the method further comprises:
receiving the initial workflow sent by a first user side, so as to store the initial workflow; the initial workflow is drawn by a first user through the target workflow designer installed in the first user side; the back-end server stores a plurality of initial workflows; each initial workflow corresponds to a respective flow type.
5. The method of claim 4, wherein the obtaining an initial workflow comprises:
receiving a query request sent by a second user side, so as to return a plurality of pre-stored initial workflows and numbers corresponding to each initial workflow to the second user side, and enabling the second user side to respond to a selection operation of a second user on the initial workflows, so that the numbers corresponding to the selected initial workflows are used as target numbers to be sent to the back-end server;
and receiving the target number sent by the second user side to obtain an initial workflow corresponding to the target number from a plurality of pre-stored initial workflows.
6. A workflow generating apparatus, comprising:
the acquisition module is used for executing the step S1; step S1 is to acquire an initial workflow; the initial workflow is drawn through a target workflow designer; the target workflow designer is a workflow designer shielding gateway nodes;
the query module is used for executing the step S2; step S2 is to query a node in the initial workflow, where the front node is empty, to determine the node as a start node, and to use the start node as a first node; the front node is used for representing a node before a current node in the flow direction relation of the initial workflow;
A determining module, configured to execute step S3; the step S3 is to determine a node adjacent to and located after the first node in the initial workflow as a second node;
the processing module is used for executing the step S4; step S4 is to determine a processing manner corresponding to the second node according to the connection relationship between the first node and other nodes in the initial workflow and the connection relationship between the second node and other nodes, so as to process the second node in the processing manner; repeatedly executing the steps S3 to S4, and determining the second node in the step S3 as a new first node in the process of repeatedly executing the steps until the circulation is stopped when the target workflow meeting the preset specification is generated;
the processing module, when used for executing step S4, is specifically configured to:
when the first node belongs to a prepositive node of at least two nodes, judging whether the node type of the first node is a condition judgment node or not;
when the node type of the first node is not a condition judgment node, a first gateway node with the node type being a parallel gateway node is established, and a connecting line between the first node and the first gateway node is established; respectively establishing a connection line between the first gateway node and each second node aiming at each second node, and pushing the first gateway node into a current stack according to a first-in-last-out principle; the first gateway node is used for sending task starting information to each second node connected with the first gateway node when receiving task completion information sent by the first node, so that each second node starts to execute a corresponding task to be executed;
When the node type of the first node is a conditional judgment node, a second gateway node with the node type being an exclusive gateway node is created, a connection line between the first node and the second gateway node is established, and for each second node, a connection line between the second gateway node and the second node is established, and the second gateway node is pushed into a current stack according to a first-in-last-out principle; the second gateway node is configured to select, according to a condition judgment result sent by the first node, a target second node corresponding to the condition judgment result from a plurality of second nodes connected to the second gateway node, and send task start information to the target second node, so that the target second node starts to execute a task to be executed corresponding to the target second node;
when the first node and other nodes are used as the front node of the second node together, judging whether a current stack top node exists in a current stack or not;
if the current top node exists, the current top node is obtained, whether the current top node exists in the current stack or not and the subsequent steps are continuously judged until the current top node does not exist in the current stack, and the current top node and the pop-up sequence of the current top node are obtained;
For each current trestle node, judging whether a third node with the same node type as the current trestle node exists currently; if the third node with the same node type as the current trestle top node does not exist, creating the third node with the same node type as the current trestle top node to obtain the third node corresponding to each current trestle top node; according to the pop sequence of each current stack top node, a connection line between the first node and the second node is established through the third node corresponding to each current stack top node in sequence; and if the third node exists, establishing a connection line between the first node and the second node by sequentially passing through the third node corresponding to each current stack top node according to the stack pulling sequence of each current stack top node.
7. An electronic device, comprising: a processor, a memory and a bus, said memory storing machine-readable instructions executable by said processor, said processor and said memory communicating over the bus when the electronic device is running, said machine-readable instructions when executed by said processor performing the steps of the method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that it has stored thereon a computer program which, when executed by a processor, performs the steps of the method according to any of claims 1 to 5.
CN202211399518.8A 2022-11-09 2022-11-09 Workflow generation method and device, electronic equipment and readable storage medium Active CN115660396B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211399518.8A CN115660396B (en) 2022-11-09 2022-11-09 Workflow generation method and device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211399518.8A CN115660396B (en) 2022-11-09 2022-11-09 Workflow generation method and device, electronic equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN115660396A CN115660396A (en) 2023-01-31
CN115660396B true CN115660396B (en) 2023-09-19

Family

ID=85015608

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211399518.8A Active CN115660396B (en) 2022-11-09 2022-11-09 Workflow generation method and device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN115660396B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110619473A (en) * 2019-09-19 2019-12-27 福建博思软件股份有限公司 Method for realizing reverse circulation based on Activiti workflow
CN114004477A (en) * 2021-10-27 2022-02-01 北京同创永益科技发展有限公司 Low-code-based automatic execution method and device for process arrangement
WO2022134424A1 (en) * 2020-12-24 2022-06-30 平安普惠企业管理有限公司 Service flow processing method and apparatus, and computer device and storage medium
CN115291856A (en) * 2022-07-19 2022-11-04 中电金信软件有限公司 Flow establishing method and device and electronic equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120227044A1 (en) * 2011-03-03 2012-09-06 Tata Consultancy Services Limited Automated workflow manager
US8756595B2 (en) * 2011-07-28 2014-06-17 Yahoo! Inc. Method and system for distributed application stack deployment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110619473A (en) * 2019-09-19 2019-12-27 福建博思软件股份有限公司 Method for realizing reverse circulation based on Activiti workflow
WO2022134424A1 (en) * 2020-12-24 2022-06-30 平安普惠企业管理有限公司 Service flow processing method and apparatus, and computer device and storage medium
CN114004477A (en) * 2021-10-27 2022-02-01 北京同创永益科技发展有限公司 Low-code-based automatic execution method and device for process arrangement
CN115291856A (en) * 2022-07-19 2022-11-04 中电金信软件有限公司 Flow establishing method and device and electronic equipment

Also Published As

Publication number Publication date
CN115660396A (en) 2023-01-31

Similar Documents

Publication Publication Date Title
CN100492319C (en) System and method for installing storage area network
JP4820408B2 (en) Attribute engine
CN109299157A (en) A kind of data export method and device of distributed big single table
CN105471968A (en) Data exchange method, data exchange system and data platform server
EP3258438A1 (en) Business coordination system and business coordination method
CN113961332A (en) Method and device for realizing workflow engine, electronic equipment and storage medium
CN111127181A (en) Voucher bookkeeping method and device
CN111695876A (en) Approval process processing method, device, equipment and storage medium
CN101989294A (en) Distributed file resolving method and resolving system
CN115860451A (en) Flow operation method and device, electronic equipment and storage medium
CN115660396B (en) Workflow generation method and device, electronic equipment and readable storage medium
CN105989532A (en) Data processing method and device
CN113592529B (en) Potential customer recommendation method and device for bond products
CN110083351A (en) Method and apparatus for generating code
CN115344609A (en) Scatter diagram rendering method and system based on non-sampling big data
CN109858874A (en) Payment approval process configuration method and device under a kind of more scenes
CN115391343A (en) Bill data processing method and device, electronic equipment and storage medium
JP2008250861A (en) Code conversion system, code conversion method, code correspondence relationship information generation method and computer program
CN110597572A (en) Service calling relation analysis method and computer system
CN113568656A (en) Configuration data processing method and device, storage medium and equipment
CN114897495A (en) Business process model method, device and computer medium
CN117909413A (en) Data processing method, data processing device, computer readable storage medium and electronic equipment
CN114942957A (en) Method and device for forwarding transaction message
CN117094728A (en) Method and device for determining target payment channel, storage medium and electronic equipment
CN117495475A (en) Order generation method and device based on large model and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant